blob: fa9d1f6d41a7d0e8e866015357644565df1caac2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
https://bugs.kde.org/show_bug.cgi?id=525727
https://codereview.qt-project.org/c/qt/qtdeclarative/+/777121
--- a/src/quick/util/qquickpixmapcache.cpp
+++ b/src/quick/util/qquickpixmapcache.cpp
@@ -262,5 +262,4 @@
return runLoopReaderThreadExecutionEnforcer;
}
- QObject *eventLoopQuitHack;
QMutex mutex;
ReaderThreadExecutionEnforcer *runLoopReaderThreadExecutionEnforcer = nullptr;
@@ -607,7 +606,4 @@
Q_DETACH_THREAD_AFFINITY_MARKER(m_readerThreadAffinityMarker);
#if QT_CONFIG(quick_pixmap_cache_threaded_download)
- eventLoopQuitHack = new QObject;
- eventLoopQuitHack->moveToThread(this);
- QObject::connect(eventLoopQuitHack, &QObject::destroyed, this, &QThread::quit, Qt::DirectConnection);
start(QThread::LowestPriority);
#else
@@ -657,9 +653,5 @@
#if QT_CONFIG(quick_pixmap_cache_threaded_download)
- // ... schedule stopping of this thread via the eventLoopQuitHack (processJobs scheduled above
- // will run first) ...
- eventLoopQuitHack->deleteLater();
- // ... and wait() for it all to finish, as the thread will only quit after eventLoopQuitHack
- // has been deleted.
+ quit();
wait();
#endif
|