aboutsummaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorIvan Komissarov <ABBAPOH@gmail.com>2019-05-01 21:00:38 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2019-05-02 18:13:22 +0000
commitf8ee1422db60190aaad63d967584b0ffc52e9fd8 (patch)
tree76e92fa4796eef5193b4581acc00053823101d26 /src/app
parent2a88460ace25208b3774ab0e32df3fa9d20452ea (diff)
Fix uninitialized variables
This fixes most of clang analyzer warnings about uninitialized variables in ctors Change-Id: I879c785594307ed3fe7140588338a6b2a1e4db65 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/config-ui/commandlineparser.h2
-rw-r--r--src/app/config/configcommandlineparser.h2
-rw-r--r--src/app/qbs-create-project/createproject.h2
-rw-r--r--src/app/qbs-setup-android/commandlineparser.h2
-rw-r--r--src/app/qbs-setup-qt/commandlineparser.h4
-rw-r--r--src/app/qbs-setup-toolchains/commandlineparser.h4
-rw-r--r--src/app/qbs/commandlinefrontend.h16
-rw-r--r--src/app/qbs/qbstool.h4
8 files changed, 18 insertions, 18 deletions
diff --git a/src/app/config-ui/commandlineparser.h b/src/app/config-ui/commandlineparser.h
index dc43d33b3..b8ab1a9f0 100644
--- a/src/app/config-ui/commandlineparser.h
+++ b/src/app/config-ui/commandlineparser.h
@@ -59,7 +59,7 @@ private:
void assignOptionArgument(const QString &option, QString &argument);
[[noreturn]] void complainAboutExtraArguments();
- bool m_helpRequested;
+ bool m_helpRequested = false;
qbs::Settings::Scope m_settingsScope = qbs::Settings::UserScope;
QString m_settingsDir;
QStringList m_commandLine;
diff --git a/src/app/config/configcommandlineparser.h b/src/app/config/configcommandlineparser.h
index 22f6906f9..b567134fd 100644
--- a/src/app/config/configcommandlineparser.h
+++ b/src/app/config/configcommandlineparser.h
@@ -73,7 +73,7 @@ private:
ConfigCommand m_command;
qbs::Settings::Scopes m_scope = qbs::Settings::allScopes();
- bool m_helpRequested;
+ bool m_helpRequested = false;
QString m_settingsDir;
QStringList m_commandLine;
};
diff --git a/src/app/qbs-create-project/createproject.h b/src/app/qbs-create-project/createproject.h
index 95df434d9..efc217b68 100644
--- a/src/app/qbs-create-project/createproject.h
+++ b/src/app/qbs-create-project/createproject.h
@@ -82,7 +82,7 @@ private:
std::vector<ProjectPtr> subProjects;
};
Project m_topLevelProject;
- ProjectStructure m_projectStructure;
+ ProjectStructure m_projectStructure = ProjectStructure::Flat;
QList<QRegExp> m_whiteList;
QList<QRegExp> m_blackList;
};
diff --git a/src/app/qbs-setup-android/commandlineparser.h b/src/app/qbs-setup-android/commandlineparser.h
index 729f28cb9..3ce3eeb40 100644
--- a/src/app/qbs-setup-android/commandlineparser.h
+++ b/src/app/qbs-setup-android/commandlineparser.h
@@ -63,7 +63,7 @@ private:
void assignOptionArgument(const QString &option, QString &argument);
[[noreturn]] void complainAboutExtraArguments();
- bool m_helpRequested;
+ bool m_helpRequested = false;
QString m_sdkDir;
QString m_ndkDir;
QString m_qtSdkDir;
diff --git a/src/app/qbs-setup-qt/commandlineparser.h b/src/app/qbs-setup-qt/commandlineparser.h
index a9ecb55c8..c766a9df2 100644
--- a/src/app/qbs-setup-qt/commandlineparser.h
+++ b/src/app/qbs-setup-qt/commandlineparser.h
@@ -63,8 +63,8 @@ private:
void assignOptionArgument(const QString &option, QString &argument);
[[noreturn]] void complainAboutExtraArguments();
- bool m_helpRequested;
- bool m_autoDetectionMode;
+ bool m_helpRequested = false;
+ bool m_autoDetectionMode = false;
qbs::Settings::Scope m_settingsScope = qbs::Settings::UserScope;
QString m_qmakePath;
QString m_profileName;
diff --git a/src/app/qbs-setup-toolchains/commandlineparser.h b/src/app/qbs-setup-toolchains/commandlineparser.h
index cb0949bf1..9d5b0c246 100644
--- a/src/app/qbs-setup-toolchains/commandlineparser.h
+++ b/src/app/qbs-setup-toolchains/commandlineparser.h
@@ -64,8 +64,8 @@ private:
void assignOptionArgument(const QString &option, QString &argument);
[[noreturn]] void complainAboutExtraArguments();
- bool m_helpRequested;
- bool m_autoDetectionMode;
+ bool m_helpRequested = false;
+ bool m_autoDetectionMode = false;
qbs::Settings::Scope m_settingsScope = qbs::Settings::UserScope;
QString m_compilerPath;
QString m_toolchainType;
diff --git a/src/app/qbs/commandlinefrontend.h b/src/app/qbs/commandlinefrontend.h
index 363e0b040..ebbde2baa 100644
--- a/src/app/qbs/commandlinefrontend.h
+++ b/src/app/qbs/commandlinefrontend.h
@@ -106,21 +106,21 @@ private:
QString buildDirectory(const QString &profileName) const;
const CommandLineParser &m_parser;
- Settings * const m_settings;
+ Settings * const m_settings = nullptr;
QList<AbstractJob *> m_resolveJobs;
QList<AbstractJob *> m_buildJobs;
QList<Project> m_projects;
- ConsoleProgressObserver *m_observer;
+ ConsoleProgressObserver *m_observer = nullptr;
enum CancelStatus { CancelStatusNone, CancelStatusRequested, CancelStatusCanceling };
- CancelStatus m_cancelStatus;
- QTimer * const m_cancelTimer;
+ CancelStatus m_cancelStatus = CancelStatus::CancelStatusNone;
+ QTimer * const m_cancelTimer = nullptr;
- int m_buildEffortsNeeded;
- int m_buildEffortsRetrieved;
- int m_totalBuildEffort;
- int m_currentBuildEffort;
+ int m_buildEffortsNeeded = 0;
+ int m_buildEffortsRetrieved = 0;
+ int m_totalBuildEffort = 0;
+ int m_currentBuildEffort = 0;
QHash<AbstractJob *, int> m_buildEfforts;
std::shared_ptr<ProjectGenerator> m_generator;
};
diff --git a/src/app/qbs/qbstool.h b/src/app/qbs/qbstool.h
index c1d7f75d8..e6d230361 100644
--- a/src/app/qbs/qbstool.h
+++ b/src/app/qbs/qbstool.h
@@ -57,8 +57,8 @@ public:
int *exitCode = 0);
private:
- bool m_failedToStart;
- int m_exitCode;
+ bool m_failedToStart = false;
+ int m_exitCode = 0;
QString m_stdout;
QString m_stderr;
};