diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2021-10-19 14:04:13 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2021-10-19 14:04:13 +0200 |
commit | 579de8ec4eb22c4577bf1cfc8caba47c320506e3 (patch) | |
tree | 59033a668ffe3b5d4ab4a57e74735dd0b0951c80 /options | |
parent | 7e693ad7a6b2ee7c3f5c62a4f9819718b3b8b9f1 (diff) |
options: run reload() handlers in ui thread
Diffstat (limited to 'options')
-rw-r--r-- | options/scoped.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/options/scoped.cpp b/options/scoped.cpp index 9cbc826c..00f30be7 100644 --- a/options/scoped.cpp +++ b/options/scoped.cpp @@ -1,4 +1,5 @@ #include "scoped.hpp" +#include "compat/run-in-thread.hpp" #include <QApplication> #include <QThread> @@ -48,7 +49,12 @@ static bool is_tracker_teardown() opts::~opts() { if (!is_tracker_teardown() && raii) +#if 1 + run_in_thread_sync(qApp->thread(), [this]{ b->reload(); }); +#else + assert(b); b->reload(); +#endif #if 0 else qDebug() << "in teardown, not reloading" << b->name(); |