[education/rkward] rkward: Appease debug messages

Thomas Friedrichsmeier null at kde.org
Sun May 19 10:57:40 BST 2024


Git commit 4fae3ea577d566b5a0c4c9d1591e213556c42c70 by Thomas Friedrichsmeier.
Committed on 19/05/2024 at 09:57.
Pushed by tfry into branch 'master'.

Appease debug messages

M  +1    -1    rkward/agents/rkquitagent.cpp
M  +1    -1    rkward/autotests/core_test.cpp
M  +1    -0    rkward/rbackend/rkrinterface.cpp
M  +1    -1    rkward/rkward.cpp

https://invent.kde.org/education/rkward/-/commit/4fae3ea577d566b5a0c4c9d1591e213556c42c70

diff --git a/rkward/agents/rkquitagent.cpp b/rkward/agents/rkquitagent.cpp
index 95100fe4b..393c82d89 100644
--- a/rkward/agents/rkquitagent.cpp
+++ b/rkward/agents/rkquitagent.cpp
@@ -24,7 +24,7 @@ RKQuitAgent::RKQuitAgent (QObject *parent) : QObject (parent) {
 	RK_TRACE (APP);
 
 	quitting = true;
-	RCommand *command = new RCommand(QString("# Quit"), RCommand::EmptyCommand | RCommand::QuitCommand);
+	RCommand *command = new RCommand(QString("# Quit"), RCommand::App | RCommand::EmptyCommand | RCommand::QuitCommand);
 
 	RKWardMainWindow::getMain ()->hide ();
 	cancel_dialog = new RKProgressControl (this, i18n ("Waiting for remaining R commands to finish. To quit immediately, press Cancel (WARNING: This may result in loss of data)"), i18n ("Waiting for R to finish"), RKProgressControl::AllowCancel | RKProgressControl::ShowAtOnce);
diff --git a/rkward/autotests/core_test.cpp b/rkward/autotests/core_test.cpp
index 0cb86d6eb..0d895d4e4 100644
--- a/rkward/autotests/core_test.cpp
+++ b/rkward/autotests/core_test.cpp
@@ -431,7 +431,7 @@ private Q_SLOTS:
 	void cleanupTestCase()
 	{
 		// at least the backend should exit properly, to avoid creating emergency save files
-		RInterface::issueCommand(new RCommand(QString("# Quit (test cleanup)"), RCommand::QuitCommand));
+		RInterface::issueCommand(new RCommand(QString("# Quit (test cleanup)"), RCommand::App | RCommand::EmptyCommand | RCommand::QuitCommand));
 		RKWardMainWindow::getMain()->slotCloseAllWindows();
 		while (!(RInterface::instance()->backendIsDead())) {
 			qApp->processEvents();
diff --git a/rkward/rbackend/rkrinterface.cpp b/rkward/rbackend/rkrinterface.cpp
index 942fe2db2..cfae930ba 100644
--- a/rkward/rbackend/rkrinterface.cpp
+++ b/rkward/rbackend/rkrinterface.cpp
@@ -126,6 +126,7 @@ RInterface::~RInterface(){
 
 	// Don't wait for QObject d'tor to destroy the backend transmitter. It might still try to call functions in the RInterface
 	// (noteably, it does call qApp->processEvents().
+	backend_dead = true;
 	RK_ASSERT(_instance == this);
 	delete RKRBackendProtocolFrontend::instance ();
 	_instance = nullptr;
diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp
index 877bc2038..7f394f924 100644
--- a/rkward/rkward.cpp
+++ b/rkward/rkward.cpp
@@ -654,7 +654,7 @@ void RKWardMainWindow::initActions() {
 				RKConsole::mainConsole()->resetConsole();
 				restart_now();
 			} else {
-				RCommand *c = new RCommand(QString("# Quit (restarting)"), RCommand::QuitCommand);
+				RCommand *c = new RCommand(QString("# Quit (restarting)"), RCommand::App | RCommand::EmptyCommand || RCommand::QuitCommand);
 				c->whenFinished(this, [this, restart_now]() { QTimer::singleShot(0, this, restart_now); });
 				RInterface::issueCommand(c);
 			}


More information about the rkward-tracker mailing list