Files
pilotclient/src/blackd/main.cpp
Roland Winklmeier 6127ac4ef5 Refs #41:
- Changed: Qt5 has a different method to connect signals and slots together based on
C++x11
Migrated the first bunch of occurences to the new method.
- Fixed: CDebug singleton was not created yet in BlackD. Crashed the
  application.
2013-07-06 00:25:46 +02:00

36 lines
1.0 KiB
C++

//! Copyright (C) 2013 Roland Winklmeier
//! This Source Code Form is subject to the terms of the Mozilla Public
//! License, v. 2.0. If a copy of the MPL was not distributed with this
//! file, You can obtain one at http://mozilla.org/MPL/2.0/
#include "blackmisc/context.h"
#include "blackmisc/debug.h"
#include "blackd.h"
#include <QApplication>
#include <QMessageBox>
#include <QtGui>
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(blackd);
QApplication app(argc, argv);
BlackMisc::CApplicationContext myBlackApp;
BlackMisc::IContext::getInstance().setSingleton(new BlackMisc::CDebug());
if (!QSystemTrayIcon::isSystemTrayAvailable()) {
QMessageBox::critical(0, QObject::tr("Systray"),
QObject::tr("I couldn't detect any system tray "
"on this system."));
return 1;
}
QApplication::setQuitOnLastWindowClosed(false);
BlackD w;
w.hide();
return app.exec();
}