Skip to content

Commit 8036709

Browse files
committed
Fixed cppcheck-opensource#7946 (GUI-CLI: Priorize specific command line parameters to guessing)
1 parent 839cb2b commit 8036709

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

gui/mainwindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,6 @@ void MainWindow::HandleCLIParams(const QStringList &params)
222222
index = params.indexOf("-p");
223223
if ((index + 1) < params.length())
224224
LoadProjectFile(params[index + 1]);
225-
} else if ((index = params.indexOf(QRegExp(".*\\.cppcheck$", Qt::CaseInsensitive), 0)) >= 0 && index < params.length() && QFile(params[index]).exists()) {
226-
LoadProjectFile(params[index]);
227225
} else if (params.contains("-l")) {
228226
QString logFile;
229227
index = params.indexOf("-l");
@@ -240,6 +238,8 @@ void MainWindow::HandleCLIParams(const QStringList &params)
240238
} else {
241239
LoadResults(logFile);
242240
}
241+
} else if ((index = params.indexOf(QRegExp(".*\\.cppcheck$", Qt::CaseInsensitive), 0)) >= 0 && index < params.length() && QFile(params[index]).exists()) {
242+
LoadProjectFile(params[index]);
243243
} else if ((index = params.indexOf(QRegExp(".*\\.xml$", Qt::CaseInsensitive), 0)) >= 0 && index < params.length() && QFile(params[index]).exists()) {
244244
LoadResults(params[index],QDir::currentPath());
245245
} else

0 commit comments

Comments
 (0)