[education/rkward] rkward/rbackend: Fix for old versions of qt

Thomas Friedrichsmeier null at kde.org
Mon Oct 3 18:58:54 BST 2022


Git commit 291f022e22d642ad0b835432d2c7c24e5ec56ff3 by Thomas Friedrichsmeier.
Committed on 03/10/2022 at 17:58.
Pushed by tfry into branch 'master'.

Fix for old versions of qt

M  +4    -0    rkward/rbackend/rkrbackendprotocol_frontend.cpp

https://invent.kde.org/education/rkward/commit/291f022e22d642ad0b835432d2c7c24e5ec56ff3

diff --git a/rkward/rbackend/rkrbackendprotocol_frontend.cpp b/rkward/rbackend/rkrbackendprotocol_frontend.cpp
index f9630f0f..7181f1b5 100644
--- a/rkward/rbackend/rkrbackendprotocol_frontend.cpp
+++ b/rkward/rbackend/rkrbackendprotocol_frontend.cpp
@@ -31,7 +31,11 @@ RKRBackendProtocolFrontend::~RKRBackendProtocolFrontend () {
 	RK_ASSERT(_instance == this);
 	terminateBackend ();
 	RKFrontendTransmitter::instance ()->wait(1000);  // Wait for thread to catch the backend's exit request, and exit()
+#if QT_VERSION > QT_VERSION_CHECK(5, 10, 0)
 	QMetaObject::invokeMethod(RKFrontendTransmitter::instance(), &RKFrontendTransmitter::quit, Qt::QueuedConnection);  // tell it to quit, otherwise
+#else
+	QMetaObject::invokeMethod(RKFrontendTransmitter::instance(), "quit", Qt::QueuedConnection);
+#endif
 	RKFrontendTransmitter::instance ()->wait(3000);  // Wait for thread to quit and clean up.
 	qApp->processEvents(QEventLoop::AllEvents, 500); // Not strictly needed, but avoids some mem leaks on exit by handling all posted BackendExit events
 	delete RKFrontendTransmitter::instance ();


More information about the rkward-tracker mailing list