[education/rkward] rkward: Don't mess with user config during testing

Thomas Friedrichsmeier null at kde.org
Mon Jul 22 22:34:28 BST 2024


Git commit 6ab41ab0db519c55b07b22b64776314e67a3ba18 by Thomas Friedrichsmeier.
Committed on 22/07/2024 at 21:34.
Pushed by tfry into branch 'master'.

Don't mess with user config during testing

M  +2    -0    rkward/autotests/core_test.cpp
M  +2    -1    rkward/settings/rksettingsmoduleoutput.cpp

https://invent.kde.org/education/rkward/-/commit/6ab41ab0db519c55b07b22b64776314e67a3ba18

diff --git a/rkward/autotests/core_test.cpp b/rkward/autotests/core_test.cpp
index ece9603d0..5fc995b67 100644
--- a/rkward/autotests/core_test.cpp
+++ b/rkward/autotests/core_test.cpp
@@ -14,6 +14,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include <QRegularExpression>
 #include <QTemporaryFile>
 #include <QActionGroup>
+#include <QStandardPaths>
 
 #include <KAboutData>
 #include <KLocalizedString>
@@ -159,6 +160,7 @@ private Q_SLOTS:
 
 	void initTestCase() {
 		_test_timer.start();
+		QStandardPaths::setTestModeEnabled(true);
 		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  -- TODO: does not appear to have any effect
 		KLocalizedString::setApplicationDomain("rkward");
diff --git a/rkward/settings/rksettingsmoduleoutput.cpp b/rkward/settings/rksettingsmoduleoutput.cpp
index a1e68535d..dfb33b69e 100644
--- a/rkward/settings/rksettingsmoduleoutput.cpp
+++ b/rkward/settings/rksettingsmoduleoutput.cpp
@@ -34,8 +34,9 @@ RKConfigValue<bool> RKCarbonCopySettings::cc_app_plugin_commands {"CC app/plugin
 RKConfigValue<bool> RKCarbonCopySettings::cc_command_output {"CC command output", true};
 
 // TODO: Multiple instances of this are allowed to exist, simultaneously, and they are not kept in sync.
-//       Idea for a generic solution: RKSettingsModule could emit a signal, when changes got synced (form UI),
+//       Idea for a generic solution: RKSettingsModule could emit a signal, when changes got synced (from UI),
 //       and RKConfigValue-created controls could listen to that, and update if needed.
+//       Module would be set to RKSettingsModuleOutput, in this case.
 RKCarbonCopySettings::RKCarbonCopySettings(QWidget* parent, RKSettingsModuleWidget* page)
     : RKSettingsModuleWidget(parent, nullptr, RKSettingsModule::no_page_id) {
 	RK_TRACE(SETTINGS);



More information about the rkward-tracker mailing list