Commit 3948eeaf authored by Eike Ziller's avatar Eike Ziller

Support enabling experimental plugins from installer.

Change-Id: Id5f383f58125c44496a3d6936b27638bce48622d
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 74aa996d
......@@ -907,8 +907,10 @@ void PluginManagerPrivate::writeSettings()
*/
void PluginManagerPrivate::readSettings()
{
if (globalSettings)
if (globalSettings) {
defaultDisabledPlugins = globalSettings->value(QLatin1String(C_IGNORED_PLUGINS)).toStringList();
defaultEnabledPlugins = globalSettings->value(QLatin1String(C_FORCEENABLED_PLUGINS)).toStringList();
}
if (settings) {
disabledPlugins = settings->value(QLatin1String(C_IGNORED_PLUGINS)).toStringList();
forceEnabledPlugins = settings->value(QLatin1String(C_FORCEENABLED_PLUGINS)).toStringList();
......@@ -1225,9 +1227,14 @@ void PluginManagerPrivate::readPluginPaths()
collection = new PluginCollection(spec->category());
pluginCategories.insert(spec->category(), collection);
}
if (defaultDisabledPlugins.contains(spec->name())) {
// defaultDisabledPlugins and defaultEnabledPlugins from install settings
// is used to override the defaults read from the plugin spec
if (!spec->isDisabledByDefault() && defaultDisabledPlugins.contains(spec->name())) {
spec->setDisabledByDefault(true);
spec->setEnabled(false);
} else if (spec->isDisabledByDefault() && defaultEnabledPlugins.contains(spec->name())) {
spec->setDisabledByDefault(false);
spec->setEnabled(true);
}
if (spec->isDisabledByDefault() && forceEnabledPlugins.contains(spec->name()))
spec->setEnabled(true);
......
......@@ -104,7 +104,8 @@ public:
QStringList pluginPaths;
QString extension;
QList<QObject *> allObjects; // ### make this a QList<QPointer<QObject> > > ?
QStringList defaultDisabledPlugins;
QStringList defaultDisabledPlugins; // Plugins/Ignored from install settings
QStringList defaultEnabledPlugins; // Plugins/ForceEnabled from install settings
QStringList disabledPlugins;
QStringList forceEnabledPlugins;
// delayed initialization
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment