don't crash on incoming notifications

this needs to be a QApplication as it uses widgets
This commit is contained in:
Lukáš Tinkl 2014-11-10 15:52:02 +01:00
parent 809c1238cf
commit 58cfa83bcc

View file

@ -24,7 +24,7 @@
#include <unistd.h> #include <unistd.h>
#include <QSocketNotifier> #include <QSocketNotifier>
#include <QGuiApplication> #include <QApplication>
#include <KDBusService> #include <KDBusService>
@ -59,11 +59,10 @@ void initializeTermHandlers(QCoreApplication* app, Daemon* daemon)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
QCoreApplication::setApplicationName("kdeconnect"); QApplication app(argc, argv);
QCoreApplication::setApplicationVersion("0.1"); app.setApplicationName("kdeconnect");
QCoreApplication::setOrganizationDomain("kde.org"); app.setApplicationVersion("0.1");
app.setOrganizationDomain("kde.org");
QGuiApplication app(argc, argv);
app.setQuitOnLastWindowClosed(false); app.setQuitOnLastWindowClosed(false);
KDBusService dbusService(KDBusService::Unique); KDBusService dbusService(KDBusService::Unique);