AutoTest: Avoid some snapshot copies

Change-Id: Idc57027029c0f399a031bc716b9cba731cb34590
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2023-07-04 07:58:41 +02:00
parent cedd37fc01
commit 91bdbb61ec
2 changed files with 4 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ public:
private:
CppEditor::SymbolFinder m_symbolFinder;
QString m_className;
CPlusPlus::Snapshot m_snapshot;
const CPlusPlus::Snapshot &m_snapshot;
QMap<QString, QtTestCodeLocationAndType> 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

View File

@@ -45,7 +45,7 @@ public:
private:
QmlJS::Document::Ptr m_currentDoc;
QmlJS::Snapshot m_snapshot;
const QmlJS::Snapshot &m_snapshot;
QStack<QuickTestCaseSpec> m_caseParseStack;
QVector<QuickTestCaseSpec> m_testCases;
QStack<bool> 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