From fdf79f0234792c3225779ef0bbed8fe4866266d3 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 10 Jul 2023 15:53:38 +0200 Subject: [PATCH] AutoTest: Avoid crash on concurrent access Partially reverts 91bdbb61eccdde5e1c228281f7335685b22aa7f6 as the symbol lookup will update the snapshot's cache. As there are concurrent threads accessing the snapshot we may end up in a crash. Change-Id: I2aaf5e403b10cba2b26915cbe7b4712c43c4957b Reviewed-by: Marcus Tillmanns --- src/plugins/autotest/qtest/qttestvisitors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/autotest/qtest/qttestvisitors.h b/src/plugins/autotest/qtest/qttestvisitors.h index 756ba17b9e2..dc18914b544 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; - const CPlusPlus::Snapshot &m_snapshot; + CPlusPlus::Snapshot m_snapshot; QMap m_privSlots; bool m_valid = false; bool m_inherited = false;