diff --git a/src/plugins/autotest/qtest/qttestvisitors.h b/src/plugins/autotest/qtest/qttestvisitors.h index 608008750dc..756ba17b9e2 100644 --- a/src/plugins/autotest/qtest/qttestvisitors.h +++ b/src/plugins/autotest/qtest/qttestvisitors.h @@ -34,7 +34,7 @@ public: private: CppEditor::SymbolFinder m_symbolFinder; QString m_className; - CPlusPlus::Snapshot m_snapshot; + const CPlusPlus::Snapshot &m_snapshot; QMap m_privSlots; bool m_valid = false; bool m_inherited = false; @@ -55,7 +55,7 @@ private: QStringList m_classNames; CPlusPlus::Scope *m_currentScope = nullptr; CPlusPlus::Document::Ptr m_currentDoc; - CPlusPlus::Snapshot m_snapshot; + const CPlusPlus::Snapshot &m_snapshot; }; class TestDataFunctionVisitor : public CPlusPlus::ASTVisitor diff --git a/src/plugins/autotest/quick/quicktestvisitors.h b/src/plugins/autotest/quick/quicktestvisitors.h index 71d4b91496f..58dae69e921 100644 --- a/src/plugins/autotest/quick/quicktestvisitors.h +++ b/src/plugins/autotest/quick/quicktestvisitors.h @@ -45,7 +45,7 @@ public: private: QmlJS::Document::Ptr m_currentDoc; - QmlJS::Snapshot m_snapshot; + const QmlJS::Snapshot &m_snapshot; QStack m_caseParseStack; QVector m_testCases; QStack m_objectIsTestStack; @@ -64,7 +64,7 @@ public: private: QString m_testBaseName; CPlusPlus::Document::Ptr m_currentDoc; - CPlusPlus::Snapshot m_snapshot; + const CPlusPlus::Snapshot &m_snapshot; }; } // namespace Internal