diff options
| author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-06-01 13:32:23 +0200 |
|---|---|---|
| committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-06-01 13:33:21 +0000 |
| commit | 39dea0979463fa834d99b76c6d286c0cb045f4d3 (patch) | |
| tree | 922b7138accebdd5df533f61c730cfb0aa0adea3 /src/plugins/cppeditor/cppinsertvirtualmethods.cpp | |
| parent | a3a62e78f7378182138555936b45a885865c00ad (diff) | |
| download | qt-creator-39dea0979463fa834d99b76c6d286c0cb045f4d3.tar.gz | |
CppEditor: Fix uninitialized value warnings
...from coverity scan.
Change-Id: I1b1fb919e77f1407fe2e4319392c28413a296493
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cppinsertvirtualmethods.cpp')
| -rw-r--r-- | src/plugins/cppeditor/cppinsertvirtualmethods.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/plugins/cppeditor/cppinsertvirtualmethods.cpp b/src/plugins/cppeditor/cppinsertvirtualmethods.cpp index cc97d5282d..2d898353b2 100644 --- a/src/plugins/cppeditor/cppinsertvirtualmethods.cpp +++ b/src/plugins/cppeditor/cppinsertvirtualmethods.cpp @@ -197,12 +197,12 @@ public: Qt::ItemFlags flags() const; Qt::CheckState checkState() const { return checked ? Qt::Checked : Qt::Unchecked; } - const Function *function; - InsertionPointLocator::AccessSpec accessSpec; - bool reimplemented; - bool alreadyFound; - bool checked; - FunctionItem *nextOverride; + const Function *function = nullptr; + InsertionPointLocator::AccessSpec accessSpec = InsertionPointLocator::Invalid; + bool reimplemented = false; + bool alreadyFound = false; + bool checked = false; + FunctionItem *nextOverride = nullptr; private: QString name; @@ -256,9 +256,6 @@ void ClassItem::removeFunction(int row) FunctionItem::FunctionItem(const Function *func, const QString &functionName, ClassItem *parent) : InsertVirtualMethodsItem(parent), function(func), - reimplemented(false), - alreadyFound(false), - checked(false), nextOverride(this) { name = functionName; |
