Fixed #7946 (GUI-CLI: Priorize specific command line parameters to guessing)
This commit is contained in:
parent
839cb2bdaa
commit
80367095db
|
@ -222,8 +222,6 @@ void MainWindow::HandleCLIParams(const QStringList ¶ms)
|
||||||
index = params.indexOf("-p");
|
index = params.indexOf("-p");
|
||||||
if ((index + 1) < params.length())
|
if ((index + 1) < params.length())
|
||||||
LoadProjectFile(params[index + 1]);
|
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")) {
|
} else if (params.contains("-l")) {
|
||||||
QString logFile;
|
QString logFile;
|
||||||
index = params.indexOf("-l");
|
index = params.indexOf("-l");
|
||||||
|
@ -240,6 +238,8 @@ void MainWindow::HandleCLIParams(const QStringList ¶ms)
|
||||||
} else {
|
} else {
|
||||||
LoadResults(logFile);
|
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()) {
|
} else if ((index = params.indexOf(QRegExp(".*\\.xml$", Qt::CaseInsensitive), 0)) >= 0 && index < params.length() && QFile(params[index]).exists()) {
|
||||||
LoadResults(params[index],QDir::currentPath());
|
LoadResults(params[index],QDir::currentPath());
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in New Issue