Replace deprecated function qt_mac_set_dock_menu() by method
QMenu::setAsDockMenu(). --HG-- branch : develop
This commit is contained in:
parent
4ed5fd9329
commit
915276748c
|
@ -138,12 +138,14 @@ TMainWindow::TMainWindow(QWidget *parent)
|
|||
|
||||
ui->pushButtonShowInExplorer->setText(tr("Show in Finder"));
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 2)
|
||||
// Mac OS Dock Menu
|
||||
QMenu *menu = new QMenu(this);
|
||||
connect(menu, &QMenu::aboutToShow, this, &TMainWindow::AboutToShowDockMenu);
|
||||
AboutToShowDockMenu();
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
|
||||
menu->setAsDockMenu();
|
||||
#else
|
||||
extern void qt_mac_set_dock_menu(QMenu *);
|
||||
qt_mac_set_dock_menu(menu);
|
||||
#endif
|
||||
|
|
|
@ -204,7 +204,6 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
|
||||
setUnifiedTitleAndToolBarOnMac(true);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 2)
|
||||
// Mac OS Dock Menu
|
||||
QMenu *menu = new QMenu(this);
|
||||
|
||||
|
@ -224,6 +223,9 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
actionPreferences->setMenuRole(QAction::NoRole);
|
||||
connect(actionPreferences, &QAction::triggered, this, &MainWindow::Preferences);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
|
||||
menu->setAsDockMenu();
|
||||
#else
|
||||
extern void qt_mac_set_dock_menu(QMenu *);
|
||||
qt_mac_set_dock_menu(menu);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user