forked from qt-creator/qt-creator
Make it possible for installers to disable plugins by default.
Plugin manager reads Plugins/Ignored in installation global settings now, and handles these plugins similar to as if they were experimental. Change-Id: I56a0c5fe143e3fbd9261244bafece26d7b99c154 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@nokia.com> Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
This commit is contained in:
@@ -275,6 +275,16 @@ bool PluginSpec::isExperimental() const
|
||||
return d->experimental;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns if the plugin is disabled by default.
|
||||
This might be because the plugin is experimental, or because
|
||||
the plugin manager's settings define it as disabled by default.
|
||||
*/
|
||||
bool PluginSpec::isDisabledByDefault() const
|
||||
{
|
||||
return d->disabledByDefault;
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn bool PluginSpec::isEnabled() const
|
||||
Returns if the plugin is loaded at startup. True by default - the user can change it from the Plugin settings.
|
||||
@@ -458,6 +468,8 @@ namespace {
|
||||
*/
|
||||
PluginSpecPrivate::PluginSpecPrivate(PluginSpec *spec)
|
||||
:
|
||||
experimental(false),
|
||||
disabledByDefault(false),
|
||||
enabled(true),
|
||||
disabledIndirectly(false),
|
||||
plugin(0),
|
||||
@@ -521,6 +533,11 @@ void PluginSpec::setEnabled(bool value)
|
||||
d->enabled = value;
|
||||
}
|
||||
|
||||
void PluginSpec::setDisabledByDefault(bool value)
|
||||
{
|
||||
d->disabledByDefault = value;
|
||||
}
|
||||
|
||||
void PluginSpec::setDisabledIndirectly(bool value)
|
||||
{
|
||||
d->disabledIndirectly = value;
|
||||
@@ -601,6 +618,7 @@ void PluginSpecPrivate::readPluginSpec(QXmlStreamReader &reader)
|
||||
reader.raiseError(msgInvalidFormat(PLUGIN_EXPERIMENTAL));
|
||||
return;
|
||||
}
|
||||
disabledByDefault = experimental;
|
||||
enabled = !experimental;
|
||||
while (!reader.atEnd()) {
|
||||
reader.readNext();
|
||||
|
||||
Reference in New Issue
Block a user