osx: Fix missing dock menu with qt5

Qt5 Removed the qt_mac_set_dock_menu function and left no replacement. It was
later re-added and deprecated for backwards-compatibility.

Qt5.2 adds the non-deprecated QMenu::setAsDockMenu(). Use that when possible.

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: c21c74b
This commit is contained in:
Cory Fields 2014-05-29 15:30:46 -04:00 committed by Wladimir J. van der Laan
parent 2f89f4b35d
commit 3a4a66f47e
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6

View File

@ -62,6 +62,8 @@ MacDockIconHandler::MacDockIconHandler() : QObject()
this->setMainWindow(NULL); this->setMainWindow(NULL);
#if QT_VERSION < 0x050000 #if QT_VERSION < 0x050000
qt_mac_set_dock_menu(this->m_dockMenu); qt_mac_set_dock_menu(this->m_dockMenu);
#elif QT_VERSION >= 0x050200
this->m_dockMenu->setAsDockMenu();
#endif #endif
[pool release]; [pool release];
} }