mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-10 05:55:33 +08:00
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.
This commit is contained in:
@@ -29,8 +29,8 @@ BlackD::BlackD(QWidget *parent) :
|
||||
createActions();
|
||||
createTrayIcon();
|
||||
|
||||
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
|
||||
this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
|
||||
connect(trayIcon, &QSystemTrayIcon::activated,
|
||||
this, &BlackD::iconActivated);
|
||||
|
||||
setWindowTitle(tr("BlackD"));
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
//! 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>
|
||||
@@ -17,6 +18,8 @@ int main(int argc, char *argv[])
|
||||
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 "
|
||||
|
||||
Reference in New Issue
Block a user