PluginSpec: Use member initialization

Change-Id: Ie8720248eca88ec447461b54b27928c25dace97e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Eike Ziller
2017-01-03 15:28:42 +01:00
parent 5017d11958
commit e0dd885338
2 changed files with 11 additions and 21 deletions

View File

@@ -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)
{
}

View File

@@ -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);