diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-06-06 10:29:13 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2017-06-06 09:41:33 +0000 |
commit | b0e4f2a5322a61636ceb9b856c04c55c97e2c6a8 (patch) | |
tree | 7a97da3148dc1a2f9bef1d4c4e20844f542efa9a | |
parent | afd520c94c784e1f680f938d38ca36ebf0ec0907 (diff) |
Revert "Modernize EvaluatorScriptClass::QueryResult"
This reverts commit 8f525a7c5ecc185eff69cc739f78b419c0cb2d3a.
Absurdly, the C++ standard forbids const objects of classes
that don't have a user-provided default constructor. Maybe
they forgot that non-static member initialization exists...
Change-Id: I4c7bb01bc0f89ab2c5afcc1ffe12c7e0ae977429
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | src/lib/corelib/language/evaluatorscriptclass.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/corelib/language/evaluatorscriptclass.h b/src/lib/corelib/language/evaluatorscriptclass.h index 3467f3967..c6c16cf44 100644 --- a/src/lib/corelib/language/evaluatorscriptclass.h +++ b/src/lib/corelib/language/evaluatorscriptclass.h @@ -85,6 +85,10 @@ private: struct QueryResult { + QueryResult() + : data(0), itemOfProperty(0) + {} + bool isNull() const { static const QueryResult pristine; @@ -100,8 +104,8 @@ private: } bool foundInParent = false; - const EvaluationData *data = nullptr; - const Item *itemOfProperty = nullptr; // The item that owns the property. + const EvaluationData *data; + const Item *itemOfProperty; // The item that owns the property. ValuePtr value; }; QueryResult m_queryResult; |