# HG changeset patch # User Chris Cannam # Date 1409584353 -3600 # Node ID cfe684675e8178821220915c16aa78137424d2c8 # Parent 43c61fd6fea492fa55fff86d630f0322cdc8c920 Workaround for disappearing menubar under Ubuntu diff -r 43c61fd6fea4 -r cfe684675e81 easyhg.pro --- a/easyhg.pro Fri Mar 01 09:20:11 2013 +0000 +++ b/easyhg.pro Mon Sep 01 16:12:33 2014 +0100 @@ -4,8 +4,8 @@ TEMPLATE = app TARGET = EasyMercurial -#QT += widgets -#QMAKE_CXXFLAGS += -DQT_DISABLE_DEPRECATED_BEFORE=0x000000 +QT += widgets +QMAKE_CXXFLAGS += -DQT_DISABLE_DEPRECATED_BEFORE=0x000000 # We use the 10.5 SDK and Carbon for all 32-bit OS/X, # and 10.6 with Cocoa for all 64-bit. (Since EasyHg 1.2, diff -r 43c61fd6fea4 -r cfe684675e81 src/mainwindow.cpp --- a/src/mainwindow.cpp Fri Mar 01 09:20:11 2013 +0000 +++ b/src/mainwindow.cpp Mon Sep 01 16:12:33 2014 +0100 @@ -3048,6 +3048,16 @@ void MainWindow::createMenus() { +#ifdef Q_OS_LINUX + // In Ubuntu 14.04 the window's menu bar goes missing entirely if + // the user is running any desktop environment other than Unity + // (in which the faux single-menubar appears). The user has a + // workaround, to remove the appmenu-qt5 package, but that is + // awkward and the problem is so severe that it merits disabling + // the system menubar integration altogether. Like this: + menuBar()->setNativeMenuBar(false); +#endif + m_fileMenu = menuBar()->addMenu(tr("&File")); m_fileMenu->addAction(m_openAct);