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.
This commit is contained in:
Dan Williams
2017-12-05 21:36:54 -05:00
committed by Tres Finocchiaro
parent dd4a73eb4b
commit 45d6b299ef

View File

@@ -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 );