From 80367095dbfbb9db1db15ad562abbd573f3a2b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 25 Jun 2017 22:18:51 +0200 Subject: [PATCH] Fixed #7946 (GUI-CLI: Priorize specific command line parameters to guessing) --- gui/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 165f44eec..65bd28990 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -222,8 +222,6 @@ void MainWindow::HandleCLIParams(const QStringList ¶ms) index = params.indexOf("-p"); if ((index + 1) < params.length()) LoadProjectFile(params[index + 1]); - } else if ((index = params.indexOf(QRegExp(".*\\.cppcheck$", Qt::CaseInsensitive), 0)) >= 0 && index < params.length() && QFile(params[index]).exists()) { - LoadProjectFile(params[index]); } else if (params.contains("-l")) { QString logFile; index = params.indexOf("-l"); @@ -240,6 +238,8 @@ void MainWindow::HandleCLIParams(const QStringList ¶ms) } else { LoadResults(logFile); } + } else if ((index = params.indexOf(QRegExp(".*\\.cppcheck$", Qt::CaseInsensitive), 0)) >= 0 && index < params.length() && QFile(params[index]).exists()) { + LoadProjectFile(params[index]); } else if ((index = params.indexOf(QRegExp(".*\\.xml$", Qt::CaseInsensitive), 0)) >= 0 && index < params.length() && QFile(params[index]).exists()) { LoadResults(params[index],QDir::currentPath()); } else