Commit c024051e authored by Victor Yacovlev's avatar Victor Yacovlev

Qt5 headless async event processing fix

parent eab09cca
......@@ -1493,10 +1493,14 @@ private:
, asyncRunThread_(nullptr)
, settingsPage_(nullptr)
{
bool hasGuiThread = true;
#ifdef Q_OS_LINUX
hasGuiThread = getenv("DISPLAY") != 0;
#endif
QObject::connect(
this, SIGNAL(asyncRun(quint32,QVariantList)),
this, SLOT(asyncEvaluate(quint32,QVariantList)),
Qt::QueuedConnection
hasGuiThread? Qt::QueuedConnection : Qt::DirectConnection
);
}
""" % (self.class_name, self.class_name)
......
......@@ -78,6 +78,7 @@ AnyValue ExternalModuleCallFunctor::operator ()
}
if (actor->evaluate(qAlgKey, arguments)==Shared::ES_Async) {
qApp->processEvents();
// Wait for actor thread to finish
forever {
bool done = false;
......
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