diff --git a/samples/blackcore/main.cpp b/samples/blackcore/main.cpp index 4f9f371be..e01e9dd1c 100644 --- a/samples/blackcore/main.cpp +++ b/samples/blackcore/main.cpp @@ -8,10 +8,10 @@ #include "blackcore/context_settings.h" #include "tool.h" #include - #include #include - +#include +#include /*! * DBus tests, tests marshalling / unmarshalling of many value classes. @@ -20,7 +20,9 @@ int main(int argc, char *argv[]) { // metadata are registered in runtime - QCoreApplication a(argc, argv); + QApplication a(argc, argv); // not QCoreApplication because of icon, http://qt-project.org/forums/viewthread/15412 + QIcon icon(":/blackcore/icons/tower.png"); + QApplication::setWindowIcon(icon); BlackCore::CRuntime *core = new BlackCore::CRuntime(BlackCore::CRuntimeConfig::forCore(), &a); QtConcurrent::run(BlackMiscTest::Tool::serverLoop, core); // QFuture future qDebug() << "Server event loop, pid:" << BlackMiscTest::Tool::getPid(); diff --git a/samples/blackcore/sample_blackcore.pro b/samples/blackcore/sample_blackcore.pro index 9191588b8..e2b01faa2 100644 --- a/samples/blackcore/sample_blackcore.pro +++ b/samples/blackcore/sample_blackcore.pro @@ -1,7 +1,9 @@ include (../../config.pri) include (../../build.pri) -QT += core dbus network xml multimedia +# widgets required for icon +QT += core dbus network xml multimedia gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = sample_blackcore TEMPLATE = app