forked from qt-creator/qt-creator
PluginManager: add -test all capability for internal testing.
This commit is contained in:
@@ -107,14 +107,21 @@ bool OptionsParser::checkForTestOption()
|
|||||||
if (m_currentArg != QLatin1String(TEST_OPTION))
|
if (m_currentArg != QLatin1String(TEST_OPTION))
|
||||||
return false;
|
return false;
|
||||||
if (nextToken(RequiredToken)) {
|
if (nextToken(RequiredToken)) {
|
||||||
PluginSpec *spec = m_pmPrivate->pluginByName(m_currentArg);
|
if(m_currentArg == "all") {
|
||||||
if (!spec) {
|
foreach(PluginSpec *spec, m_pmPrivate->pluginSpecs) {
|
||||||
if (m_errorString)
|
if (spec)
|
||||||
*m_errorString = QCoreApplication::translate("PluginManager",
|
m_pmPrivate->testSpecs.append(spec);
|
||||||
"The plugin '%1' does not exist.").arg(m_currentArg);
|
}
|
||||||
m_hasError = true;
|
|
||||||
} else {
|
} else {
|
||||||
m_pmPrivate->testSpecs.append(spec);
|
PluginSpec *spec = m_pmPrivate->pluginByName(m_currentArg);
|
||||||
|
if (!spec) {
|
||||||
|
if (m_errorString)
|
||||||
|
*m_errorString = QCoreApplication::translate("PluginManager",
|
||||||
|
"The plugin '%1' does not exist.").arg(m_currentArg);
|
||||||
|
m_hasError = true;
|
||||||
|
} else {
|
||||||
|
m_pmPrivate->testSpecs.append(spec);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user