qt: restore icon dock menu
This was removed by 25c0cce7f
. It was apparently removed in qt5, but
may return for 5.1.
This commit is contained in:
parent
03b6a1cee4
commit
871ac375bd
1 changed files with 7 additions and 1 deletions
|
@ -8,6 +8,10 @@
|
||||||
#undef slots
|
#undef slots
|
||||||
#include <Cocoa/Cocoa.h>
|
#include <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
|
extern void qt_mac_set_dock_menu(QMenu *);
|
||||||
|
#endif
|
||||||
|
|
||||||
@interface DockIconClickEventHandler : NSObject
|
@interface DockIconClickEventHandler : NSObject
|
||||||
{
|
{
|
||||||
MacDockIconHandler* dockIconHandler;
|
MacDockIconHandler* dockIconHandler;
|
||||||
|
@ -52,7 +56,9 @@ MacDockIconHandler::MacDockIconHandler() : QObject()
|
||||||
this->m_dummyWidget = new QWidget();
|
this->m_dummyWidget = new QWidget();
|
||||||
this->m_dockMenu = new QMenu(this->m_dummyWidget);
|
this->m_dockMenu = new QMenu(this->m_dummyWidget);
|
||||||
this->setMainWindow(NULL);
|
this->setMainWindow(NULL);
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
|
qt_mac_set_dock_menu(this->m_dockMenu);
|
||||||
|
#endif
|
||||||
[pool release];
|
[pool release];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue