aboutsummaryrefslogtreecommitdiff
path: root/src/qt/macdockiconhandler.h
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2018-10-31 21:15:31 +0200
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-12-30 11:21:15 +0000
commit90347141bdb4020875c55ff51375aada46a1a4d9 (patch)
tree50077c9665f71979aa9b7bc0d0d0cb707b940932 /src/qt/macdockiconhandler.h
parent4d4bc37df983a8c8bb7a2d926521836e4ce8c913 (diff)
downloadbitcoin-90347141bdb4020875c55ff51375aada46a1a4d9.tar.xz
Use Qt signal for macOS Dock icon click event
This moves the Dock icon click reaction code to the common place and allows some cleanup in obj_c code. According to the Apple's docs `class_replaceMethod` behaves as `class_addMethod`, if the method identified by name does not yet exist; or as `method_setImplementation`, if it does exist. Github-Pull: #14597 Rebased-From: 2464925e7be832d4926b6204169bbbc1646c6368
Diffstat (limited to 'src/qt/macdockiconhandler.h')
-rw-r--r--src/qt/macdockiconhandler.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/qt/macdockiconhandler.h b/src/qt/macdockiconhandler.h
index 34095ce073..ea77cdf054 100644
--- a/src/qt/macdockiconhandler.h
+++ b/src/qt/macdockiconhandler.h
@@ -1,11 +1,10 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_QT_MACDOCKICONHANDLER_H
#define BITCOIN_QT_MACDOCKICONHANDLER_H
-#include <QMainWindow>
#include <QObject>
QT_BEGIN_NAMESPACE
@@ -13,7 +12,7 @@ class QMenu;
class QWidget;
QT_END_NAMESPACE
-/** Macintosh-specific dock icon handler.
+/** macOS-specific Dock icon handler.
*/
class MacDockIconHandler : public QObject
{
@@ -23,10 +22,8 @@ public:
~MacDockIconHandler();
QMenu *dockMenu();
- void setMainWindow(QMainWindow *window);
static MacDockIconHandler *instance();
static void cleanup();
- void handleDockIconClickEvent();
Q_SIGNALS:
void dockIconClicked();
@@ -36,7 +33,6 @@ private:
QWidget *m_dummyWidget;
QMenu *m_dockMenu;
- QMainWindow *mainWindow;
};
#endif // BITCOIN_QT_MACDOCKICONHANDLER_H