diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2012-09-21 19:06:53 +0200 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2012-09-21 19:06:53 +0200 |
commit | 81605d90f53e5ab500f56927f4337bbc7f2d24f8 (patch) | |
tree | ef3fe924376355bee4a4c661698a8d388c7b751d /src/qt/bitcoingui.cpp | |
parent | e96a8c7d86203f463c07d7552190b508ce6c011d (diff) |
enhance Qt5 compatibility
- replace Q_WS_MAC (not supported anymore in Qt5) with Q_OS_MAC (supported
in Qt4/5)
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r-- | src/qt/bitcoingui.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index eeb01d7ec9..19a6a65a1b 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -26,7 +26,7 @@ #include "guiutil.h" #include "rpcconsole.h" -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include "macdockiconhandler.h" #endif @@ -70,7 +70,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): { resize(850, 550); setWindowTitle(tr("Bitcoin") + " - " + tr("Wallet")); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC qApp->setWindowIcon(QIcon(":icons/bitcoin")); setWindowIcon(QIcon(":icons/bitcoin")); #else @@ -183,7 +183,7 @@ BitcoinGUI::~BitcoinGUI() { if(trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu) trayIcon->hide(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC delete appMenuBar; #endif } @@ -276,7 +276,7 @@ void BitcoinGUI::createActions() void BitcoinGUI::createMenuBar() { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC // Create a decoupled menu bar on Mac which stays even if the window is closed appMenuBar = new QMenuBar(); #else @@ -330,7 +330,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) if(clientModel->isTestNet()) { setWindowTitle(windowTitle() + QString(" ") + tr("[testnet]")); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC qApp->setWindowIcon(QIcon(":icons/bitcoin_testnet")); setWindowIcon(QIcon(":icons/bitcoin_testnet")); #else @@ -394,7 +394,7 @@ void BitcoinGUI::setWalletModel(WalletModel *walletModel) void BitcoinGUI::createTrayIcon() { QMenu *trayIconMenu; -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC trayIcon = new QSystemTrayIcon(this); trayIconMenu = new QMenu(this); trayIcon->setContextMenu(trayIconMenu); @@ -420,7 +420,7 @@ void BitcoinGUI::createTrayIcon() trayIconMenu->addSeparator(); trayIconMenu->addAction(optionsAction); trayIconMenu->addAction(openRPCConsoleAction); -#ifndef Q_WS_MAC // This is built-in on Mac +#ifndef Q_OS_MAC // This is built-in on Mac trayIconMenu->addSeparator(); trayIconMenu->addAction(quitAction); #endif @@ -428,7 +428,7 @@ void BitcoinGUI::createTrayIcon() notificator = new Notificator(qApp->applicationName(), trayIcon); } -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC void BitcoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason) { if(reason == QSystemTrayIcon::Trigger) @@ -589,7 +589,7 @@ void BitcoinGUI::error(const QString &title, const QString &message, bool modal) void BitcoinGUI::changeEvent(QEvent *e) { QMainWindow::changeEvent(e); -#ifndef Q_WS_MAC // Ignored on Mac +#ifndef Q_OS_MAC // Ignored on Mac if(e->type() == QEvent::WindowStateChange) { if(clientModel && clientModel->getOptionsModel()->getMinimizeToTray()) @@ -609,7 +609,7 @@ void BitcoinGUI::closeEvent(QCloseEvent *event) { if(clientModel) { -#ifndef Q_WS_MAC // Ignored on Mac +#ifndef Q_OS_MAC // Ignored on Mac if(!clientModel->getOptionsModel()->getMinimizeToTray() && !clientModel->getOptionsModel()->getMinimizeOnClose()) { |