@@ -861,7 +861,7 @@ bool MainWindow::tryLoadLibrary(Library *library, const QString& filename)
861861 const Library::Error error = loadLibrary (library, filename);
862862 if (error.errorcode != Library::ErrorCode::OK) {
863863 if (error.errorcode == Library::ErrorCode::UNKNOWN_ELEMENT) {
864- QMessageBox::information (this , tr (" Information" ), tr (" The library '%1' contains unknown elements:\n %2" ).arg (filename, error.reason .c_str ()));
864+ QMessageBox::information (this , tr (" Information" ), tr (" The library '%1' contains unknown elements:\n %2" ).arg (filename). arg ( error.reason .c_str ()));
865865 return true ;
866866 }
867867
@@ -899,7 +899,7 @@ bool MainWindow::tryLoadLibrary(Library *library, const QString& filename)
899899 }
900900 if (!error.reason .empty ())
901901 errmsg += " '" + QString::fromStdString (error.reason ) + " '" ;
902- QMessageBox::information (this , tr (" Information" ), tr (" Failed to load the selected library '%1'.\n %2" ).arg (filename, errmsg));
902+ QMessageBox::information (this , tr (" Information" ), tr (" Failed to load the selected library '%1'.\n %2" ).arg (filename). arg ( errmsg));
903903 return false ;
904904 }
905905 return true ;
@@ -958,7 +958,7 @@ Settings MainWindow::getCppcheckSettings()
958958 {
959959 const QString cfgErr = QString::fromStdString (result.loadCppcheckCfg ());
960960 if (!cfgErr.isEmpty ())
961- QMessageBox::critical (this , tr (" Error" ), tr (" Failed to load %1 - %2" ).arg (" cppcheck.cfg" , cfgErr));
961+ QMessageBox::critical (this , tr (" Error" ), tr (" Failed to load %1 - %2" ).arg (" cppcheck.cfg" ). arg ( cfgErr));
962962
963963 const auto cfgAddons = result.addons ;
964964 result.addons .clear ();
@@ -1787,7 +1787,7 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile, const bool check
17871787 if (!errorMessage.isEmpty ()) {
17881788 QMessageBox msg (QMessageBox::Critical,
17891789 tr (" Cppcheck" ),
1790- tr (" Failed to import '%1': %2\n\n Analysis is stopped." ).arg (prjfile, errorMessage),
1790+ tr (" Failed to import '%1': %2\n\n Analysis is stopped." ).arg (prjfile). arg ( errorMessage),
17911791 QMessageBox::Ok,
17921792 this );
17931793 msg.exec ();
@@ -1796,7 +1796,7 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile, const bool check
17961796 } catch (InternalError &e) {
17971797 QMessageBox msg (QMessageBox::Critical,
17981798 tr (" Cppcheck" ),
1799- tr (" Failed to import '%1' (%2), analysis is stopped" ).arg (prjfile, QString::fromStdString (e.errorMessage )),
1799+ tr (" Failed to import '%1' (%2), analysis is stopped" ).arg (prjfile). arg ( QString::fromStdString (e.errorMessage )),
18001800 QMessageBox::Ok,
18011801 this );
18021802 msg.exec ();
@@ -2100,7 +2100,7 @@ void MainWindow::replyFinished(QNetworkReply *reply) {
21002100 }
21012101 mUI ->mButtonHideInformation ->setVisible (true );
21022102 mUI ->mLabelInformation ->setVisible (true );
2103- mUI ->mLabelInformation ->setText (tr (" New version available: %1. %2" ).arg (str.trimmed (), install));
2103+ mUI ->mLabelInformation ->setText (tr (" New version available: %1. %2" ).arg (str.trimmed ()). arg ( install));
21042104 }
21052105 }
21062106 }
0 commit comments