Skip to content

Commit

Permalink
Workaround Qt5 bug that fails to remove separator at end of menu.
Browse files Browse the repository at this point in the history
When the Quit menu item is relocated to Application Menu on
Mac OS X / macOS the separator above it should be removed. While
Qt4 removes the separator, Qt5 does not remove the separator.

For details see:
 * <LMMS#3345>
 * <https://bugreports.qt.io/browse/QTBUG-40071>
  • Loading branch information
follower committed Feb 13, 2017
1 parent e6b5712 commit a366f73
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,16 @@ void MainWindow::finalize()
SLOT( exportProjectMidi() ),
Qt::CTRL + Qt::Key_M );*/

//
// Conditional compilation to workaround Qt5 bug that fails to remove
// separator at end of menu when the Quit menu item is relocated to
// Application Menu on Mac OS X / macOS. For details see:
// * <https://github.com/LMMS/lmms/issues/3345>
// * <https://bugreports.qt.io/browse/QTBUG-40071>
//
#if !(defined(LMMS_BUILD_APPLE) && (QT_VERSION >= 0x050000))
project_menu->addSeparator();
#endif
project_menu->addAction( embed::getIconPixmap( "exit" ), tr( "&Quit" ),
qApp, SLOT( closeAllWindows() ),
Qt::CTRL + Qt::Key_Q );
Expand Down

0 comments on commit a366f73

Please sign in to comment.