Defer loading .rdc from drag & drop, to unblock the calling application

This commit is contained in:
baldurk
2017-11-10 16:43:14 +00:00
parent 136909eaad
commit 82e1218b62
3 changed files with 13 additions and 1 deletions
+5
View File
@@ -372,6 +372,11 @@ void GUIInvoke::call(const std::function<void()> &f)
return;
}
defer(f);
}
void GUIInvoke::defer(const std::function<void()> &f)
{
GUIInvoke *invoke = new GUIInvoke(f);
invoke->moveToThread(qApp->thread());
invoke->metaObject()->method(methodIndex).invoke(invoke, Qt::QueuedConnection);