summaryrefslogtreecommitdiffhomepage
path: root/compat/run-in-thread.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-24 22:45:38 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-12-24 22:45:38 +0100
commit323dd162f5326b998e1c92ab4cfec8a63574023f (patch)
treefb4f0f4f7585d3cb90aef453167c7f4df0c6eeee /compat/run-in-thread.hpp
parent3981f867377ca0652d0cc0ababbbc30208db7e1c (diff)
cmake: decruft, disable deprecated Qt functions
Diffstat (limited to 'compat/run-in-thread.hpp')
-rw-r--r--compat/run-in-thread.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/compat/run-in-thread.hpp b/compat/run-in-thread.hpp
index afe279f2..6aadab45 100644
--- a/compat/run-in-thread.hpp
+++ b/compat/run-in-thread.hpp
@@ -108,8 +108,8 @@ template<typename F>
void run_in_thread_async(QObject* obj, F&& fun)
{
QObject src;
- QThread* t(obj->thread());
- assert(t);
+ QThread* t = obj->thread();
+ if (!t) abort();
src.moveToThread(t);
QObject::connect(&src, &QObject::destroyed, obj, std::move(fun), Qt::AutoConnection);
}