[education/rkward] rkward/misc: Seems the backwards compatible variant of the fix does not fix the issue...

Thomas Friedrichsmeier null at kde.org
Fri Jul 1 23:59:31 BST 2022


Git commit e348d62792b3e6a6ede19eafbf0412d02a42a0b6 by Thomas Friedrichsmeier.
Committed on 01/07/2022 at 22:58.
Pushed by tfry into branch 'master'.

Seems the backwards compatible variant of the fix does not fix the issue...

Add a version check for now, to at least allow experimenting with the fix.

M  +5    -0    rkward/misc/rkxmlguipreviewarea.cpp

https://invent.kde.org/education/rkward/commit/e348d62792b3e6a6ede19eafbf0412d02a42a0b6

diff --git a/rkward/misc/rkxmlguipreviewarea.cpp b/rkward/misc/rkxmlguipreviewarea.cpp
index 70f682b1..09774d7d 100644
--- a/rkward/misc/rkxmlguipreviewarea.cpp
+++ b/rkward/misc/rkxmlguipreviewarea.cpp
@@ -17,6 +17,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include <QDomElement>
 
 #include <kxmlguifactory.h>
+#include <kxmlgui_version.h>
 #include <ktoolbar.h>
 #include <KLocalizedString>
 
@@ -59,7 +60,11 @@ RKXMLGUIPreviewArea::RKXMLGUIPreviewArea (const QString &label, QWidget* parent)
 	wrapper_widget = nullptr;
 	current = nullptr;
 	internal_layout = new QVBoxLayout(this);
+#if KXMLGUI_VERSION < QT_VERSION_CHECK(5, 80, 0)  // guestimate, earlier cutoff may be more correct
 	factory = new KXMLGUIFactory(new RKXMLGUIPreviewBuilder(this, new QMenuBar(this)), this);
+#else
+	factory = new KXMLGUIFactory(new KXMLGUIBuilder(this), this);
+#endif
 }
 
 RKXMLGUIPreviewArea::~RKXMLGUIPreviewArea () {


More information about the rkward-tracker mailing list