From ba692c61d8939d2f7ef7c76f08dfa5ccdc084311 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sun, 6 Nov 2011 01:21:38 +0200 Subject: fixed icon hiding on exit fixed icon path (also, should be in skin directory instead of root) --- client/ProxyClientApp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 client/ProxyClientApp.cpp (limited to 'client/ProxyClientApp.cpp') diff --git a/client/ProxyClientApp.cpp b/client/ProxyClientApp.cpp old mode 100644 new mode 100755 index 418fe6a..bbdce0f --- a/client/ProxyClientApp.cpp +++ b/client/ProxyClientApp.cpp @@ -25,8 +25,9 @@ ProxyClientApp::ProxyClientApp(int &argc, char *argv[]): QApplication(argc, argv trayMenu->addAction(showAction); trayMenu->addAction(quitAction); - QIcon *icon = new QIcon(QCoreApplication::applicationDirPath() + "/icon.png"); - QSystemTrayIcon *trayIcon = new QSystemTrayIcon(*icon); +// QIcon *icon = new QIcon(QCoreApplication::applicationDirPath() + "/icon.png"); //does not work %) + QIcon *icon = new QIcon(this_app->applicationDirPath() + "/icon.png"); + trayIcon = new QSystemTrayIcon(*icon); connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayActivated(QSystemTrayIcon::ActivationReason))); trayIcon->setContextMenu(trayMenu); @@ -54,5 +55,6 @@ void ProxyClientApp::showProxyDialog() void ProxyClientApp::quitApp() { Logger::Info("Terminating\n"); + trayIcon->hide(); QApplication::exit(0); } -- cgit v1.2.3