From 45d6b299effa20d7ee5a65cfa2f66ac4a350ca33 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 5 Dec 2017 21:36:54 -0500 Subject: [PATCH] Fix a crash (#4037) 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. --- src/gui/MainWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 32d16546b1b..78e5f90edcf 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -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) { @@ -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 );