Commit 48e5892f authored by Milian Wolff's avatar Milian Wolff

Actually cleanup the duchain from the background thread

Turns out that my commit bf183ce7 from May 2017 moved the
background cleanup task into the foreground thread... Sorry for that!

When we connect to the timer event, we must use a context object
that lives within the background thread. The thread itself *does not*
live in itself!

Fix this by passing the timer itself as context and
add an assertion to verify we don't ever do this again.

BUG: 388743
parent b8b266d1
......@@ -276,7 +276,8 @@ class DUChainPrivate
void run() override {
QTimer timer;
connect(&timer, &QTimer::timeout, this, [this]() {
connect(&timer, &QTimer::timeout, &timer, [this]() {
Q_ASSERT(QThread::currentThread() == this);
//Just to make sure the cache is cleared periodically
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment