diff --git a/src/libs/extensionsystem/optionsparser.cpp b/src/libs/extensionsystem/optionsparser.cpp index 16b96f2e5c0..09d191edf6d 100644 --- a/src/libs/extensionsystem/optionsparser.cpp +++ b/src/libs/extensionsystem/optionsparser.cpp @@ -147,16 +147,22 @@ bool OptionsParser::checkForLoadOption() if (m_currentArg != QLatin1String(LOAD_OPTION)) return false; if (nextToken(RequiredToken)) { - 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 { - spec->d->setForceEnabled(true); + if (m_currentArg == QLatin1String("all")) { + foreach (PluginSpec *spec, m_pmPrivate->pluginSpecs) + spec->d->setForceEnabled(true); m_isDependencyRefreshNeeded = true; + } else { + 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 { + spec->d->setForceEnabled(true); + m_isDependencyRefreshNeeded = true; + } } } return true; @@ -167,18 +173,24 @@ bool OptionsParser::checkForNoLoadOption() if (m_currentArg != QLatin1String(NO_LOAD_OPTION)) return false; if (nextToken(RequiredToken)) { - 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 { - spec->d->setForceDisabled(true); - // recursively disable all plugins that require this plugin - foreach (PluginSpec *dependantSpec, PluginManager::pluginsRequiringPlugin(spec)) - dependantSpec->d->setForceDisabled(true); + if (m_currentArg == QLatin1String("all")) { + foreach (PluginSpec *spec, m_pmPrivate->pluginSpecs) + spec->d->setForceDisabled(true); m_isDependencyRefreshNeeded = true; + } else { + 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 { + spec->d->setForceDisabled(true); + // recursively disable all plugins that require this plugin + foreach (PluginSpec *dependantSpec, PluginManager::pluginsRequiringPlugin(spec)) + dependantSpec->d->setForceDisabled(true); + m_isDependencyRefreshNeeded = true; + } } } return true; diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp index 459141eca2a..8f0100e4b80 100644 --- a/src/libs/extensionsystem/pluginmanager.cpp +++ b/src/libs/extensionsystem/pluginmanager.cpp @@ -699,9 +699,17 @@ void PluginManager::formatOptions(QTextStream &str, int optionIndentation, int d formatOption(str, QLatin1String(OptionsParser::LOAD_OPTION), QLatin1String("plugin"), QLatin1String("Load and all plugins that it requires"), optionIndentation, descriptionIndentation); + formatOption(str, QLatin1String(OptionsParser::LOAD_OPTION) + QLatin1String(" all"), + QString(), QLatin1String("Load all available plugins"), + optionIndentation, descriptionIndentation); formatOption(str, QLatin1String(OptionsParser::NO_LOAD_OPTION), QLatin1String("plugin"), QLatin1String("Do not load and all plugins that require it"), optionIndentation, descriptionIndentation); + formatOption(str, QLatin1String(OptionsParser::NO_LOAD_OPTION) + QLatin1String(" all"), + QString(), QString::fromLatin1("Do not load any plugin (useful when " + "followed by one or more \"%1\" arguments)") + .arg(QLatin1String(OptionsParser::LOAD_OPTION)), + optionIndentation, descriptionIndentation); formatOption(str, QLatin1String(OptionsParser::PROFILE_OPTION), QString(), QLatin1String("Profile plugin loading"), optionIndentation, descriptionIndentation);