Skip to content

Commit

Permalink
Workaround Qt5 bug that fails to remove separator at end of File/Help…
Browse files Browse the repository at this point in the history
… menus (LMMS#3350)

Prevent dangling separator at end of menus on macOS

Per https://bugreports.qt.io/browse/QTBUG-40071
  • Loading branch information
follower authored and tresf committed Feb 19, 2017
1 parent acce3b2 commit f7620d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,10 @@ void MainWindow::finalize()
SLOT( exportProjectMidi() ),
Qt::CTRL + Qt::Key_M );*/

// Prevent dangling separator at end of menu per https://bugreports.qt.io/browse/QTBUG-40071
#if !(defined(LMMS_BUILD_APPLE) && (QT_VERSION >= 0x050000) && (QT_VERSION < 0x050600))
project_menu->addSeparator();
#endif
project_menu->addAction( embed::getIconPixmap( "exit" ), tr( "&Quit" ),
qApp, SLOT( closeAllWindows() ),
Qt::CTRL + Qt::Key_Q );
Expand Down Expand Up @@ -390,7 +393,10 @@ void MainWindow::finalize()
tr( "What's This?" ),
this, SLOT( enterWhatsThisMode() ) );

// Prevent dangling separator at end of menu per https://bugreports.qt.io/browse/QTBUG-40071
#if !(defined(LMMS_BUILD_APPLE) && (QT_VERSION >= 0x050000) && (QT_VERSION < 0x050600))
help_menu->addSeparator();
#endif
help_menu->addAction( embed::getIconPixmap( "icon" ), tr( "About" ),
this, SLOT( aboutLMMS() ) );

Expand Down

0 comments on commit f7620d1

Please sign in to comment.