[education/rkward] rkward/windows: Fix preview code hogging the CPU

Thomas Friedrichsmeier null at kde.org
Tue Mar 17 10:52:48 GMT 2026


Git commit 74404d8ecdbbc53c84e5abf0ebf481852c3dd20a by Thomas Friedrichsmeier.
Committed on 17/03/2026 at 10:52.
Pushed by tfry into branch 'master'.

Fix preview code hogging the CPU

M  +1    -0    rkward/windows/rkcommandeditorwindow.cpp

https://invent.kde.org/education/rkward/-/commit/74404d8ecdbbc53c84e5abf0ebf481852c3dd20a

diff --git a/rkward/windows/rkcommandeditorwindow.cpp b/rkward/windows/rkcommandeditorwindow.cpp
index f8c77f4f5..0120951b7 100644
--- a/rkward/windows/rkcommandeditorwindow.cpp
+++ b/rkward/windows/rkcommandeditorwindow.cpp
@@ -517,6 +517,7 @@ RKCommandEditorWindow::RKCommandEditorWindow(QWidget *parent, const QUrl &_url,
 
 	connect(&autosave_timer, &QTimer::timeout, this, &RKCommandEditorWindow::doAutoSave);
 	connect(&preview_timer, &QTimer::timeout, this, &RKCommandEditorWindow::doRenderPreview);
+	preview_timer.setSingleShot(true);
 
 	urlChanged(); // initialize
 }


More information about the rkward-tracker mailing list