Skip to content

Commit

Permalink
Fix a crash (#4037)
Browse files Browse the repository at this point in the history
This code loads a Qt5 library, which will cause problems if done from a Qt4 application. If the application is Qt4 based we don't have a bug with kde changing the menus anyway, so we can skip this code.
  • Loading branch information
BumblingCoder authored and tresf committed Dec 6, 2017
1 parent dd4a73e commit 45d6b29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

#include "lmmsversion.h"

#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BULID_APPLE) && !defined(LMMS_BUILD_HAIKU)
#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BULID_APPLE) && !defined(LMMS_BUILD_HAIKU) && QT_VERSION >= 0x050000
//Work around an issue on KDE5 as per https://bugs.kde.org/show_bug.cgi?id=337491#c21
void disableAutoKeyAccelerators(QWidget* mainWindow)
{
Expand All @@ -92,7 +92,7 @@ MainWindow::MainWindow() :
m_metronomeToggle( 0 ),
m_session( Normal )
{
#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BULID_APPLE) && !defined(LMMS_BUILD_HAIKU)
#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BULID_APPLE) && !defined(LMMS_BUILD_HAIKU) && QT_VERSION >= 0x050000
disableAutoKeyAccelerators(this);
#endif
setAttribute( Qt::WA_DeleteOnClose );
Expand Down

0 comments on commit 45d6b29

Please sign in to comment.