ports/audio/lmms/files/patch-src_gui_MainApplication.cpp
Rodrigo Osorio 8827164af8 audio/lmms: Fix issue caused by kwidgetsaddons
Add temporary patch to fix a crash at startup if kwidgetsaddons
5.101.0 is installed. The patch was obtained from LMMS ticket
related with this issue[1].

[1] https://github.com/LMMS/lmms/issues/6587

Since I'm here reorder Makefile to make linters happy.

PR:		270470
Reported by:	Manuel <gnuandbsdguy@gmail.com>
MFH:	    2023Q2
2023-06-17 18:42:06 +02:00

21 lines
640 B
C++

--- src/gui/MainApplication.cpp.orig 2023-06-17 16:02:33 UTC
+++ src/gui/MainApplication.cpp
@@ -35,6 +35,18 @@
QApplication(argc, argv),
m_queuedFile()
{
+#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_APPLE) && !defined(LMMS_BUILD_HAIKU) && QT_VERSION >= 0x050000
+ // Work around a bug of KXmlGui < 5.55
+ // which breaks the recent files menu
+ // https://bugs.kde.org/show_bug.cgi?id=337491
+ for (auto child : children())
+ {
+ if (child->inherits("KCheckAcceleratorsInitializer"))
+ {
+ delete child;
+ }
+ }
+#endif
#if defined(LMMS_BUILD_WIN32) && QT_VERSION >= 0x050000
installNativeEventFilter(this);
#endif