Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main Executor requires "widgets" to be dragged into Qt build. #168

Closed
Kasheen opened this issue Jul 19, 2018 · 2 comments
Closed

Main Executor requires "widgets" to be dragged into Qt build. #168

Kasheen opened this issue Jul 19, 2018 · 2 comments

Comments

@Kasheen
Copy link

Kasheen commented Jul 19, 2018

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!

@FelixPetriconi
Copy link
Member

Good point. I will change in beside the other fixes soon.

@FelixPetriconi
Copy link
Member

Fixed in 1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants