[education/rkward] rkward/autotests: Pointer might get reused

Thomas Friedrichsmeier null at kde.org
Sun Oct 2 18:22:56 BST 2022


Git commit fea396097bba0678d1da7ae77edfb483e79af565 by Thomas Friedrichsmeier.
Committed on 02/10/2022 at 17:22.
Pushed by tfry into branch 'master'.

Pointer might get reused

M  +3    -3    rkward/autotests/core_test.cpp

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

diff --git a/rkward/autotests/core_test.cpp b/rkward/autotests/core_test.cpp
index a1fbcf0a..2857629d 100644
--- a/rkward/autotests/core_test.cpp
+++ b/rkward/autotests/core_test.cpp
@@ -125,7 +125,7 @@ private slots:
 	void initTestCase() {
 		_test_timer.start();
 		qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--no-sandbox"); // Allow test to be run as root, which, for some reason is being done on the SuSE CI.
-		qputenv("QT_LOGGING_RULES", "qt.qpa.windows.debug=true");  // Deliberately overwriting the rules set in the CI, as we are producing too much output, otherwise
+		// qputenv("QT_LOGGING_RULES", "qt.qpa.windows.debug=true");  // Deliberately overwriting the rules set in the CI, as we are producing too much output, otherwise  -- TODO: does not appear to have any effect
 		KAboutData::setApplicationData(KAboutData("rkward", "RKWard", RKWARD_VERSION, "Frontend to the R statistics language", KAboutLicense::GPL)); // component name needed for .rc files to load
 		RK_Debug::RK_Debug_Level = DL_DEBUG;
 		testLog(R_EXECUTABLE);
@@ -216,9 +216,9 @@ private slots:
 		waitForAllFinished();
 		QVERIFY(RObjectList::getGlobalEnv()->findObject("x"));
 
-		auto oldiface = RInterface::instance();
+		QPointer<RInterface> oldiface = RInterface::instance();
 		restart_action->trigger();
-		while (RInterface::instance() == oldiface) {  // action may be delayed until next event processing
+		while (oldiface) {  // action may be delayed until next event processing
 			qApp->processEvents();
 		}
 		waitForBackendStarted();


More information about the rkward-tracker mailing list