Do not disable "required" plugins when testing

"Required" is only the Core plugin, and that should never be disabled.
Fixes the weird issue that running "qtcreator -test WinRt" on
non-Windows platforms failed with "Core plugin is disabled".

Change-Id: Id349f406e4bde876ae5513c75d39b4b4c052b8ba
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Eike Ziller
2017-08-23 10:15:20 +02:00
committed by Orgad Shaneh
parent cfad538acf
commit 7ef365d756

View File

@@ -268,7 +268,7 @@ void OptionsParser::forceDisableAllPluginsExceptTestedAndForceEnabled()
for (const PluginManagerPrivate::TestSpec &testSpec : m_pmPrivate->testSpecs) for (const PluginManagerPrivate::TestSpec &testSpec : m_pmPrivate->testSpecs)
testSpec.pluginSpec->d->setForceEnabled(true); testSpec.pluginSpec->d->setForceEnabled(true);
for (PluginSpec *spec : m_pmPrivate->pluginSpecs) { for (PluginSpec *spec : m_pmPrivate->pluginSpecs) {
if (!spec->isForceEnabled()) if (!spec->isForceEnabled() && !spec->isRequired())
spec->d->setForceDisabled(true); spec->d->setForceDisabled(true);
} }
} }