forked from qt-creator/qt-creator
Rename PluginSpec::isEnabled() into isEnabledInSettings
This is what it actually is. Change-Id: I2ea2e77edc3fd80eb1e25156edc7a59e86dfac9a Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
@@ -283,12 +283,15 @@ bool PluginSpec::isDisabledByDefault() const
|
||||
}
|
||||
|
||||
/*!
|
||||
\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.
|
||||
\fn bool PluginSpec::isEnabledInSettings() const
|
||||
Returns if the plugin should be loaded at startup. True by default
|
||||
The user can change it from the Plugin settings.
|
||||
Note: That this function returns true even if a plugin is disabled because
|
||||
of a not loaded dependencies, or a error in loading.
|
||||
*/
|
||||
bool PluginSpec::isEnabled() const
|
||||
bool PluginSpec::isEnabledInSettings() const
|
||||
{
|
||||
return d->enabled;
|
||||
return d->enabledInSettings;
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -468,7 +471,7 @@ PluginSpecPrivate::PluginSpecPrivate(PluginSpec *spec)
|
||||
:
|
||||
experimental(false),
|
||||
disabledByDefault(false),
|
||||
enabled(true),
|
||||
enabledInSettings(true),
|
||||
disabledIndirectly(false),
|
||||
plugin(0),
|
||||
state(PluginSpec::Invalid),
|
||||
@@ -528,7 +531,7 @@ bool PluginSpecPrivate::read(const QString &fileName)
|
||||
|
||||
void PluginSpec::setEnabled(bool value)
|
||||
{
|
||||
d->enabled = value;
|
||||
d->enabledInSettings = value;
|
||||
}
|
||||
|
||||
void PluginSpec::setDisabledByDefault(bool value)
|
||||
@@ -616,7 +619,7 @@ void PluginSpecPrivate::readPluginSpec(QXmlStreamReader &reader)
|
||||
return;
|
||||
if (experimental)
|
||||
disabledByDefault = true;
|
||||
enabled = !disabledByDefault;
|
||||
enabledInSettings = !disabledByDefault;
|
||||
while (!reader.atEnd()) {
|
||||
reader.readNext();
|
||||
switch (reader.tokenType()) {
|
||||
@@ -888,7 +891,7 @@ bool PluginSpecPrivate::resolveDependencies(const QList<PluginSpec *> &specs)
|
||||
|
||||
void PluginSpecPrivate::disableIndirectlyIfDependencyDisabled()
|
||||
{
|
||||
if (!enabled)
|
||||
if (!enabledInSettings)
|
||||
return;
|
||||
|
||||
if (disabledIndirectly)
|
||||
@@ -900,7 +903,7 @@ void PluginSpecPrivate::disableIndirectlyIfDependencyDisabled()
|
||||
if (it.key().type == PluginDependency::Optional)
|
||||
continue;
|
||||
PluginSpec *dependencySpec = it.value();
|
||||
if (dependencySpec->isDisabledIndirectly() || !dependencySpec->isEnabled()) {
|
||||
if (dependencySpec->isDisabledIndirectly() || !dependencySpec->isEnabledInSettings()) {
|
||||
disabledIndirectly = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user