You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of an improvement request than a bug which relates to the Main Executor for Qt.
Improvement Description
Currently Main Executor uses #include <QApplication> at Line 37.
For QApplication to be available a project must be built with QT += widgets inside the .pro which might not be the case for console or qml front ended applications.
Requested Change
The required functionality from QApplication can actually be found in QCoreApplication which is further up QApplication's inheritance hierarchy. QCoreApplication does not need widgets specified on the Qt project file.
The include and usages could become:
Line 37: #include <QCoreApplication
Line 85: _receiver->moveToThread(QCoreApplication::instance()->thread());
Line 114: QCoreApplication::postEvent(event->receiver(), event.release());
I'm not sure if the use of widgets requires extra libs to be bundled for runtime, but this change might make it easier to include stlabs concurrency in all types of qt projects that don't necessarily need widgets.
I'm not sure if there's any side effects to these changes, perhaps others have some comments?
Thanks!
The text was updated successfully, but these errors were encountered:
This is more of an improvement request than a bug which relates to the Main Executor for Qt.
Improvement Description
Currently Main Executor uses
#include <QApplication>
at Line 37.For
QApplication
to be available a project must be built withQT += widgets
inside the.pro
which might not be the case for console or qml front ended applications.Requested Change
The required functionality from
QApplication
can actually be found inQCoreApplication
which is further upQApplication
's inheritance hierarchy.QCoreApplication
does not needwidgets
specified on the Qt project file.The include and usages could become:
Line 37:
#include <QCoreApplication
Line 85:
_receiver->moveToThread(QCoreApplication::instance()->thread());
Line 114:
QCoreApplication::postEvent(event->receiver(), event.release());
I'm not sure if the use of
widgets
requires extra libs to be bundled for runtime, but this change might make it easier to include stlabs concurrency in all types of qt projects that don't necessarily needwidgets
.I'm not sure if there's any side effects to these changes, perhaps others have some comments?
Thanks!
The text was updated successfully, but these errors were encountered: