summaryrefslogtreecommitdiff
path: root/src/libs/extensionsystem
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2017-01-03 15:28:42 +0100
committerEike Ziller <eike.ziller@qt.io>2017-01-04 16:32:42 +0000
commite0dd885338d65bd1d35f14c10f55d09d453de0f0 (patch)
treef0a12da36e52f5af4e8a1723b18e21355d7737c9 /src/libs/extensionsystem
parent5017d11958e9b518e23a71bb9f837ae340304a94 (diff)
downloadqt-creator-e0dd885338d65bd1d35f14c10f55d09d453de0f0.tar.gz
PluginSpec: Use member initialization
Change-Id: Ie8720248eca88ec447461b54b27928c25dace97e Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/libs/extensionsystem')
-rw-r--r--src/libs/extensionsystem/pluginspec.cpp12
-rw-r--r--src/libs/extensionsystem/pluginspec_p.h20
2 files changed, 11 insertions, 21 deletions
diff --git a/src/libs/extensionsystem/pluginspec.cpp b/src/libs/extensionsystem/pluginspec.cpp
index ef83caa66d..61e2fb0451 100644
--- a/src/libs/extensionsystem/pluginspec.cpp
+++ b/src/libs/extensionsystem/pluginspec.cpp
@@ -507,17 +507,7 @@ namespace {
\internal
*/
PluginSpecPrivate::PluginSpecPrivate(PluginSpec *spec)
- : required(false),
- experimental(false),
- enabledByDefault(true),
- enabledBySettings(true),
- enabledIndirectly(false),
- forceEnabled(false),
- forceDisabled(false),
- plugin(0),
- state(PluginSpec::Invalid),
- hasError(false),
- q(spec)
+ : q(spec)
{
}
diff --git a/src/libs/extensionsystem/pluginspec_p.h b/src/libs/extensionsystem/pluginspec_p.h
index bd172fef19..f4685e5e2a 100644
--- a/src/libs/extensionsystem/pluginspec_p.h
+++ b/src/libs/extensionsystem/pluginspec_p.h
@@ -70,9 +70,9 @@ public:
QString name;
QString version;
QString compatVersion;
- bool required;
- bool experimental;
- bool enabledByDefault;
+ bool required = false;
+ bool experimental = false;
+ bool enabledByDefault = true;
QString vendor;
QString copyright;
QString license;
@@ -81,10 +81,10 @@ public:
QString category;
QRegExp platformSpecification;
QVector<PluginDependency> dependencies;
- bool enabledBySettings;
- bool enabledIndirectly;
- bool forceEnabled;
- bool forceDisabled;
+ bool enabledBySettings = true;
+ bool enabledIndirectly = false;
+ bool forceEnabled = false;
+ bool forceDisabled = false;
QString location;
QString filePath;
@@ -92,10 +92,10 @@ public:
QHash<PluginDependency, PluginSpec *> dependencySpecs;
PluginSpec::PluginArgumentDescriptions argumentDescriptions;
- IPlugin *plugin;
+ IPlugin *plugin = nullptr;
- PluginSpec::State state;
- bool hasError;
+ PluginSpec::State state = PluginSpec::Invalid;
+ bool hasError = false;
QString errorString;
static bool isValidVersion(const QString &version);