aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/stringtable.cpp
diff options
context:
space:
mode:
authorJarek Kobus <[email protected]>2022-12-07 15:13:48 +0100
committerJarek Kobus <[email protected]>2022-12-07 14:46:24 +0000
commitecf83d667cf4d5c5ea118af508a667d2f4ffe3f0 (patch)
tree3b15029817e3fac0d79faf59bd948b31bdfce5b8 /src/libs/utils/stringtable.cpp
parent9a8d34ecf8a5bc39a555f633cb5b8a878a77d3d3 (diff)
AutoTestUnitTests: Remove TestStringTable scenario
Instead, we should provide tst_StringTable that would run GC, make a sleep inside GC being run in other thread and execute destructor of StringTable in main thread. In this case the test should ensure that destructor of StringTable waits for its internal thread to finish. Amends 7a02b39f265f743879832a8ea5ad48767166cb31 Change-Id: I017b5a8f98b41ef6884c43d319858dcb16f17fba Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/libs/utils/stringtable.cpp')
-rw-r--r--src/libs/utils/stringtable.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/libs/utils/stringtable.cpp b/src/libs/utils/stringtable.cpp
index 90c97d7ba40..f53a1dd2127 100644
--- a/src/libs/utils/stringtable.cpp
+++ b/src/libs/utils/stringtable.cpp
@@ -11,10 +11,9 @@
#include <QSet>
#include <QTimer>
-// FIXME: Re-create in better location?
-//#ifdef WITH_TESTS
-//#include <extensionsystem/pluginmanager.h>
-//#endif
+// FIXME: Provide tst_StringTable that would run GC, make a sleep inside GC being run in other
+// thread and execute destructor of StringTable in main thread. In this case the test should
+// ensure that destructor of StringTable waits for its internal thread to finish.
namespace Utils::StringTable {
@@ -116,13 +115,6 @@ static inline bool isQStringInUse(const QString &string)
void StringTablePrivate::GC(QFutureInterface<void> &futureInterface)
{
-//#ifdef WITH_TESTS
-// if (ExtensionSystem::PluginManager::isScenarioRunning("TestStringTable")) {
-// if (ExtensionSystem::PluginManager::finishScenario())
-// QThread::sleep(5);
-// }
-//#endif
-
int initialSize = 0;
bytesSaved = 0;
QElapsedTimer timer;