[education/rkward/kf5] rkward: Fix tons of trivial compiler warnings

Thomas Friedrichsmeier null at kde.org
Wed Apr 10 16:12:08 BST 2024


Git commit 7ffab7291ea93028310f470bf4ac927a1da94828 by Thomas Friedrichsmeier.
Committed on 01/04/2024 at 11:45.
Pushed by tfry into branch 'kf5'.

Fix tons of trivial compiler warnings

(mostly zero as nullptr constant)

M  +5    -5    rkward/agents/rkdebughandler.cpp
M  +1    -1    rkward/agents/rkeditobjectagent.cpp
M  +3    -3    rkward/agents/rkloadagent.cpp
M  +1    -1    rkward/agents/rkprintagent.cpp
M  +2    -2    rkward/agents/rksaveagent.cpp
M  +1    -1    rkward/agents/showedittextfileagent.cpp
M  +13   -13   rkward/core/rcontainerobject.cpp
M  +4    -4    rkward/core/renvironmentobject.cpp
M  +7    -7    rkward/core/rkmodificationtracker.cpp
M  +1    -1    rkward/core/rkmodificationtracker.h
M  +2    -2    rkward/core/rkpseudoobjects.cpp
M  +1    -1    rkward/core/rkrownames.cpp
M  +1    -1    rkward/core/rkrownames.h
M  +8    -8    rkward/core/rkvariable.cpp
M  +3    -3    rkward/core/rkvariable.h
M  +13   -13   rkward/core/robject.cpp
M  +8    -8    rkward/core/robjectlist.cpp
M  +5    -5    rkward/dataeditor/rkeditordataframe.cpp
M  +4    -4    rkward/dataeditor/rkvareditmodel.cpp
M  +8    -8    rkward/dataeditor/twintable.cpp
M  +1    -1    rkward/dataeditor/twintable.h
M  +1    -1    rkward/dialogs/rkerrordialog.cpp
M  +5    -5    rkward/dialogs/rkloadlibsdialog.cpp
M  +3    -3    rkward/dialogs/rkloadlibsdialog.h
M  +1    -1    rkward/dialogs/rksavemodifieddialog.cpp
M  +1    -1    rkward/dialogs/rksetupwizard.cpp
M  +4    -4    rkward/main.cpp
M  +1    -1    rkward/misc/celleditor.cpp
M  +2    -2    rkward/misc/editformatdialog.cpp
M  +2    -2    rkward/misc/editlabelsdialog.cpp
M  +1    -1    rkward/misc/multistringselector.cpp
M  +4    -4    rkward/misc/multistringselector.h
M  +4    -4    rkward/misc/rkaccordiontable.cpp
M  +1    -1    rkward/misc/rkcommonfunctions.h
M  +1    -1    rkward/misc/rkdynamicsearchline.cpp
M  +3    -3    rkward/misc/rkobjectlistview.cpp
M  +1    -1    rkward/misc/rkobjectlistview.h
M  +6    -6    rkward/misc/rkoutputdirectory.h
M  +2    -2    rkward/misc/rkprogresscontrol.cpp
M  +5    -5    rkward/misc/rksaveobjectchooser.cpp
M  +1    -1    rkward/misc/rkspinbox.cpp
M  +4    -4    rkward/misc/rkstandardactions.h
M  +6    -6    rkward/misc/rktableview.cpp
M  +1    -1    rkward/misc/rkxmlguipreviewarea.cpp
M  +2    -2    rkward/misc/rkxmlguisyncer.cpp
M  +2    -2    rkward/misc/xmlhelper.cpp
M  +1    -1    rkward/misc/xmlhelper.h
M  +2    -2    rkward/plugin/rkabstractoptionselector.cpp
M  +1    -1    rkward/plugin/rkcheckbox.cpp
M  +2    -2    rkward/plugin/rkcomponent.h
M  +3    -3    rkward/plugin/rkcomponentmap.cpp
M  +1    -1    rkward/plugin/rkcomponentmap.h
M  +10   -10   rkward/plugin/rkcomponentproperties.cpp
M  +2    -2    rkward/plugin/rkformula.cpp
M  +2    -2    rkward/plugin/rkinput.cpp
M  +5    -5    rkward/plugin/rkoptionset.cpp
M  +1    -1    rkward/plugin/rkpluginframe.cpp
M  +2    -2    rkward/plugin/rkpreviewbox.cpp
M  +12   -12   rkward/plugin/rkstandardcomponent.cpp
M  +1    -1    rkward/plugin/rkstandardcomponent.h
M  +7    -7    rkward/plugin/rkstandardcomponentgui.cpp
M  +1    -1    rkward/plugin/rkvarselector.cpp
M  +2    -2    rkward/rbackend/rcommand.cpp
M  +6    -6    rkward/rbackend/rcommandstack.cpp
M  +3    -3    rkward/rbackend/rdata.cpp
M  +1    -1    rkward/rbackend/rkasyncdatastreamhelper.h
M  +2    -2    rkward/rbackend/rkbackendtransmitter.cpp
M  +13   -13   rkward/rbackend/rkrbackend.cpp
M  +1    -1    rkward/rbackend/rkrbackendprotocol_frontend.cpp
M  +7    -7    rkward/rbackend/rkrbackendprotocol_shared.cpp
M  +1    -1    rkward/rbackend/rkrbackendprotocol_shared.h
M  +2    -2    rkward/rbackend/rkreventloop.cpp
M  +18   -18   rkward/rbackend/rkrinterface.cpp
M  +1    -1    rkward/rbackend/rkrsupport.cpp
M  +11   -11   rkward/rbackend/rksignalsupport.cpp
M  +4    -4    rkward/rbackend/rkstructuregetter.cpp
M  +4    -4    rkward/rbackend/rkwarddevice/rkgraphicsdevice_backendtransmitter.cpp
M  +5    -5    rkward/rbackend/rkwarddevice/rkgraphicsdevice_frontendtransmitter.cpp
M  +1    -1    rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp
M  +7    -7    rkward/rkconsole.cpp
M  +1    -1    rkward/rkconsole.h
M  +33   -33   rkward/rkward.cpp
M  +4    -4    rkward/robjectviewer.cpp
M  +1    -1    rkward/robjectviewer.h
M  +3    -3    rkward/scriptbackends/qtscriptbackend.cpp
M  +1    -1    rkward/scriptbackends/qtscriptbackend.h
M  +1    -1    rkward/scriptbackends/rkcomponentscripting.cpp
M  +1    -1    rkward/scriptbackends/scriptbackend.cpp
M  +1    -1    rkward/scriptbackends/scriptbackend.h
M  +1    -1    rkward/scriptbackends/simplebackend.h
M  +16   -16   rkward/settings/rksettings.cpp
M  +1    -1    rkward/settings/rksettingsmodule.cpp
M  +1    -1    rkward/settings/rksettingsmodulecommandeditor.h
M  +2    -2    rkward/windows/katepluginintegration.cpp
M  +1    -1    rkward/windows/katepluginintegration.h
M  +4    -4    rkward/windows/rcontrolwindow.cpp
M  +1    -1    rkward/windows/rcontrolwindow.h
M  +2    -2    rkward/windows/rkcallstackviewer.cpp
M  +2    -2    rkward/windows/rkcallstackviewer.h
M  +5    -5    rkward/windows/rkcodecompletion.cpp
M  +14   -14   rkward/windows/rkcommandeditorwindow.cpp
M  +2    -2    rkward/windows/rkcommandlog.cpp
M  +2    -2    rkward/windows/rkcommandlog.h
M  +1    -1    rkward/windows/rkdebugconsole.cpp
M  +2    -2    rkward/windows/rkdebugconsole.h
M  +3    -3    rkward/windows/rkdebugmessagewindow.cpp
M  +2    -2    rkward/windows/rkdebugmessagewindow.h
M  +2    -2    rkward/windows/rkfilebrowser.cpp
M  +2    -2    rkward/windows/rkfilebrowser.h
M  +2    -2    rkward/windows/rkhelpsearchwindow.cpp
M  +1    -1    rkward/windows/rkhelpsearchwindow.h
M  +6    -6    rkward/windows/rkhtmlwindow.cpp
M  +2    -2    rkward/windows/rkhtmlwindow.h
M  +2    -2    rkward/windows/rkmdiwindow.cpp
M  +5    -5    rkward/windows/rktoolwindowbar.cpp
M  +1    -1    rkward/windows/rktoolwindowlist.cpp
M  +1    -1    rkward/windows/rktoplevelwindowgui.cpp
M  +9    -9    rkward/windows/rkwindowcatcher.cpp
M  +17   -17   rkward/windows/rkworkplace.cpp
M  +3    -3    rkward/windows/rkworkplace.h
M  +10   -10   rkward/windows/rkworkplaceview.cpp
M  +3    -3    rkward/windows/robjectbrowser.cpp
M  +2    -2    rkward/windows/robjectbrowser.h

https://invent.kde.org/education/rkward/-/commit/7ffab7291ea93028310f470bf4ac927a1da94828

diff --git a/rkward/agents/rkdebughandler.cpp b/rkward/agents/rkdebughandler.cpp
index 4f50fde6e..c55147e91 100644
--- a/rkward/agents/rkdebughandler.cpp
+++ b/rkward/agents/rkdebughandler.cpp
@@ -17,8 +17,8 @@ RKDebugHandler::RKDebugHandler (QObject *parent) : QObject (parent) {
 	RK_TRACE (APP);
 
 	_state = NotInDebugger;
-	_request = 0;
-	_command = 0;
+	_request = nullptr;
+	_command = nullptr;
 	_instance = this;
 }
 
@@ -68,7 +68,7 @@ void RKDebugHandler::submitDebugString (const QString &command) {
 
 	RKRBackendProtocolFrontend::setRequestCompleted (_request);
 
-	_command = 0;
+	_command = nullptr;
 	_state = InDebugRun;
 	Q_EMIT newDebugState();
 }
@@ -76,8 +76,8 @@ void RKDebugHandler::submitDebugString (const QString &command) {
 void RKDebugHandler::endDebug () {
 	RK_TRACE (APP);
 
-	_command = 0;
-	_request = 0;
+	_command = nullptr;
+	_request = nullptr;
 	_state = NotInDebugger;
 	Q_EMIT newDebugState();
 }
diff --git a/rkward/agents/rkeditobjectagent.cpp b/rkward/agents/rkeditobjectagent.cpp
index 046f36f6d..09b042eca 100644
--- a/rkward/agents/rkeditobjectagent.cpp
+++ b/rkward/agents/rkeditobjectagent.cpp
@@ -30,7 +30,7 @@ RKEditObjectAgent::RKEditObjectAgent (const QStringList &_object_names, RCommand
 			QString object_name = *it;
 			RObject *obj = RObjectList::getObjectList ()->findObject (object_name);
 			if (!(obj && RKWorkplace::mainWorkplace()->editObject (obj))) {
-				KMessageBox::information (0, i18n ("The object '%1', could not be opened for editing. Either it does not exist, or RKWard does not support editing this type of object, yet.", object_name), i18n ("Cannot edit '%1'", object_name));
+				KMessageBox::information(nullptr, i18n("The object '%1', could not be opened for editing. Either it does not exist, or RKWard does not support editing this type of object, yet.", object_name), i18n("Cannot edit '%1'", object_name));
 			}
 		}
 
diff --git a/rkward/agents/rkloadagent.cpp b/rkward/agents/rkloadagent.cpp
index 494e6d0e4..7ce6d9ad9 100644
--- a/rkward/agents/rkloadagent.cpp
+++ b/rkward/agents/rkloadagent.cpp
@@ -34,7 +34,7 @@ RKLoadAgent::RKLoadAgent (const QUrl &url, bool merge) {
 	_merge = merge;
 
 	// downlad the file, if remote
-	tmpfile = 0;
+	tmpfile = nullptr;
 	QString filename;
 	if (!url.isLocalFile ()) {
 		tmpfile = new QTemporaryFile (this);
@@ -59,10 +59,10 @@ RKLoadAgent::RKLoadAgent (const QUrl &url, bool merge) {
 	command = new RCommand ("load (\"" + filename + "\")", RCommand::App | RCommand::ObjectListUpdate);
 	command->whenFinished(this, [this](RCommand* command) {
 		if (command->failed()) {
-			KMessageBox::error(0, i18n("There has been an error opening file '%1':\n%2", RKWorkplace::mainWorkplace()->workspaceURL().path(), command->warnings() + command->error()), i18n("Error loading workspace"));
+			KMessageBox::error(nullptr, i18n("There has been an error opening file '%1':\n%2", RKWorkplace::mainWorkplace()->workspaceURL().path(), command->warnings() + command->error()), i18n("Error loading workspace"));
 			RKWorkplace::mainWorkplace()->setWorkspaceURL(QUrl());
 		} else {
-			RKWorkplace::mainWorkplace ()->restoreWorkplace (0, _merge);
+			RKWorkplace::mainWorkplace()->restoreWorkplace(nullptr, _merge);
 			if (RKSettingsModuleGeneral::cdToWorkspaceOnLoad ()) {
 				if (RKWorkplace::mainWorkplace ()->workspaceURL ().isLocalFile ()) {
 					RInterface::issueCommand ("setwd (" + RObject::rQuote (RKWorkplace::mainWorkplace ()->workspaceURL ().adjusted (QUrl::RemoveFilename).path ()) + ')', RCommand::App);
diff --git a/rkward/agents/rkprintagent.cpp b/rkward/agents/rkprintagent.cpp
index 50ea72c42..6d7136a93 100644
--- a/rkward/agents/rkprintagent.cpp
+++ b/rkward/agents/rkprintagent.cpp
@@ -59,7 +59,7 @@ void RKPrintAgent::printPostscript (const QString &file, bool delete_file) {
 	}
 
 	auto provider = result.plugin;
-	QAction *printaction = printaction = provider->action ("print");
+	QAction *printaction = provider->action("print");
 	if (!printaction) printaction = provider->action ("file_print");
 	if (!printaction) {
 		QAction *a = new QAction (provider);
diff --git a/rkward/agents/rksaveagent.cpp b/rkward/agents/rksaveagent.cpp
index ff7b278ec..6a1f6ce38 100644
--- a/rkward/agents/rksaveagent.cpp
+++ b/rkward/agents/rksaveagent.cpp
@@ -60,7 +60,7 @@ bool checkOverwriteWorkspace (const QUrl &url, QWidget *parent) {
 bool RKSaveAgent::saveWorkspaceAs(const QUrl& previous_url) {
 	RK_TRACE(APP);
 
-	QUrl save_url = QUrl::fromLocalFile(QFileDialog::getSaveFileName(RKWardMainWindow::getMain(), QString(), previous_url.toLocalFile(), i18n("R Workspace Files [%1](%1);;All files [*](*)", RKSettingsModuleGeneral::workspaceFilenameFilter()), 0, QFileDialog::DontConfirmOverwrite));
+	QUrl save_url = QUrl::fromLocalFile(QFileDialog::getSaveFileName(RKWardMainWindow::getMain(), QString(), previous_url.toLocalFile(), i18n("R Workspace Files [%1](%1);;All files [*](*)", RKSettingsModuleGeneral::workspaceFilenameFilter()), nullptr, QFileDialog::DontConfirmOverwrite));
 	if (save_url.isEmpty()) return false;
 	if (!checkOverwriteWorkspace(save_url, RKWardMainWindow::getMain())) return false;
 
@@ -75,7 +75,7 @@ bool RKSaveAgent::saveWorkspace(const QUrl& _url) {
 	if (url.isEmpty()) return saveWorkspaceAs();
 
 	RKWorkplace::mainWorkplace()->flushAllData();
-	auto save_chain = RInterface::startChain(0);
+	auto save_chain = RInterface::startChain(nullptr);
 
 	RKWorkplace::mainWorkplace()->saveWorkplace(url, save_chain);
 	auto command = new RCommand("save.image(" + RObject::rQuote(url.toLocalFile()) + ')', RCommand::App);
diff --git a/rkward/agents/showedittextfileagent.cpp b/rkward/agents/showedittextfileagent.cpp
index 512395de6..93dbb8b95 100644
--- a/rkward/agents/showedittextfileagent.cpp
+++ b/rkward/agents/showedittextfileagent.cpp
@@ -79,7 +79,7 @@ void ShowEditTextFileAgent::showEditFiles (RBackendRequest *request) {
 		RKRBackendProtocolFrontend::setRequestCompleted (request);
 
 		if (prompt) {
-			new ShowEditTextFileAgent (0, i18n ("A command running in the R-engine wants you to see the following file(s):<ul><li>") + display_titles.join ("</li></li>") + "</li></ul>", i18n ("Showing file(s)"));
+			new ShowEditTextFileAgent(nullptr, i18n("A command running in the R-engine wants you to see the following file(s):<ul><li>") + display_titles.join("</li></li>") + "</li></ul>", i18n("Showing file(s)"));
 		}
 	} else if (request->type == RBackendRequest::EditFiles) {
 		if (prompt) {
diff --git a/rkward/core/rcontainerobject.cpp b/rkward/core/rcontainerobject.cpp
index 1450a1d8a..79e561dfd 100644
--- a/rkward/core/rcontainerobject.cpp
+++ b/rkward/core/rcontainerobject.cpp
@@ -45,11 +45,11 @@ RObject *RContainerObject::updateChildStructure (RObject *child, RData *new_data
 			RK_ASSERT (false);
 			RK_DEBUG (OBJECTS, DL_ERROR, "%s cannot be represented", child->getFullName ().toLatin1 ().data ());
 			delete child;
-			return 0;
+			return nullptr;
 		} else {
 			int child_index = childmap.indexOf (child);
 			RK_ASSERT (child_index >= 0);
-			if (RKModificationTracker::instance()->removeObject (child, 0, true)) {
+			if (RKModificationTracker::instance()->removeObject(child, nullptr, true)) {
 				RData *child_name_data = new_data->structureVector ().at (StoragePositionName);
 				RK_ASSERT (child_name_data->getDataType () == RData::StringVector);
 				RK_ASSERT (child_name_data->getDataLength () >= 1);
@@ -107,7 +107,7 @@ RObject *RContainerObject::createChildFromStructure (RData *child_data, const QS
 		child_object = new RKVariable (this, child_name);
 	} else {
 		RK_DEBUG (OBJECTS, DL_WARNING, "Can't represent object '%s', type %d", child_name.toLatin1 ().data (), child_type);
-		return 0;
+		return nullptr;
 	}
 	RK_ASSERT (child_object);
 	RKModificationTracker::instance()->lockUpdates (true);	// object not yet added. prevent updates
@@ -116,7 +116,7 @@ RObject *RContainerObject::createChildFromStructure (RData *child_data, const QS
 
 	if (!child_object) {
 		RK_ASSERT (false);
-		return 0;
+		return nullptr;
 	}
 	RKModificationTracker::instance()->beginAddObject (child_object, this, position);
 	childmap.insert (position, child_object);
@@ -143,12 +143,12 @@ void RContainerObject::updateChildren (RData *new_children) {
 		RK_ASSERT (child_name_data->getDataLength () >= 1);
 		QString child_name = child_name_data->stringVector ().at (0);
 
-		RObject *child_object = 0;
+		RObject *child_object = nullptr;
 		for (int j = 0; j < old_childmap.size (); ++j) {
 			RObject *obj = old_childmap[j];
 			if (obj && (obj->getShortName () == child_name)) {
 				child_object = obj;
-				old_childmap[j] = 0;	// in case of duplicate names, avoid finding the same child over and over again
+				old_childmap[j] = nullptr;	// in case of duplicate names, avoid finding the same child over and over again
 				break;
 			}
 		}
@@ -170,7 +170,7 @@ void RContainerObject::updateChildren (RData *new_children) {
 				new_childmap.insert (i, old_child);
 			} else {
 				RK_DEBUG (OBJECTS, DL_DEBUG, "child no longer present: %s.", old_child->getFullName ().toLatin1 ().data ());
-				if (RKModificationTracker::instance()->removeObject (old_child, 0, true)) --i;
+				if (RKModificationTracker::instance()->removeObject(old_child, nullptr, true)) --i;
 				else (new_childmap.insert (i, old_child));
 			}
 		} else {
@@ -209,7 +209,7 @@ RObject *RContainerObject::findChildByName (const QString &name) const {
 		RObject* obj = childmap[i];
 		if (obj->getShortName () == name) return (obj);
 	}
-	return 0;
+	return nullptr;
 }
 
 RObject *RContainerObject::findChildByIndex (int position) const {
@@ -218,7 +218,7 @@ RObject *RContainerObject::findChildByIndex (int position) const {
 		return childmap[position];
 	}
 	RK_ASSERT (false);
-	return 0;
+	return nullptr;
 }
 
 RKRowNames* RContainerObject::rowNames () {
@@ -234,7 +234,7 @@ RKRowNames* RContainerObject::rowNames () {
 void RContainerObject::updateRowNamesObject () {
 	RK_TRACE (OBJECTS);
 
-	RKRowNames *rownames_object = 0;
+	RKRowNames *rownames_object = nullptr;
 	if (hasPseudoObject (RowNamesObject)) rownames_object = rownames_objects.value (this);
 	if (!rownames_object) return;
 
@@ -244,7 +244,7 @@ void RContainerObject::updateRowNamesObject () {
 	rownames_object->dimensions[0] = childlen;
 
 	if (rownames_object->isType (NeedDataUpdate) && (!isPending ())) {
-		rownames_object->updateDataFromR (0);
+		rownames_object->updateDataFromR(nullptr);
 	}
 }
 
@@ -317,7 +317,7 @@ void RContainerObject::renameChild (RObject *object, const QString &new_name) {
 
 	RCommand *command = new RCommand (renameChildCommand (object, new_name), RCommand::App | RCommand::Sync);
 	command->setUpdatesObject(this);
-	RInterface::issueCommand (command, 0);
+	RInterface::issueCommand(command, nullptr);
 
 	object->name = new_name;
 }
@@ -349,7 +349,7 @@ void RContainerObject::removeChild (RObject *object, bool removed_in_workspace)
 		}
 
 		RCommand *command = new RCommand (removeChildCommand (object), RCommand::App | RCommand::Sync | RCommand::ObjectListUpdate);
-		RInterface::issueCommand (command, 0);
+		RInterface::issueCommand(command, nullptr);
 	}
 
 	removeChildNoDelete (object);
diff --git a/rkward/core/renvironmentobject.cpp b/rkward/core/renvironmentobject.cpp
index a63dbe33b..533a8b3f3 100644
--- a/rkward/core/renvironmentobject.cpp
+++ b/rkward/core/renvironmentobject.cpp
@@ -27,7 +27,7 @@ REnvironmentObject::REnvironmentObject (RContainerObject *parent, const QString
 		if (name.contains (':')) {
 			type |= PackageEnv;
 		}
-	} else if (parent == 0) {
+	} else if (parent == nullptr) {
 		RK_ASSERT (name == ".GlobalEnv");
 		type |= ToplevelEnv | GlobalEnv;
 	}
@@ -96,7 +96,7 @@ void REnvironmentObject::updateFromR(RCommandChain *chain, const QStringList &ad
 	for (int i = removed_symbols.size() -1; i >= 0; --i) {
 		RObject *removed_object = findChildByName(removed_symbols[i]);
 		RK_ASSERT(removed_object);
-		if (removed_object) RKModificationTracker::instance()->removeObject(removed_object, 0, true);
+		if (removed_object) RKModificationTracker::instance()->removeObject(removed_object, nullptr, true);
 	}
 
 	for (int i = added_symbols.size() -1; i >= 0; --i) {
@@ -135,7 +135,7 @@ bool REnvironmentObject::updateStructure (RData *new_data) {
 		if (new_data->getDataLength () > (StorageSizeBasicInfo + 1)) {
 			RK_ASSERT (new_data->getDataLength () == (StorageSizeBasicInfo + 2));
 			updateNamespace (new_data_data.at (StoragePositionNamespace));
-		} else updateNamespace (0);
+		} else updateNamespace(nullptr);
 	} else {
 		RK_ASSERT (false);
 	}
@@ -146,7 +146,7 @@ void REnvironmentObject::updateNamespace (RData* new_data) {
 	RK_TRACE (OBJECTS);
 
 	if (!new_data) {
-		setSpecialChildObject (0, NamespaceObject);
+		setSpecialChildObject(nullptr, NamespaceObject);
 		return;
 	}
 
diff --git a/rkward/core/rkmodificationtracker.cpp b/rkward/core/rkmodificationtracker.cpp
index 8214e91f8..017d14e7f 100644
--- a/rkward/core/rkmodificationtracker.cpp
+++ b/rkward/core/rkmodificationtracker.cpp
@@ -56,7 +56,7 @@ bool RKModificationTracker::removeObject (RObject *object, RKEditor *editor, boo
 	if (!object->isPseudoObject ()) {
 		if (removed_in_workspace) {
 			if (ed && (ed->getObject () == object) && object->canWrite ()) {	// NOTE: do not allow restoring of columns in a data.frame this way. See https://mail.kde.org/pipermail/rkward-devel/2012-March/003225.html and replies.
-				if (KMessageBox::questionTwoActions (0, i18n ("The object '%1' was removed from workspace or changed to a different type of object, but is currently opened for editing. Do you want to restore it?", object->getFullName ()), i18n ("Restore object?"), KStandardGuiItem::ok(), KStandardGuiItem::cancel()) == KMessageBox::PrimaryAction) {
+				if (KMessageBox::questionTwoActions(nullptr, i18n("The object '%1' was removed from workspace or changed to a different type of object, but is currently opened for editing. Do you want to restore it?", object->getFullName()), i18n("Restore object?"), KStandardGuiItem::ok(), KStandardGuiItem::cancel()) == KMessageBox::PrimaryAction) {
 					ed->restoreObject (object);
 					/* TODO: It would make a lot of sense to allow restoring to a different name, and possibly different location. This may need some thinking. Probably something like:
 					 * 	object->parentObject ()->removeChildNoDelete (parent);
@@ -128,7 +128,7 @@ void RKModificationTracker::moveObject (RContainerObject *parent, RObject* child
 	RK_ASSERT (parent->findChildByIndex (new_index) == child);
 	if (!updates_locked) {
 		endInsertRows ();
-		sendListenerNotification (RObjectListener::ChildMoved, parent, old_index, new_index, 0);
+		sendListenerNotification(RObjectListener::ChildMoved, parent, old_index, new_index, nullptr);
 	}
 }
 
@@ -159,7 +159,7 @@ void RKModificationTracker::endAddObject (RObject *object, RObject* parent, int
 	RK_TRACE (OBJECTS);
 
 	if (!updates_locked) {
-		if (!object->isPseudoObject ()) sendListenerNotification (RObjectListener::ChildAdded, parent, position, 0, 0);
+		if (!object->isPseudoObject ()) sendListenerNotification(RObjectListener::ChildAdded, parent, position, 0, nullptr);
 		endInsertRows ();
 	}
 }
@@ -168,7 +168,7 @@ void RKModificationTracker::objectMetaChanged (RObject *object) {
 	RK_TRACE (OBJECTS);
 
 	if (!updates_locked) {
-		sendListenerNotification (RObjectListener::MetaChanged, object, 0, 0, 0);
+		sendListenerNotification(RObjectListener::MetaChanged, object, 0, 0, nullptr);
 
 		QModelIndex object_index = indexFor (object);
 		Q_EMIT dataChanged(object_index, object_index.sibling(object_index.row(), ColumnCount-1));
@@ -230,7 +230,7 @@ void RKModificationTracker::sendListenerNotification (RObjectListener::Notificat
 		if (o->isContainer ()) {
 			RContainerObject *c = static_cast<RContainerObject*> (o);
 			for (int i = c->numChildren () - 1; i >= 0; --i) {
-				sendListenerNotification (RObjectListener::ObjectRemoved, c->findChildByIndex (i), 0, 0, 0);
+				sendListenerNotification(RObjectListener::ObjectRemoved, c->findChildByIndex(i), 0, 0, nullptr);
 			}
 		}
 	}
@@ -292,7 +292,7 @@ QModelIndex RKObjectListModel::parent (const QModelIndex& index) const {
 int RKObjectListModel::rowCount (const QModelIndex& parent) const {
 	RK_TRACE (OBJECTS);
 
-	RObject* parent_object = 0;
+	RObject* parent_object = nullptr;
 	if (parent.isValid ()) parent_object = static_cast<RObject*> (parent.internalPointer ());
 	else return 2;       // the root item
 
@@ -360,7 +360,7 @@ QVariant RKObjectListModel::headerData (int section, Qt::Orientation orientation
 bool RKObjectListModel::hasChildren(const QModelIndex& parent) const {
 	RK_TRACE (OBJECTS);
 
-	RObject* parent_object = 0;
+	RObject* parent_object = nullptr;
 	if (parent.isValid ()) parent_object = static_cast<RObject*> (parent.internalPointer ());
 	else return true;		// the root item
 
diff --git a/rkward/core/rkmodificationtracker.h b/rkward/core/rkmodificationtracker.h
index c7ad77df3..4a2575521 100644
--- a/rkward/core/rkmodificationtracker.h
+++ b/rkward/core/rkmodificationtracker.h
@@ -116,7 +116,7 @@ public:
 	static RKModificationTracker* instance() { return _instance; };
 	
 /** the given object should be removed (either it was removed in the R-workspace, or the user requests removal of the object in an editor or the RObjectList). First, if the object is being edited somewhere, the user will get a chance to object to the removal. If the user does not object, the RKModificationTracker will remove the object and notify all interested listeners that the object really was removed. When calling from the RObjectList, you will likely set removed_in_workspace to true, to signal that the object-data is already gone in the workspace. */
-	bool removeObject (RObject *object, RKEditor *editor=0, bool removed_in_workspace=false);
+	bool removeObject (RObject *object, RKEditor *editor=nullptr, bool removed_in_workspace=false);
 /** essentially like the above function, but requests a renaming of the object. Will also take care of finding out, whether the name is valid and prompting for a different name otherwise. */
 	void renameObject (RObject *object, const QString &new_name);
 /** the object's meta data was modified. Tells all editors and lists containing the object to update accordingly. */
diff --git a/rkward/core/rkpseudoobjects.cpp b/rkward/core/rkpseudoobjects.cpp
index cd07a90a8..8629e63fb 100644
--- a/rkward/core/rkpseudoobjects.cpp
+++ b/rkward/core/rkpseudoobjects.cpp
@@ -103,7 +103,7 @@ void RKOrphanNamespacesObject::updateNamespacesFromR (RCommandChain* chain, cons
 	for (int i = childmap.size () - 1; i >= 0; --i) {
 		RObject *object = childmap[i];
 		if (!current_symbols.contains (object->getShortName ())) {
-			RKModificationTracker::instance()->removeObject (object, 0, true);
+			RKModificationTracker::instance()->removeObject(object, nullptr, true);
 		}
 	}
 
@@ -131,7 +131,7 @@ RKNamespaceObject* RKOrphanNamespacesObject::findOrphanNamespace (const QString&
 			return static_cast<RKNamespaceObject*> (obj);
 		}
 	}
-	return 0;
+	return nullptr;
 }
 
 QString RKOrphanNamespacesObject::getObjectDescription () const {
diff --git a/rkward/core/rkrownames.cpp b/rkward/core/rkrownames.cpp
index 23eaaa37f..f22d6091c 100644
--- a/rkward/core/rkrownames.cpp
+++ b/rkward/core/rkrownames.cpp
@@ -38,7 +38,7 @@ RKRowNames::~RKRowNames () {
 void RKRowNames::beginEdit () {
 	RK_TRACE (OBJECTS);
 
-	bool just_initialized = (data == 0);
+	bool just_initialized = (data == nullptr);
 	RKVariable::beginEdit ();
 
 	if (just_initialized) {
diff --git a/rkward/core/rkrownames.h b/rkward/core/rkrownames.h
index 3e1391627..3fe70cf09 100644
--- a/rkward/core/rkrownames.h
+++ b/rkward/core/rkrownames.h
@@ -22,7 +22,7 @@ public:
 	void writeMetaData (RCommandChain *) override {};
 
 /** Reimplemented to always try to write data as numbers, if possible */
-	void writeData (int from_row, int to_row, RCommandChain *chain=0) override;
+	void writeData (int from_row, int to_row, RCommandChain *chain=nullptr) override;
 /** Reimplemented to check, whether the values are all 1:n, custom, or invalid. */
 	void setText (int row, const QString &text) override;
 /** Reimplemented to also adjust the subsequent row names, if, and only if rownames are 1:n */
diff --git a/rkward/core/rkvariable.cpp b/rkward/core/rkvariable.cpp
index 4d14dac56..972b859fa 100644
--- a/rkward/core/rkvariable.cpp
+++ b/rkward/core/rkvariable.cpp
@@ -23,7 +23,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 RKVariable::RKVariable (RContainerObject *parent, const QString &name) : RObject (parent, name) {
 	RK_TRACE (OBJECTS);
 	type = Variable;
-	data = 0;
+	data = nullptr;
 	setDataType (RObject::DataNumeric);
 }
 
@@ -55,7 +55,7 @@ void RKVariable::setVarType (RObject::RDataType new_type, bool sync) {
 		// store what we want to keep of the edit data
 		int num_listeners = data->num_listeners;
 		ValueLabels *value_labels = data->value_labels;
-		data->value_labels = 0;	// prevent destruction
+		data->value_labels = nullptr;	// prevent destruction
 		FormattingOptions formatting_options = data->formatting_options;
 
 		// destroy and re-allocate edit data
@@ -139,7 +139,7 @@ void RKVariable::beginEdit () {
 
 	if (!data) {
 		allocateEditData ();
-		if (!(isPending () || (parentObject () && parentObject ()->isPending ()))) updateDataFromR (0);
+		if (!(isPending () || (parentObject () && parentObject ()->isPending ()))) updateDataFromR(nullptr);
 	}
 	++(data->num_listeners);
 }
@@ -162,7 +162,7 @@ void RKVariable::allocateEditData () {
 	
 	data = new RKVarEditData;
 	data->sync_locks = 0;
-	data->value_labels = 0;
+	data->value_labels = nullptr;
 	data->formatting_options.alignment = FormattingOptions::AlignDefault;
 	data->formatting_options.precision_mode = FormattingOptions::PrecisionDefault;
 	data->formatting_options.precision = 0;
@@ -190,7 +190,7 @@ void RKVariable::discardEditData () {
 
 	delete data->value_labels;
 	delete data;
-	data = 0;
+	data = nullptr;
 
 	if (isPending ())  (type -= Pending);
 }
@@ -590,7 +590,7 @@ QString *RKVariable::getCharacter (int from_row, int to_row) const {
 	RK_TRACE (OBJECTS);
 	if (to_row >= getLength ()) {
 		RK_ASSERT (false);
-		return 0;
+		return nullptr;
 	}
 	RK_ASSERT (from_row <= to_row);
 
@@ -693,7 +693,7 @@ void RKVariable::setValueLabels (const ValueLabels& labels) {
 		if (!data->value_labels) return;	// no change: was empty, is empty
 
 		delete data->value_labels;
-		data->value_labels = 0;
+		data->value_labels = nullptr;
 	} else {
 		if (!(data->value_labels)) data->value_labels = new RObject::ValueLabels;
 		else {
@@ -708,7 +708,7 @@ void RKVariable::setValueLabels (const ValueLabels& labels) {
 void RKVariable::updateValueLabels () {
 	RK_TRACE (OBJECTS);
 
-	writeValueLabels (0);
+	writeValueLabels(nullptr);
 	RKModificationTracker::instance()->objectMetaChanged (this);
 
 	ValueLabels *labels = data->value_labels;
diff --git a/rkward/core/rkvariable.h b/rkward/core/rkvariable.h
index 62e7b1953..8c454cb57 100644
--- a/rkward/core/rkvariable.h
+++ b/rkward/core/rkvariable.h
@@ -83,7 +83,7 @@ is set to Unused, if _no_ cell in the row is used, Valid if _all_ cells in the r
 	void setValueLabelString (const QString &string);
 
 /** Restores the variable including data and meta-data */
-	void restore (RCommandChain *chain=0);
+	void restore (RCommandChain *chain=nullptr);
 
 /** Stores formatting options set for this variable */
 	struct FormattingOptions {
@@ -162,8 +162,8 @@ protected:
 /** takes care of syncing the given range of cells */
 	void cellsChanged (int from_row, int to_row);
 /** writes the given range of cells to the backend (regardless of whether syncing should be immediate) */
-	virtual void writeData (int from_row, int to_row, RCommandChain *chain=0);
-	void writeInvalidFields (QList<int> rows, RCommandChain *chain=0);
+	virtual void writeData (int from_row, int to_row, RCommandChain *chain=nullptr);
+	void writeInvalidFields (QList<int> rows, RCommandChain *chain=nullptr);
 /** writes the values labels to the backend */
 	void writeValueLabels (RCommandChain *chain) const;
 
diff --git a/rkward/core/robject.cpp b/rkward/core/robject.cpp
index b55f5c5af..186cf3d4c 100644
--- a/rkward/core/robject.cpp
+++ b/rkward/core/robject.cpp
@@ -75,7 +75,7 @@ RObject::RObject (RObject *parent, const QString &name) {
 	RObject::parent = parent;
 	RObject::name = name;
 	type = 0;
-	meta_map = 0;
+	meta_map = nullptr;
 	contained_objects = 0;
 	dimensions = RObjectPrivate::dim_null;	// safe initialization
 	guard = nullptr;
@@ -214,7 +214,7 @@ void RObject::setMetaProperty (const QString &id, const QString &value, bool syn
 		meta_map->insert (id, value);
 	}
 
-	if (sync) writeMetaData (0);
+	if (sync) writeMetaData(nullptr);
 	RKModificationTracker::instance()->objectMetaChanged (this);
 }
 
@@ -248,7 +248,7 @@ void RObject::writeMetaData (RCommandChain *chain) {
 		map_string.append ("NULL");
 
 		delete meta_map;	// now that it is synced, delete it
-		meta_map = 0;
+		meta_map = nullptr;
 	} else {
 		for (MetaMap::const_iterator it = meta_map->constBegin (); it != meta_map->constEnd (); ++it) {
 			if (!map_string.isEmpty ()) map_string.append (", ");
@@ -272,7 +272,7 @@ void RObject::updateFromR (RCommandChain *chain) {
 	} else if (isType(Environment)) {
 		REnvironmentObject *env = static_cast<REnvironmentObject*>(this);
 		if (isType(PackageEnv) && RKSettingsModuleObjectBrowser::isPackageBlacklisted(env->packageName())) {
-			KMessageBox::information (0, i18n ("The package '%1' (probably you just loaded it) is currently blacklisted for retrieving structure information. Practically this means, the objects in this package will not appear in the object browser, and there will be no object name completion or function argument hinting for objects in this package.\nPackages will typically be blacklisted, if they contain huge amount of data, that would take too long to load. To unlist the package, visit Settings->Configure RKWard->Workspace.", env->packageName()), i18n("Package blacklisted"), "packageblacklist" + env->packageName());
+			KMessageBox::information(nullptr, i18n ("The package '%1' (probably you just loaded it) is currently blacklisted for retrieving structure information. Practically this means, the objects in this package will not appear in the object browser, and there will be no object name completion or function argument hinting for objects in this package.\nPackages will typically be blacklisted, if they contain huge amount of data, that would take too long to load. To unlist the package, visit Settings->Configure RKWard->Workspace.", env->packageName()), i18n("Package blacklisted"), "packageblacklist" + env->packageName());
 			return;
 		}
 		commandstring = ".rk.get.structure (" + getFullName(DefaultObjectNameOptions) + ", " + rQuote(getShortName());
@@ -288,7 +288,7 @@ void RObject::updateFromR (RCommandChain *chain) {
 		if (command->failed ()) {
 			RK_DEBUG (OBJECTS, DL_INFO, "command failed while trying to update object '%s'. No longer present?", getShortName ().toLatin1 ().data ());
 			// this may happen, if the object has been removed in the workspace in between
-			RKModificationTracker::instance()->removeObject (this, 0, true);
+			RKModificationTracker::instance()->removeObject(this, nullptr, true);
 			return;
 		}
 		if (parent && parent->isContainer()) {
@@ -307,7 +307,7 @@ void RObject::fetchMoreIfNeeded (int levels) {
 
 	if (isType (Updating)) return;
 	if (isType (Incomplete)) {
-		updateFromR (0);
+		updateFromR(nullptr);
 		return;
 	}
 	RSlotsPseudoObject *spo = slotsPseudoObject ();
@@ -345,12 +345,12 @@ bool RObject::updateStructure (RData *new_data) {
 	properties_change |= updateSlots (new_data_data.at (StoragePositionSlots));
 
 	if (properties_change) RKModificationTracker::instance()->objectMetaChanged (this);
-	if (type & NeedDataUpdate) updateDataFromR (0);
+	if (type & NeedDataUpdate) updateDataFromR(nullptr);
 
 	if (type & Incomplete) {
 		// If the (new!) type is "Incomplete", it means, the structure getter simply stopped at this point.
 		// In case we already have child info, we should update it (TODO: perhaps only, if anything is listening for child objects?)
-		if (numChildrenForObjectModel () && (!isType (Updating))) updateFromR (0);
+		if (numChildrenForObjectModel () && (!isType (Updating))) updateFromR(nullptr);
 		return true;
 	}
 
@@ -486,7 +486,7 @@ bool RObject::updateMeta (RData *new_data) {
 	} else {		// no meta data received
 		if (meta_map) {
 			delete meta_map;
-			meta_map = 0;
+			meta_map = nullptr;
 			change = true;
 		}
 	}
@@ -537,7 +537,7 @@ bool RObject::updateSlots (RData *new_data) {
 		}
 		return ret;
 	} else if (slotsPseudoObject ()) {
-		setSpecialChildObject (0, SlotsObject);
+		setSpecialChildObject(nullptr, SlotsObject);
 	}
 	return false;
 }
@@ -594,7 +594,7 @@ RObject *RObject::findChildByObjectModelIndex (int index) const {
 		if (index == 0) return static_cast<const RObjectList *> (this)->orphanNamespacesObject ();
 		--index;
 	}
-	return 0;
+	return nullptr;
 }
 
 QList <RKEditor*> RObject::editors () const {
@@ -610,7 +610,7 @@ void RObject::rename (const QString &new_short_name) {
 void RObject::setSpecialChildObject (RObject* special, PseudoObjectType special_type) {
 	RK_TRACE (OBJECTS);
 
-	RObject *old_special = 0;
+	RObject *old_special = nullptr;
 	if (special_type == SlotsObject) old_special = slotsPseudoObject ();
 	else if (special_type == NamespaceObject) old_special = namespaceEnvironment ();
 	else if (special_type == RowNamesObject) old_special = rownames_objects.value (this);
@@ -619,7 +619,7 @@ void RObject::setSpecialChildObject (RObject* special, PseudoObjectType special_
 	if (special == old_special) return;
 
 	if (old_special) {
-		RKModificationTracker::instance()->removeObject (old_special, 0, true);
+		RKModificationTracker::instance()->removeObject(old_special, nullptr, true);
 		RK_ASSERT (!hasPseudoObject (special_type));	// should have been removed in the above statement via RObject::remove()
 	}
 
diff --git a/rkward/core/robjectlist.cpp b/rkward/core/robjectlist.cpp
index 8f8ccd858..e085f9347 100644
--- a/rkward/core/robjectlist.cpp
+++ b/rkward/core/robjectlist.cpp
@@ -25,20 +25,20 @@ SPDX-License-Identifier: GPL-2.0-or-later
 // static
 RObjectList *RObjectList::object_list = nullptr;
 
-RObjectList::RObjectList () : RContainerObject (0, QString ()) {
+RObjectList::RObjectList() : RContainerObject(nullptr, QString()) {
 	RK_TRACE (OBJECTS);
 	RK_ASSERT(!object_list);
 	object_list = this;
 
 	update_timer = new QTimer (this);
 	update_timer->setSingleShot (true);
-	connect(update_timer, &QTimer::timeout, this, [this]() { updateFromR(0); });
-	update_chain = 0;
+	connect(update_timer, &QTimer::timeout, this, [this]() { updateFromR(nullptr); });
+	update_chain = nullptr;
 
 	type = RObject::Workspace;
 	name = "search()";
 
-	globalenv = new REnvironmentObject (0, ".GlobalEnv");
+	globalenv = new REnvironmentObject(nullptr, ".GlobalEnv");
 	globalenv->updateFromR(nullptr);
 
    // TODO: Do we really need tracker notification at this stage?
@@ -158,7 +158,7 @@ void RObjectList::makeUpdateCompleteCallback() {
 	whenCommandFinished(command, [this](RCommand*) {
 		RK_ASSERT (update_chain);
 		RInterface::closeChain (update_chain);
-		update_chain = 0;
+		update_chain = nullptr;
 
 		RK_DEBUG (OBJECTS, DL_DEBUG, "object list update complete");
 		Q_EMIT updateComplete();
@@ -188,7 +188,7 @@ void RObjectList::updateEnvironments (const QStringList &_env_names, bool force_
 
 		RObject *obj = findChildByName (name);
 		if (obj && (i > 0) && (env_names.lastIndexOf (name, i-1) > -1)) {		// duplicate environment names can happen (e.g. if a data.frame is attached multiple times)
-			obj = 0;	// only copy the old item once
+			obj = nullptr;	// only copy the old item once
 		}
 		if (!obj) {
 			obj = createTopLevelEnvironment (name);
@@ -206,7 +206,7 @@ void RObjectList::updateEnvironments (const QStringList &_env_names, bool force_
 		
 		if (new_pos < 0) {	// environment is gone
 			RK_DEBUG (OBJECTS, DL_INFO, "removing toplevel environment %s from list", obj->getShortName ().toLatin1 ().data ());
-			if (RKModificationTracker::instance()->removeObject (obj, 0, true)) --i;
+			if (RKModificationTracker::instance()->removeObject(obj, nullptr, true)) --i;
 			else (newchildmap.insert (i, obj));
 		} else if (new_pos != i) {
 			// this call is rather expensive, all in all, but fortunately called very rarely
@@ -300,7 +300,7 @@ REnvironmentObject* RObjectList::findPackage (const QString &namespacename) cons
 			return env;
 		}
 	}
-	return 0;
+	return nullptr;
 }
 
 bool RObjectList::updateStructure (RData *) {
diff --git a/rkward/dataeditor/rkeditordataframe.cpp b/rkward/dataeditor/rkeditordataframe.cpp
index 45a5c4d63..c4aae1ed8 100644
--- a/rkward/dataeditor/rkeditordataframe.cpp
+++ b/rkward/dataeditor/rkeditordataframe.cpp
@@ -70,7 +70,7 @@ void RKEditorDataFrame::commonInit () {
 	getPart ()->insertChildClient (this);
 	initializeActivationSignals ();
 
-	open_chain = RInterface::startChain (0);
+	open_chain = RInterface::startChain(nullptr);
 }
 
 RKEditorDataFrame::~RKEditorDataFrame () {
@@ -81,9 +81,9 @@ RKEditorDataFrame::~RKEditorDataFrame () {
 void RKEditorDataFrame::detachModel () {
 	RK_TRACE (EDITOR);
 
-	dataview->setRKModel (0);
-	metaview->setRKModel (0);
-	deleteLater ();
+	dataview->setRKModel(nullptr);
+	metaview->setRKModel(nullptr);
+	deleteLater();
 }
 
 void RKEditorDataFrame::flushChanges () {
@@ -110,6 +110,6 @@ void RKEditorDataFrame::restoreObject (RObject *object) {
 #ifdef __GNUC__
 #	warning TODO: this interface should be moved to the model for good.
 #endif
-	datamodel->restoreObject (object, 0);
+	datamodel->restoreObject(object, nullptr);
 }
 
diff --git a/rkward/dataeditor/rkvareditmodel.cpp b/rkward/dataeditor/rkvareditmodel.cpp
index d4af69e30..fbb8a089b 100644
--- a/rkward/dataeditor/rkvareditmodel.cpp
+++ b/rkward/dataeditor/rkvareditmodel.cpp
@@ -23,10 +23,10 @@ SPDX-License-Identifier: GPL-2.0-or-later
 RKVarEditModel::RKVarEditModel (QObject *parent) : RKVarEditModelBase (parent), RObjectListener (RObjectListener::DataModel) {
 	RK_TRACE (EDITOR);
 
-	meta_model = 0;
+	meta_model = nullptr;
 	trailing_rows = trailing_cols = 0;
 	edit_blocks = 0;
-	rownames = 0;
+	rownames = nullptr;
 	header_locked = false;
 	duplicate_check_triggered = false;
 	reset_scheduled = false;
@@ -47,7 +47,7 @@ RKVariable* RKVarEditModel::getObject (int index) const {
 
 	if (index >= trueCols ()) {
 		RK_ASSERT (false);
-		return 0;
+		return nullptr;
 	}
 	return objects[index];
 }
@@ -912,7 +912,7 @@ void RKVarEditDataFrameModel::objectRemoved (RObject* object) {
 	if (object == dataframe) {
 		while (!objects.isEmpty ()) RKVarEditModel::objectRemoved (objects.last());		// NOTE: The rownames object (index position 0) must always go away last!
 		stopListenForObject (dataframe);
-		dataframe = 0;
+		dataframe = nullptr;
 	}
 
 	RKVarEditModel::objectRemoved (object);
diff --git a/rkward/dataeditor/twintable.cpp b/rkward/dataeditor/twintable.cpp
index f8de42c78..832485c36 100644
--- a/rkward/dataeditor/twintable.cpp
+++ b/rkward/dataeditor/twintable.cpp
@@ -34,7 +34,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 TwinTable::TwinTable (QWidget *parent) : RKEditor (parent), RObjectListener (RObjectListener::Other), KXMLGUIClient () {
 	RK_TRACE (EDITOR);
 
-	main_object = 0;
+	main_object = nullptr;
 
 	QVBoxLayout *layout = new QVBoxLayout(this);
 	layout->setContentsMargins (0, 0, 0, 0);
@@ -63,20 +63,20 @@ TwinTable::TwinTable (QWidget *parent) : RKEditor (parent), RObjectListener (ROb
 	// Note that the disconnects are on connections already set up by Qt. Since we don't want to worry about how these were set, we're disconnecting
 	// each in both old and new syntax.
 	disconnect (metaview->horizontalHeader (), SIGNAL (sectionClicked(int)));
-	disconnect (metaview->horizontalHeader (), &QHeaderView::sectionClicked, 0, 0);
+	disconnect (metaview->horizontalHeader (), &QHeaderView::sectionClicked, nullptr, nullptr);
 	connect (metaview->horizontalHeader (), &QHeaderView::sectionClicked, this, &TwinTable::metaHeaderClicked);
 	disconnect (metaview->horizontalHeader (), SIGNAL (sectionPressed(int)));
-	disconnect (metaview->horizontalHeader (), &QHeaderView::sectionPressed, 0, 0);
+	disconnect (metaview->horizontalHeader (), &QHeaderView::sectionPressed, nullptr, nullptr);
 	connect (metaview->horizontalHeader (), &QHeaderView::sectionPressed, this, &TwinTable::metaHeaderPressed);
 	disconnect (metaview->horizontalHeader (), SIGNAL (sectionEntered(int)));
-	disconnect (metaview->horizontalHeader (), &QHeaderView::sectionEntered, 0, 0);
+	disconnect (metaview->horizontalHeader (), &QHeaderView::sectionEntered, nullptr, nullptr);
 	connect (metaview->horizontalHeader (), &QHeaderView::sectionEntered, this, &TwinTable::metaHeaderEntered);
 	meta_header_anchor_section = -1;
 
 	// catch header context menu requests
 	connect (dataview, &TwinTableMember::contextMenuRequest, this, &TwinTable::contextMenu);
 	connect (metaview, &TwinTableMember::contextMenuRequest, this, &TwinTable::contextMenu);
-	context_menu_table = 0;
+	context_menu_table = nullptr;
 	context_menu_row = context_menu_column = -2;
 
 	setXMLFile ("rkeditordataframepart.rc");
@@ -250,7 +250,7 @@ void TwinTable::metaHeaderEntered (int section) {
 void TwinTable::contextMenu (int row, int col, const QPoint& pos) {
 	RK_TRACE (EDITOR);
 
-	RK_ASSERT (context_menu_table == 0);
+	RK_ASSERT (context_menu_table == nullptr);
 	context_menu_row = row;
 	context_menu_column = col;
 	QString container_name;
@@ -311,7 +311,7 @@ void TwinTable::contextMenu (int row, int col, const QPoint& pos) {
 		RK_ASSERT (false);	// but may happen, if ui.rc-file was not found
 	}
 
-	context_menu_table = 0;
+	context_menu_table = nullptr;
 	context_menu_row = context_menu_column = -2;
 }
 
@@ -442,7 +442,7 @@ TwinTableMember *TwinTable::activeTable () {
 	} else if (dataview->hasFocus ()) {
 		return dataview;
 	} else {
-		return 0;
+		return nullptr;
 	}
 }
 
diff --git a/rkward/dataeditor/twintable.h b/rkward/dataeditor/twintable.h
index e03bb8736..95aa7535f 100644
--- a/rkward/dataeditor/twintable.h
+++ b/rkward/dataeditor/twintable.h
@@ -30,7 +30,7 @@ class QSplitter;
 class TwinTable : public RKEditor, public RObjectListener, public KXMLGUIClient {
 	Q_OBJECT
 public: 
-	explicit TwinTable (QWidget *parent=0);
+	explicit TwinTable(QWidget *parent=nullptr);
 	~TwinTable ();
 /** Pastes clipboard content to the current table */
 	void paste (RKEditor::PasteMode paste_mode);
diff --git a/rkward/dialogs/rkerrordialog.cpp b/rkward/dialogs/rkerrordialog.cpp
index 5bf56d0fc..95add8567 100644
--- a/rkward/dialogs/rkerrordialog.cpp
+++ b/rkward/dialogs/rkerrordialog.cpp
@@ -109,7 +109,7 @@ void RKErrorDialog::reportableErrorMessage (QWidget* parent_widget, const QStrin
 	KMessageBox::Options options = KMessageBox::Notify | KMessageBox::AllowLink;
 	dialog->setModal (true);
 
-	int ret = KMessageBox::createKMessageBox (dialog, buttonbox, QMessageBox::Critical, user_message, QStringList(), QString(), 0, options, details);
+	int ret = KMessageBox::createKMessageBox(dialog, buttonbox, QMessageBox::Critical, user_message, QStringList(), QString(), nullptr, options, details);
 
 	if (ret == QDialogButtonBox::No) {
 		reportBug (parent_widget, (message_code.isEmpty () ? QString () : i18n ("Message code: %1\n", message_code)) + user_message);
diff --git a/rkward/dialogs/rkloadlibsdialog.cpp b/rkward/dialogs/rkloadlibsdialog.cpp
index acad3c410..3ad9531a1 100644
--- a/rkward/dialogs/rkloadlibsdialog.cpp
+++ b/rkward/dialogs/rkloadlibsdialog.cpp
@@ -43,7 +43,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 RKLoadLibsDialog::RKLoadLibsDialog (QWidget *parent, RCommandChain *chain, bool modal) : KPageDialog (parent) {
 	RK_TRACE (DIALOGS);
 	RKLoadLibsDialog::chain = chain;
-	installation_process = 0;
+	installation_process = nullptr;
 
 	setFaceType (KPageDialog::Tabbed);
 	setModal (modal);
@@ -325,7 +325,7 @@ void RKLoadLibsDialog::runInstallationCommand (const QString& command, bool as_r
 
 ////////////////////// LoadUnloadWidget ////////////////////////////
 
-LoadUnloadWidget::LoadUnloadWidget (RKLoadLibsDialog *dialog) : RKLoadLibsDialogPage (0) {
+LoadUnloadWidget::LoadUnloadWidget (RKLoadLibsDialog *dialog) : RKLoadLibsDialogPage(nullptr) {
 	RK_TRACE (DIALOGS);
 	LoadUnloadWidget::parent = dialog;
 	
@@ -607,7 +607,7 @@ Q_SIGNALS:
 	void selectAllUpdates();
 };
 
-InstallPackagesWidget::InstallPackagesWidget (RKLoadLibsDialog *dialog) : RKLoadLibsDialogPage (0) {
+InstallPackagesWidget::InstallPackagesWidget (RKLoadLibsDialog *dialog) : RKLoadLibsDialogPage(nullptr) {
 	RK_TRACE (DIALOGS);
 	InstallPackagesWidget::parent = dialog;
 	
@@ -1204,7 +1204,7 @@ void RKRPackageInstallationStatusSortFilterModel::setRKWardOnly (bool only) {
 #include "../misc/multistringselector.h"
 RKPluginMapSelectionWidget::RKPluginMapSelectionWidget (RKLoadLibsDialog* dialog) : RKLoadLibsDialogPage(dialog) {
 	RK_TRACE (DIALOGS);
-	model = 0;
+	model = nullptr;
 
 	QVBoxLayout *vbox = new QVBoxLayout (this);
 	vbox->addWidget (new QLabel (i18n ("Installed plugin groups (.pluginmap files)"), this));
@@ -1236,7 +1236,7 @@ void RKPluginMapSelectionWidget::apply () {
 	if (!isChanged()) return;
 	RK_ASSERT (model);
 	auto new_list = RKSettingsModulePlugins::setPluginMaps(model->pluginMaps());
-	selector->setModel (0); // we don't want any extra change notification for this
+	selector->setModel(nullptr); // we don't want any extra change notification for this
 	model->init (new_list);
 	selector->setModel (model, 1);
 	clearChanged();
diff --git a/rkward/dialogs/rkloadlibsdialog.h b/rkward/dialogs/rkloadlibsdialog.h
index b113a4bb0..85c56c4ee 100644
--- a/rkward/dialogs/rkloadlibsdialog.h
+++ b/rkward/dialogs/rkloadlibsdialog.h
@@ -70,7 +70,7 @@ public:
 @param chain RCommandChain to run the necessary commands in
 @param package_name name of the required package */
 	static void showInstallPackagesModal (QWidget *parent, RCommandChain *chain, const QStringList &package_names);
-	static void showPluginmapConfig (QWidget *parent=0, RCommandChain *chain=0);
+	static void showPluginmapConfig(QWidget *parent=nullptr, RCommandChain *chain=nullptr);
 	QStringList currentLibraryLocations ()  const { return library_locations; };
 Q_SIGNALS:
 	void libraryLocationsChanged (const QStringList &liblocs);
@@ -213,8 +213,8 @@ private:
 
 class RKRPackageInstallationStatusSortFilterModel : public QSortFilterProxyModel {
 public:
-	explicit RKRPackageInstallationStatusSortFilterModel (QObject* parent = 0);
-	~RKRPackageInstallationStatusSortFilterModel ();
+	explicit RKRPackageInstallationStatusSortFilterModel(QObject* parent = nullptr);
+	~RKRPackageInstallationStatusSortFilterModel();
 	void setRKWardOnly (bool only);
 protected:
 	bool lessThan (const QModelIndex &left, const QModelIndex &right) const override;
diff --git a/rkward/dialogs/rksavemodifieddialog.cpp b/rkward/dialogs/rksavemodifieddialog.cpp
index 0e9e7fa18..4990e132e 100644
--- a/rkward/dialogs/rksavemodifieddialog.cpp
+++ b/rkward/dialogs/rksavemodifieddialog.cpp
@@ -70,7 +70,7 @@ RKSaveModifiedDialog::RKSaveModifiedDialog (QWidget* parent, QList<RKMDIWindow*>
 	QTreeWidget *tree = new QTreeWidget ();
 	v_layout->addWidget (tree);
 
-	save_project_check = 0;
+	save_project_check = nullptr;
 	tree->header ()->hide ();
 
 	if (project) {
diff --git a/rkward/dialogs/rksetupwizard.cpp b/rkward/dialogs/rksetupwizard.cpp
index 141e0575b..044a5eb24 100644
--- a/rkward/dialogs/rksetupwizard.cpp
+++ b/rkward/dialogs/rksetupwizard.cpp
@@ -320,7 +320,7 @@ void RKSetupWizard::fullInteractiveCheck(InvokationReason reason, const QList<RK
 	auto res = wizard->exec();
 	if (res == QDialog::Accepted) {
 		if (!wizard->packages_to_install.isEmpty()) {
-			RKLoadLibsDialog::showInstallPackagesModal(wizard, 0, wizard->packages_to_install);
+			RKLoadLibsDialog::showInstallPackagesModal(wizard, nullptr, wizard->packages_to_install);
 		}
 
 #if 0 && (defined(Q_OS_LINUX) || defined(Q_OS_UNIX))  // D'uh: muon (5.8.0) does not have an "install" command line option or equivalent
diff --git a/rkward/main.cpp b/rkward/main.cpp
index 549bab078..5b26a8d8f 100644
--- a/rkward/main.cpp
+++ b/rkward/main.cpp
@@ -205,7 +205,7 @@ QString resolveRSpecOrFail (QString input, const QString &message) {
 		if (ret.isNull ()) ret = QStandardPaths::findExecutable ("R");
 
 		if (ret.isNull() || !QFileInfo (ret).isExecutable()) {
-			QMessageBox::critical (0, i18n ("Unable to detect R installation"), i18n ("RKWard failed to detect an R installation on this system. Either R is not installed, or not at one of the standard installation locations. You can use the command line parameter '--r-executable <i>auto / PATH_TO_R</i>', or supply an rkward.ini file to specify a non-standard location."));
+			QMessageBox::critical(nullptr, i18n("Unable to detect R installation"), i18n("RKWard failed to detect an R installation on this system. Either R is not installed, or not at one of the standard installation locations. You can use the command line parameter '--r-executable <i>auto / PATH_TO_R</i>', or supply an rkward.ini file to specify a non-standard location."));
 			exit (1);
 		}
 
@@ -218,7 +218,7 @@ QString resolveRSpecOrFail (QString input, const QString &message) {
 
 		// TODO, while fixing krazy2 warnings: KMessageBox layout for static messages is quirky in that it has squeezed caption, and does not allow resize -> Submit a patch.
 		//KMessageBox::error (0, QString ("The R executable specified on the command line (%1) does not exist or is not executable.").arg (r_exe), "Specified R executable does not exist");
-		QMessageBox::critical (0, i18n ("Specified R executable does not exist"), message);
+		QMessageBox::critical(nullptr, i18n("Specified R executable does not exist"), message);
 		exit(1);
 	}
 	return QString(); // not reached
@@ -264,7 +264,7 @@ int main (int argc, char *argv[]) {
 	aboutData.addCredit (i18n ("Philippe Grosjean"), i18n ("Several helpful comments and discussions"));
 	aboutData.addCredit (i18n ("Adrien d'Hardemare"), i18n ("Plugins and patches"));
 	aboutData.addCredit (i18n ("Yves Jacolin"), i18n ("New website"));
-	aboutData.addCredit (i18n ("Germán Márquez Mejía"), i18n ("HP filter plugin, spanish translation"), 0);
+	aboutData.addCredit (i18n ("Germán Márquez Mejía"), i18n ("HP filter plugin, spanish translation"));
 	aboutData.addCredit (i18n ("Marco Martin"), i18n ("A cool icon"));
 	aboutData.addCredit (i18n ("Daniele Medri"), i18n ("RKWard logo, many suggestions, help on wording"));
 	aboutData.addCredit (i18n ("David Sibai"), i18n ("Several valuable comments, hints and patches"));
@@ -407,7 +407,7 @@ int main (int argc, char *argv[]) {
 	// do it!
 	int status = app.exec ();
 
-	qInstallMessageHandler (0);
+	qInstallMessageHandler(nullptr);
 	RK_Debug::debug_file->close ();
 
 	return status;
diff --git a/rkward/misc/celleditor.cpp b/rkward/misc/celleditor.cpp
index 604366ed2..27e5cb286 100644
--- a/rkward/misc/celleditor.cpp
+++ b/rkward/misc/celleditor.cpp
@@ -20,7 +20,7 @@ CellEditor::CellEditor (QWidget* parent) : QLineEdit (parent) {
 
 	setFrame (false);
 
-	value_list = 0;
+	value_list = nullptr;
 }
 
 CellEditor::~CellEditor () {
diff --git a/rkward/misc/editformatdialog.cpp b/rkward/misc/editformatdialog.cpp
index 4e5a1fd45..8b568f758 100644
--- a/rkward/misc/editformatdialog.cpp
+++ b/rkward/misc/editformatdialog.cpp
@@ -105,7 +105,7 @@ void EditFormatDialog::precisionFieldChanged (int) {
 EditFormatDialogProxy::EditFormatDialogProxy (QWidget* parent) : QWidget (parent) {
 	RK_TRACE (EDITOR);
 
-	dialog = 0;
+	dialog = nullptr;
 }
 
 EditFormatDialogProxy::~EditFormatDialogProxy () {
@@ -136,6 +136,6 @@ void EditFormatDialogProxy::dialogDone (int result) {
 		Q_EMIT done(this, RKItemDelegate::EditorReject);
 	}
 	dialog->deleteLater ();
-	dialog = 0;
+	dialog = nullptr;
 }
 
diff --git a/rkward/misc/editlabelsdialog.cpp b/rkward/misc/editlabelsdialog.cpp
index d4263675c..67b02f25a 100644
--- a/rkward/misc/editlabelsdialog.cpp
+++ b/rkward/misc/editlabelsdialog.cpp
@@ -228,7 +228,7 @@ void EditLabelsDialog::accept () {
 
 EditLabelsDialogProxy::EditLabelsDialogProxy (QWidget* parent) : QWidget (parent) {
 	RK_TRACE (EDITOR);
-	dialog = 0;
+	dialog = nullptr;
 }
 
 EditLabelsDialogProxy::~EditLabelsDialogProxy () {
@@ -258,7 +258,7 @@ void EditLabelsDialogProxy::dialogDone (int result) {
 		Q_EMIT done(this, RKItemDelegate::EditorReject);
 	}
 	dialog->deleteLater ();
-	dialog = 0;
+	dialog = nullptr;
 }
 
 
diff --git a/rkward/misc/multistringselector.cpp b/rkward/misc/multistringselector.cpp
index efc748a00..fb6f5782f 100644
--- a/rkward/misc/multistringselector.cpp
+++ b/rkward/misc/multistringselector.cpp
@@ -134,7 +134,7 @@ void RKMultiStringSelectorV2::setModel (QAbstractItemModel* model, int main_colu
 	if (tree_view->model ()) {
 		// NOTE: Commented version gives compile error. Fortunately, we do not connect the model to any other slots, so the version below is ok.
 		//disconnect (tree_view->model (), 0, this, &RKMultiStringSelectorV2::anyModelDataChange);
-		disconnect (tree_view->model (), 0, this, 0);
+		disconnect(tree_view->model(), nullptr, this, nullptr);
 	}
 	tree_view->setModel (model);
 	connect (tree_view->selectionModel (), &QItemSelectionModel::currentChanged, this, &RKMultiStringSelectorV2::updateButtons);
diff --git a/rkward/misc/multistringselector.h b/rkward/misc/multistringselector.h
index dcd22e708..10ccc89e9 100644
--- a/rkward/misc/multistringselector.h
+++ b/rkward/misc/multistringselector.h
@@ -27,8 +27,8 @@ class QTreeView;
 class RKMultiStringSelectorV2 : public QWidget {
 	Q_OBJECT
 public:
-	explicit RKMultiStringSelectorV2 (const QString& label, QWidget* parent = 0);
-	virtual ~RKMultiStringSelectorV2 ();
+	explicit RKMultiStringSelectorV2(const QString& label, QWidget* parent = nullptr);
+	virtual ~RKMultiStringSelectorV2();
 	void setModel (QAbstractItemModel *model, int main_column=-1);
 	void setAlwaysAddAtBottom (bool always_add_at_bottom) { add_at_bottom = always_add_at_bottom; };
 public Q_SLOTS:
@@ -56,8 +56,8 @@ Q_SIGNALS:
 class MultiStringSelector : public RKMultiStringSelectorV2 {
 Q_OBJECT
 public:
-	explicit MultiStringSelector (const QString& label, QWidget* parent = 0);
-	~MultiStringSelector ();
+	explicit MultiStringSelector(const QString& label, QWidget* parent = nullptr);
+	~MultiStringSelector();
 
 /** get list of current strings (in the correct order, of course) */
 	QStringList getValues ();
diff --git a/rkward/misc/rkaccordiontable.cpp b/rkward/misc/rkaccordiontable.cpp
index 3c7bf5131..27e66dadf 100644
--- a/rkward/misc/rkaccordiontable.cpp
+++ b/rkward/misc/rkaccordiontable.cpp
@@ -262,7 +262,7 @@ RKAccordionTable::RKAccordionTable (QWidget* parent) : QTreeView (parent) {
 	setItemsExpandable (false);        // custom handling
 	setSizePolicy (QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
 
-	pmodel = new RKAccordionDummyModel (0);
+	pmodel = new RKAccordionDummyModel(nullptr);
 	RKAccordionDelegate* delegate = new RKAccordionDelegate (this);
 	delegate->pmodel = pmodel;
 	setItemDelegateForColumn (0, delegate);
@@ -404,12 +404,12 @@ void RKAccordionTable::rowExpanded (QModelIndex row) {
 	for (int i = 0; i < pmodel->rowCount () - pmodel->add_trailing_rows; ++i) {
 		QModelIndex _row = model ()->index (i, 0);
 		if (i != row.row ()) {
-			setIndexWidget (model ()->index (0, 0, _row), 0);
-			setExpanded (_row, false);
+			setIndexWidget(model()->index(0, 0, _row), nullptr);
+			setExpanded(_row, false);
 		}
 	}
 	setFirstColumnSpanned (0, row, true);
-	setIndexWidget (model ()->index (0, 0, row), new RKWidgetGuard (0, editor_widget_container, this));
+	setIndexWidget(model()->index(0, 0, row), new RKWidgetGuard(nullptr, editor_widget_container, this));
 	setCurrentIndex (row);
 	scrollTo (row, EnsureVisible);                          // yes, we want both scrolls: We want the header row above the widget, if possible at all,
 	scrollTo (model ()->index (0, 0, row), EnsureVisible);  // but of course, having the header row visible without the widget is not enough...
diff --git a/rkward/misc/rkcommonfunctions.h b/rkward/misc/rkcommonfunctions.h
index 17f16e761..ff5295052 100644
--- a/rkward/misc/rkcommonfunctions.h
+++ b/rkward/misc/rkcommonfunctions.h
@@ -46,7 +46,7 @@ namespace RKCommonFunctions {
 	QString unescape (const QString &in);
 
 /** simultaneously sets tool tips and what's this tips on up to three QWidgets */
-	void setTips (const QString &tip, QWidget *first, QWidget *second=0, QWidget *third=0);
+	void setTips (const QString &tip, QWidget *first, QWidget *second=nullptr, QWidget *third=nullptr);
 	QString noteSettingsTakesEffectAfterRestart ();
 
 /** create a QLabel that has wordwarp enabled, in a single line of code. */
diff --git a/rkward/misc/rkdynamicsearchline.cpp b/rkward/misc/rkdynamicsearchline.cpp
index ed5a8bf4c..67ca0d49c 100644
--- a/rkward/misc/rkdynamicsearchline.cpp
+++ b/rkward/misc/rkdynamicsearchline.cpp
@@ -19,7 +19,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 RKDynamicSearchLine::RKDynamicSearchLine (QWidget *parent) : QLineEdit (parent) {
 	RK_TRACE (MISC);
 
-	model = 0;
+	model = nullptr;
 	setClearButtonEnabled (true);
 	setPlaceholderText (i18n ("Search"));
 	timer.setSingleShot (true);
diff --git a/rkward/misc/rkobjectlistview.cpp b/rkward/misc/rkobjectlistview.cpp
index e8202bdf3..dd27d3f0e 100644
--- a/rkward/misc/rkobjectlistview.cpp
+++ b/rkward/misc/rkobjectlistview.cpp
@@ -63,14 +63,14 @@ public:
 RKObjectListView::RKObjectListView (bool toolwindow, QWidget *parent) : QTreeView (parent) {
 	RK_TRACE (APP);
 
-	root_object = 0;
+	root_object = nullptr;
 	rkdelegate = new RKObjectListViewRootDelegate (this);
 	settings = new RKObjectListViewSettings (toolwindow, this);
 	setSortingEnabled (true);
 	sortByColumn (0, Qt::AscendingOrder);
 
 	menu = new QMenu (this);
-	settings->addSettingsToMenu (menu, 0);
+	settings->addSettingsToMenu(menu, nullptr);
 
 	connect (this, &QAbstractItemView::clicked, this, &RKObjectListView::itemClicked);
 }
@@ -204,7 +204,7 @@ RKObjectListViewSettings::RKObjectListViewSettings (bool tool_window, QObject* p
 	update_timer->setSingleShot (true);
 	connect (update_timer, &QTimer::timeout, this, &RKObjectListViewSettings::updateSelfNow);
 
-	filter_widget = 0;
+	filter_widget = nullptr;
 	in_reset_filters = false;
 
 	persistent_settings_actions[ShowObjectsHidden] = new QAction (i18n ("Show Hidden Objects"), this);
diff --git a/rkward/misc/rkobjectlistview.h b/rkward/misc/rkobjectlistview.h
index fa5405814..9751ccb38 100644
--- a/rkward/misc/rkobjectlistview.h
+++ b/rkward/misc/rkobjectlistview.h
@@ -77,7 +77,7 @@ class RKObjectListViewSettings : public QSortFilterProxyModel {
 	Q_OBJECT
 public:
 /** ctor. copies the default settings from RKSettingsModuleObjectBrowser */ 
-	explicit RKObjectListViewSettings (bool toolwindow, QObject* parent=0);
+	explicit RKObjectListViewSettings (bool toolwindow, QObject* parent=nullptr);
 	~RKObjectListViewSettings ();
 
 /** enum of @em persistent settings. There are more settings than these, but those will not be stored */
diff --git a/rkward/misc/rkoutputdirectory.h b/rkward/misc/rkoutputdirectory.h
index e66bf59e7..70b495fe6 100644
--- a/rkward/misc/rkoutputdirectory.h
+++ b/rkward/misc/rkoutputdirectory.h
@@ -40,12 +40,12 @@ public:
 		Ask,
 		Fail
 	};
-	GenericRRequestResult activate(RCommandChain* chain=0);
+	GenericRRequestResult activate(RCommandChain* chain=nullptr);
 	GenericRRequestResult revert(OverwriteBehavior discard=Ask);
 	GenericRRequestResult save(const QString& dest=QString(), OverwriteBehavior overwrite=Ask);
 	GenericRRequestResult exportAs(const QString& dest=QString(), OverwriteBehavior overwrite=Ask);
 	GenericRRequestResult clear(OverwriteBehavior discard=Ask);
-	GenericRRequestResult purge(OverwriteBehavior discard=Ask, RCommandChain* chain=0, bool activate_other=true);
+	GenericRRequestResult purge(OverwriteBehavior discard=Ask, RCommandChain* chain=nullptr, bool activate_other=true);
 	QString getId() const { return id; };
 	bool isEmpty() const;
 	bool isActive() const;
@@ -53,8 +53,8 @@ public:
 	bool isModifiedAccurate() const;
 	/** This function may not always be accurate, but is fast. It is fairly reliable as long as there is an active view, but should not be used when there is not.  */
 	bool isModifiedFast() const;
-	GenericRRequestResult view(bool raise, RCommandChain* chain=0);
-	RKMDIWindow* getOrCreateView(bool raise, RCommandChain* chain=0);
+	GenericRRequestResult view(bool raise, RCommandChain* chain=nullptr);
+	RKMDIWindow* getOrCreateView(bool raise, RCommandChain* chain=nullptr);
 	QString filename() const { return save_filename; };
 	QString workDir() const { return work_dir; }
 	QString workPath() const;
@@ -70,8 +70,8 @@ public:
  *  If no output is active, find and activate the next output without a save url.
  *  If that does not exist, activate and return the next existing output.
  *  If that does not exist, create a new output, activate and return it. */
-	static RKOutputDirectoryCallResult getCurrentOutput(RCommandChain *chain=0);
-	static RKOutputDirectoryCallResult get(const QString &filename=QString(), bool create=false, RCommandChain *chain=0);
+	static RKOutputDirectoryCallResult getCurrentOutput(RCommandChain *chain=nullptr);
+	static RKOutputDirectoryCallResult get(const QString &filename=QString(), bool create=false, RCommandChain *chain=nullptr);
 	static QList<RKOutputDirectory*> allOutputs();
 	static void purgeAllNoAsk();
 
diff --git a/rkward/misc/rkprogresscontrol.cpp b/rkward/misc/rkprogresscontrol.cpp
index 5baf38d44..2ad36969e 100644
--- a/rkward/misc/rkprogresscontrol.cpp
+++ b/rkward/misc/rkprogresscontrol.cpp
@@ -63,7 +63,7 @@ RKProgressControl::RKProgressControl (QObject *parent, const QString &text, cons
 	RKProgressControl::caption = caption;
 	RKProgressControl::mode = mode_flags;
 
-	dialog = 0;
+	dialog = nullptr;
 	is_done = false;
 	modal = false;
 	autodelete = false;
@@ -161,7 +161,7 @@ void RKProgressControl::addRCommand (RCommand *command, bool done_when_finished)
 void RKProgressControl::dialogDestroyed () {
 	RK_TRACE (MISC);
 
-	dialog = 0;
+	dialog = nullptr;
 	if ((!is_done) && (mode & AllowCancel)) {
 		is_done = true;
 		if (mode & AutoCancelCommands) {
diff --git a/rkward/misc/rksaveobjectchooser.cpp b/rkward/misc/rksaveobjectchooser.cpp
index 78c191f8d..24af3cbe7 100644
--- a/rkward/misc/rksaveobjectchooser.cpp
+++ b/rkward/misc/rksaveobjectchooser.cpp
@@ -31,8 +31,8 @@ RKSaveObjectChooser::RKSaveObjectChooser (QWidget *parent, const QString &initia
 	object_exists = false;
 	addNotificationType (RObjectListener::ObjectRemoved);
 	addNotificationType (RObjectListener::ChildAdded);
-	root_object = 0;
-	current_object = 0;
+	root_object = nullptr;
+	current_object = nullptr;
 
 	QVBoxLayout *layout = new QVBoxLayout (this);
 	layout->setContentsMargins (0, 0, 0, 0);
@@ -61,7 +61,7 @@ RKSaveObjectChooser::RKSaveObjectChooser (QWidget *parent, const QString &initia
 	layout->addLayout(hlayout);
 
 	// initialize
-	setRootObject (0);
+	setRootObject(nullptr);
 }
 
 RKSaveObjectChooser::~RKSaveObjectChooser () {
@@ -115,7 +115,7 @@ void RKSaveObjectChooser::selectRootObject () {
 
 	if (dialog->result () == QDialog::Accepted) {
 		RObject::ObjectList sel = list_view->selectedObjects ();
-		if (sel.isEmpty ()) setRootObject (0);
+		if (sel.isEmpty()) setRootObject(nullptr);
 		else {
 			RK_ASSERT (sel.size () == 1);
 			setRootObject (sel[0]);
@@ -129,7 +129,7 @@ void RKSaveObjectChooser::objectRemoved (RObject* removed) {
 	RK_TRACE (MISC);
 
 	if (removed == root_object) {
-		setRootObject (0);
+		setRootObject(nullptr);
 	} else if (removed == current_object) {
 		stopListenForObject (removed);
 		current_full_name.clear ();	// hack to achieve proper Q_EMIT of change signal
diff --git a/rkward/misc/rkspinbox.cpp b/rkward/misc/rkspinbox.cpp
index d22654388..4904b5f7b 100644
--- a/rkward/misc/rkspinbox.cpp
+++ b/rkward/misc/rkspinbox.cpp
@@ -19,7 +19,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 RKSpinBox::RKSpinBox (QWidget *parent) : QSpinBox (parent) {
 	RK_TRACE (MISC);
 
-	validator = 0;
+	validator = nullptr;
 	mode = Integer;
 	real_value = 0;
 	int_value = 0;
diff --git a/rkward/misc/rkstandardactions.h b/rkward/misc/rkstandardactions.h
index 7ef69088b..c01255b80 100644
--- a/rkward/misc/rkstandardactions.h
+++ b/rkward/misc/rkstandardactions.h
@@ -18,13 +18,13 @@ class RKScriptContextProvider;
 
 @author Thomas Friedrichsmeier */
 namespace RKStandardActions {
-	QAction *copyLinesToOutput (RKMDIWindow *window, const QObject *receiver=0, const char *member=0);
+	QAction *copyLinesToOutput (RKMDIWindow *window, const QObject *receiver=nullptr, const char *member=nullptr);
 /** Allows special pasting modes for script windows.
 @param member needs to have the signature void fun (const QString&). */
-	QAction* pasteSpecial (RKMDIWindow *window, const QObject *receiver=0, const char *member=0);
+	QAction* pasteSpecial (RKMDIWindow *window, const QObject *receiver=nullptr, const char *member=nullptr);
 
-	QAction* runCurrent (RKMDIWindow *window, const QObject *receiver=0, const char *member=0, bool current_or_line=false);
-	QAction* runAll (RKMDIWindow *window, const QObject *receiver=0, const char *member=0);
+	QAction* runCurrent (RKMDIWindow *window, const QObject *receiver=nullptr, const char *member=nullptr, bool current_or_line=false);
+	QAction* runAll (RKMDIWindow *window, const QObject *receiver=nullptr, const char *member=nullptr);
 
 	QAction* functionHelp (RKMDIWindow *window, RKScriptContextProvider *context_provider);
 /** Search for current symbol / selection, online. Note that you will not have to connect this action to any slot to work. It does everything by itself.
diff --git a/rkward/misc/rktableview.cpp b/rkward/misc/rktableview.cpp
index 55e083403..8f71bc36e 100644
--- a/rkward/misc/rktableview.cpp
+++ b/rkward/misc/rktableview.cpp
@@ -112,8 +112,8 @@ RKItemDelegate::RKItemDelegate (QObject *parent, RKVarEditModel* datamodel) : QI
 	RK_TRACE (EDITOR);
 
 	RKItemDelegate::datamodel = datamodel;
-	metamodel = 0;
-	genericmodel = 0;
+	metamodel = nullptr;
+	genericmodel = nullptr;
 	locked_for_modal_editor = false;
 }
 
@@ -121,8 +121,8 @@ RKItemDelegate::RKItemDelegate (QObject *parent, RKVarEditMetaModel* metamodel)
 	RK_TRACE (EDITOR);
 
 	RKItemDelegate::metamodel = metamodel;
-	datamodel = 0;
-	genericmodel = 0;
+	datamodel = nullptr;
+	genericmodel = nullptr;
 	locked_for_modal_editor = false;
 }
 
@@ -131,8 +131,8 @@ RKItemDelegate::RKItemDelegate (QObject *parent, QAbstractItemModel* model, bool
 	Q_UNUSED (dummy);
 
 	genericmodel = model;
-	metamodel = 0;
-	datamodel = 0;
+	metamodel = nullptr;
+	datamodel = nullptr;
 	locked_for_modal_editor = false;
 }
 
diff --git a/rkward/misc/rkxmlguipreviewarea.cpp b/rkward/misc/rkxmlguipreviewarea.cpp
index f20f115ee..4c3c5e74d 100644
--- a/rkward/misc/rkxmlguipreviewarea.cpp
+++ b/rkward/misc/rkxmlguipreviewarea.cpp
@@ -105,7 +105,7 @@ RKXMLGUIPreviewArea::~RKXMLGUIPreviewArea () {
 
 	if (current && factory) {
 		factory->removeClient(current);
-		current->setFactory (0);
+		current->setFactory(nullptr);
 	}
 	delete menubar;
 	delete builder;
diff --git a/rkward/misc/rkxmlguisyncer.cpp b/rkward/misc/rkxmlguisyncer.cpp
index c2401b673..f3a3f0bce 100644
--- a/rkward/misc/rkxmlguisyncer.cpp
+++ b/rkward/misc/rkxmlguisyncer.cpp
@@ -10,7 +10,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 
 #include "../debug.h"
 
-RKXMLGUISyncer* RKXMLGUISyncer::syncer = 0;
+RKXMLGUISyncer* RKXMLGUISyncer::syncer = nullptr;
 
 //static
 RKXMLGUISyncer *RKXMLGUISyncer::self () {
@@ -62,7 +62,7 @@ void RKXMLGUISyncer::registerChangeListener (KXMLGUIClient *watched_client, QObj
 
 	KActionCollection *ac = watched_client->actionCollection ();
 
-	RKXMLGUISyncerNotifier *notifier = new RKXMLGUISyncerNotifier (0);
+	RKXMLGUISyncerNotifier *notifier = new RKXMLGUISyncerNotifier(nullptr);
 	d->connect (notifier, SIGNAL (changed(KXMLGUIClient*)), receiver, method);
 
 	d->notifier_map.insert(ac, notifier);
diff --git a/rkward/misc/xmlhelper.cpp b/rkward/misc/xmlhelper.cpp
index e9bb3ab01..73dca384e 100644
--- a/rkward/misc/xmlhelper.cpp
+++ b/rkward/misc/xmlhelper.cpp
@@ -38,9 +38,9 @@ QDomElement XMLHelper::openXMLFile (int debug_level, bool with_includes, bool wi
 	QDomDocument doc;
 
 	QFile f (filename);
-	if (!f.open (QIODevice::ReadOnly)) displayError (0, i18n("Could not open file %1 for reading", filename), debug_level, DL_ERROR);
+	if (!f.open(QIODevice::ReadOnly)) displayError(nullptr, i18n("Could not open file %1 for reading", filename), debug_level, DL_ERROR);
 	if (!doc.setContent(&f, false, &error_message, &error_line, &error_column)) {
-		displayError (0, i18n ("Error parsing XML-file. Error-message was: '%1' in line '%2', column '%3'. Expect further errors to be reported below", error_message, error_line, error_column), debug_level, DL_ERROR);
+		displayError(nullptr, i18n("Error parsing XML-file. Error-message was: '%1' in line '%2', column '%3'. Expect further errors to be reported below", error_message, error_line, error_column), debug_level, DL_ERROR);
 		return QDomElement ();
 	}
 	f.close();
diff --git a/rkward/misc/xmlhelper.h b/rkward/misc/xmlhelper.h
index 004e4fc68..ab44d396e 100644
--- a/rkward/misc/xmlhelper.h
+++ b/rkward/misc/xmlhelper.h
@@ -27,7 +27,7 @@ public:
 /** create an instance of XMLHelper.
  @param filename the name of the file to parse. The file is not yet opened on construction. Use openXMLFile() for that. 
  @param default_catalog message catalog to use in case none is specified in the xml file itself. */
-	explicit XMLHelper (const QString &filename, const RKMessageCatalog *default_catalog=0);
+	explicit XMLHelper (const QString &filename, const RKMessageCatalog *default_catalog=nullptr);
 /** destructor */
 	~XMLHelper ();
 /** Return the a pointer to the message catalog in use. This may - or may not - be the same as specified as default catalog in the constructor.
diff --git a/rkward/plugin/rkabstractoptionselector.cpp b/rkward/plugin/rkabstractoptionselector.cpp
index a3efd31d9..7994e9eaf 100644
--- a/rkward/plugin/rkabstractoptionselector.cpp
+++ b/rkward/plugin/rkabstractoptionselector.cpp
@@ -48,7 +48,7 @@ void RKAbstractOptionSelector::addOptionsAndInit (const QDomElement &element) {
 
 		Option *opt = new Option;
 		opt->value = value;
-		opt->enabledness_prop = 0;
+		opt->enabledness_prop = nullptr;
 
 		options.insert (i, opt);
 		if (!name.isNull ()) named_options.insert (name, opt);
@@ -133,7 +133,7 @@ void RKAbstractOptionSelector::propertyChanged (RKComponentPropertyBase *propert
 void RKAbstractOptionSelector::ItemPropertyChanged (RKComponentPropertyBase *property) {
 	RK_TRACE (PLUGIN);
 
-	Option *opt = 0;
+	Option *opt = nullptr;
 	int id = -1;
 	for (OptionsMap::const_iterator it = options.cbegin(); it != options.cend(); ++it) {
 		RK_ASSERT (it.value ());
diff --git a/rkward/plugin/rkcheckbox.cpp b/rkward/plugin/rkcheckbox.cpp
index b7c9b8cbc..76a838e15 100644
--- a/rkward/plugin/rkcheckbox.cpp
+++ b/rkward/plugin/rkcheckbox.cpp
@@ -33,7 +33,7 @@ RKCheckBox::RKCheckBox (const QDomElement &element, RKComponent *parent_componen
 
 	// initialize
 	updating = false;
-	changedState (0);
+	changedState(nullptr);
 }
 
 RKCheckBox::~RKCheckBox () {
diff --git a/rkward/plugin/rkcomponent.h b/rkward/plugin/rkcomponent.h
index 898032052..73b50aaa1 100644
--- a/rkward/plugin/rkcomponent.h
+++ b/rkward/plugin/rkcomponent.h
@@ -79,7 +79,7 @@ public:
 	virtual RKComponentBase* lookupComponent (const QString &identifier, QString *remainder);
 /** Convenience wrapper around lookupComponent(), which will only return properties or 0, and optionally warn, if no prop could be found
 @param remainder In contrast to lookupComponent, this can be 0. In this case only exact matches are returned. */
-	RKComponentPropertyBase* lookupProperty (const QString &identifier, QString *remainder=0, bool warn=true);
+	RKComponentPropertyBase* lookupProperty (const QString &identifier, QString *remainder=nullptr, bool warn=true);
 /** Locate the component.subcomponent.property.value described by identifier and return its value as a string. Especially useful as a callback in code templates! Recursively walks subcomponents/properties until the requested value is found. @See RKComponentBase::lookupComponent */
 	QString fetchStringValue (const QString &identifier);
 	static QString fetchStringValue (RKComponentBase* prop, const QString &modifier=QString ());
@@ -196,7 +196,7 @@ public:
 /** The parent of this component. Should be notified, whenever isSatisfied () or recursiveStatus () changed. */
 	RKComponent *parentComponent () const { return _parent; };
 /** The standard component containing this component (if any). If @param id_adjust is given, it will be set to a relative path to the standard component. */
-	RKStandardComponent *standardComponent (QString *id_adjust=0) const;
+	RKStandardComponent *standardComponent (QString *id_adjust=nullptr) const;
 /** Like standardcomponent, but will return the topmost component in case of embedding. */
 	RKStandardComponent *topmostStandardComponent ();
 /** Return a properly initialize helper for parsing XML in this component. */
diff --git a/rkward/plugin/rkcomponentmap.cpp b/rkward/plugin/rkcomponentmap.cpp
index db1b6f258..6e553e798 100644
--- a/rkward/plugin/rkcomponentmap.cpp
+++ b/rkward/plugin/rkcomponentmap.cpp
@@ -244,7 +244,7 @@ RKComponentGUIXML::Menu *findMenu (RKComponentGUIXML::Menu *parent, const QStrin
 			if (e->is_menu && (e->id == id)) return static_cast<RKComponentGUIXML::Menu*> (e);
 		}
 	}
-	return 0;
+	return nullptr;
 }
 
 int RKComponentGUIXML::addEntries (RKComponentGUIXML::Menu *menu, XMLHelper &xml, const QDomElement &description, const QString& cnamespace) {
@@ -405,7 +405,7 @@ RKComponentHandle* RKComponentMap::getComponentHandleLocal (const QString &id) {
 	RK_TRACE (PLUGIN);
 
 	QList<RKComponentHandle*> candidates = components.values (id);
-	if (candidates.isEmpty ()) return 0;
+	if (candidates.isEmpty ()) return nullptr;
 	if (candidates.length () == 1) return candidates.first ();
 
 	RK_DEBUG (PLUGIN, DL_INFO, "Looking for latest version of component %s, among %d candidates", qPrintable (id), candidates.size ());
@@ -703,7 +703,7 @@ void RKComponentMap::activateComponent () {
 		RK_ASSERT (handle);
 		return;
 	}
-	handle->invoke (0, 0);
+	handle->invoke(nullptr, nullptr);
 }
 
 void RKComponentMap::addedEntry (const QString &id, RKComponentHandle *handle) {
diff --git a/rkward/plugin/rkcomponentmap.h b/rkward/plugin/rkcomponentmap.h
index 8c22e296a..57fbda1bd 100644
--- a/rkward/plugin/rkcomponentmap.h
+++ b/rkward/plugin/rkcomponentmap.h
@@ -18,7 +18,7 @@ class XMLHelper;
 /** very simple helper class to keep track of .pluginmap files */
 class RKPluginMapFile {
 public:
-	RKPluginMapFile (const QString &filename, const QString &basedir, const RKMessageCatalog *_catalog) { RKPluginMapFile::filename = filename; RKPluginMapFile::basedir = basedir; catalog = _catalog; about = 0; };
+	RKPluginMapFile (const QString &filename, const QString &basedir, const RKMessageCatalog *_catalog) : basedir(basedir), filename(filename), catalog(_catalog), about(nullptr) {};
 	~RKPluginMapFile () { delete about; };
 
 	QString getBaseDir () const { return basedir; };
diff --git a/rkward/plugin/rkcomponentproperties.cpp b/rkward/plugin/rkcomponentproperties.cpp
index 046b0fb31..47543eb6a 100644
--- a/rkward/plugin/rkcomponentproperties.cpp
+++ b/rkward/plugin/rkcomponentproperties.cpp
@@ -806,7 +806,7 @@ RKComponentPropertyRObjects::RKComponentPropertyRObjects (QObject *parent, bool
 RKComponentPropertyRObjects::~RKComponentPropertyRObjects () {
 	RK_TRACE (PLUGIN);
 
-	setObjectValueSilent (0);
+	setObjectValueSilent(nullptr);
 }
 
 bool RKComponentPropertyRObjects::addObjectValue (RObject *object) {
@@ -959,7 +959,7 @@ QString RKComponentPropertyRObjects::checkObjectProblems (RObject *object) const
 RObject *RKComponentPropertyRObjects::objectValue () {
 	RK_TRACE (PLUGIN);
 
-	if (object_list.empty ()) return 0;
+	if (object_list.empty()) return nullptr;
 	return (object_list.first ());
 }
 
@@ -994,7 +994,7 @@ QVariant RKComponentPropertyRObjects::value (const QString &modifier) {
 bool RKComponentPropertyRObjects::setValueList (const QStringList& values) {
 	RK_TRACE (PLUGIN);
 
-	setObjectValue (0);
+	setObjectValue(nullptr);
 
 	bool ok = true;
 	for (int i = 0; i < values.size (); ++i) {
@@ -1212,7 +1212,7 @@ void RKComponentPropertyConvert::setMode (ConvertMode mode) {
 	RK_TRACE (PLUGIN);
 
 	_mode = mode;
-	sourcePropertyChanged (0);
+	sourcePropertyChanged(nullptr);
 }
 
 void RKComponentPropertyConvert::setSources (const QStringList &source_ids) {
@@ -1231,14 +1231,14 @@ void RKComponentPropertyConvert::setSources (const QStringList &source_ids) {
 		}
 	}
 
-	sourcePropertyChanged (0);
+	sourcePropertyChanged(nullptr);
 }
 
 void RKComponentPropertyConvert::setStandard (const QString &standard) {
 	RK_TRACE (PLUGIN);
 
 	RKComponentPropertyConvert::standard = standard;
-	sourcePropertyChanged (0);
+	sourcePropertyChanged(nullptr);
 }
 
 void RKComponentPropertyConvert::setRange (double min, double max) {
@@ -1246,7 +1246,7 @@ void RKComponentPropertyConvert::setRange (double min, double max) {
 
 	RKComponentPropertyConvert::min = min;
 	RKComponentPropertyConvert::max = max;
-	sourcePropertyChanged (0);
+	sourcePropertyChanged(nullptr);
 }
 
 void RKComponentPropertyConvert::selfChanged (RKComponentPropertyBase *) {
@@ -1357,7 +1357,7 @@ RKComponentPropertySwitch::RKComponentPropertySwitch (RKComponent* parent, const
 
 	RKComponentPropertySwitch::def_values = def_values;
 	RKComponentPropertySwitch::standards = standards;
-	condition_prop = 0;
+	condition_prop = nullptr;
 	c_parent = parent;
 
 	connect (this, &RKComponentPropertyBase::valueChanged, this, &RKComponentPropertySwitch::selfChanged);
@@ -1396,7 +1396,7 @@ QVariant RKComponentPropertySwitch::value (const QString& modifier) {
 	QVariant cond = condition_prop->value (condition_prop_modifier);
 	int index = 0;
 	if (standards.isEmpty ()) {
-		if (RKComponentPropertyBool::variantToBool (cond, 0)) index = 1;
+		if (RKComponentPropertyBool::variantToBool(cond, nullptr)) index = 1;
 	} else {
 		index = standards.indexOf (cond.toString ());		// NOTE: list search. Could use a hash, instead, but in general there won't be more than a hand full of standards
 		if (index < 0) index = standards.size ();	// remainder-category
@@ -1433,7 +1433,7 @@ void RKComponentPropertySwitch::setSources (const QString& _condition_prop, cons
 
 	for (int i = 0; i < _value_props.size (); ++i) {
 		QString mod;
-		RKComponentPropertyBase *p = 0;
+		RKComponentPropertyBase *p = nullptr;
 		if (!_value_props[i].isEmpty ()) p = c_parent->lookupProperty (_value_props[i], &mod, true);	// Don't try to look it up, if it's empty (as it always is for fixed_value, as this would generate a warning.)
 		value_props.append (p);	// NOTE: Even if it is 0. value() takes care of that.
 		value_prop_mods.append (mod);
diff --git a/rkward/plugin/rkformula.cpp b/rkward/plugin/rkformula.cpp
index 7890d6330..5f56f676c 100644
--- a/rkward/plugin/rkformula.cpp
+++ b/rkward/plugin/rkformula.cpp
@@ -149,7 +149,7 @@ void RKFormula::makeModelString () {
 	QString table_string, model_string, labels_string;
 	mangled_names.clear ();
 	RObject *dep_var = dependent->objectValue ();
-	RObject *container = 0;
+	RObject *container = nullptr;
 	if (dep_var) {
 		model_ok = true;
 	}
@@ -259,7 +259,7 @@ void RKFormula::addButtonClicked () {
 	// check for duplicates (remove from old list - new terms might have a different order of naming)
 	for (int inter = 0; inter < interactions.count (); ++inter) {
 		Interaction new_inter = interactions[inter];
-		QTreeWidgetItem *dupe = 0;
+		QTreeWidgetItem *dupe = nullptr;
 		for (InteractionMap::Iterator it = interaction_map.begin (); it != interaction_map.end (); ++it) {
 			Interaction existing_inter = it.value ();
 			// BEGIN: actual comparison
diff --git a/rkward/plugin/rkinput.cpp b/rkward/plugin/rkinput.cpp
index 0779cda27..dd83da477 100644
--- a/rkward/plugin/rkinput.cpp
+++ b/rkward/plugin/rkinput.cpp
@@ -22,8 +22,8 @@ SPDX-License-Identifier: GPL-2.0-or-later
 RKInput::RKInput (const QDomElement &element, RKComponent *parent_component, QWidget *parent_widget) : RKComponent (parent_component, parent_widget) {
 	RK_TRACE (PLUGIN);
 
-	textedit = 0;
-	lineedit = 0;
+	textedit = nullptr;
+	lineedit = nullptr;
 
 	// get xml-helper
 	XMLHelper *xml = parent_component->xmlHelper ();
diff --git a/rkward/plugin/rkoptionset.cpp b/rkward/plugin/rkoptionset.cpp
index c3cb8b1cd..1a1450a14 100644
--- a/rkward/plugin/rkoptionset.cpp
+++ b/rkward/plugin/rkoptionset.cpp
@@ -119,16 +119,16 @@ RKOptionSet::RKOptionSet (const QDomElement &element, RKComponent *parent_compon
 		column_map.insert (column_property, col_inf);
 	}
 
-	keycolumn = 0;
+	keycolumn = nullptr;
 	QString keycol = xml->getStringAttribute (element, "keycolumn", QString (), DL_DEBUG);
 	if (!keycol.isEmpty ()) {
 		keycolumn = static_cast<RKComponentPropertyStringList*> (child_map.value (keycol));
 		if (!column_map.contains (keycolumn)) {
 			RK_DEBUG (PLUGIN, DL_ERROR, "optionset does not contain an optioncolumn named %s. Falling back to manual insertion mode", qPrintable (keycol));
-			keycolumn = 0;
+			keycolumn = nullptr;
 		} else if (!column_map[keycolumn].external) {
 			RK_DEBUG (PLUGIN, DL_ERROR, "keycolumn (%s) is not marked as external. Falling back to manual insertion mode", qPrintable (keycol));
-			keycolumn = 0;
+			keycolumn = nullptr;
 		} else {
 			updating = true;
 			keycolumn->setValue (KEYCOLUMN_UNINITIALIZED_VALUE);
@@ -270,7 +270,7 @@ void RKOptionSet::serializationPropertyChanged (RKComponentPropertyBase* propert
 	QList<RowInfo> new_rows;
 	int row = 0;
 	QStringList items = fetchStringValue (property).split ('\n');
-	bool keys_missing = (keycolumn != 0);
+	bool keys_missing = (keycolumn != nullptr);
 	for (int i = 0; i < items.size (); ++i) {
 		const QString &item = items[i];
 		int sep = item.indexOf ('=');
@@ -688,7 +688,7 @@ void RKOptionSet::setContentsForRow (int row) {
 		// from the default_row_state, instead.
 		for (PropertyValueMap::const_iterator it = default_row_state.constBegin (); it != default_row_state.constEnd (); ++it) {
 			if (!map->contains (it.key ())) {
-				RKComponentPropertyBase *prop = contents_container->lookupProperty (it.key (), 0, true);
+				RKComponentPropertyBase *prop = contents_container->lookupProperty(it.key(), nullptr, true);
 				if (prop) {		// found a property
 					RK_ASSERT (!prop->isInternal ());
 					prop->setValue (it.value ());
diff --git a/rkward/plugin/rkpluginframe.cpp b/rkward/plugin/rkpluginframe.cpp
index 12fbeaa74..5a0074e6b 100644
--- a/rkward/plugin/rkpluginframe.cpp
+++ b/rkward/plugin/rkpluginframe.cpp
@@ -27,7 +27,7 @@ RKPluginFrame::RKPluginFrame (const QDomElement &element, RKComponent *parent_co
 	QVBoxLayout *inner = new QVBoxLayout (frame);
 	inner->setSpacing(RKStyle::spacingHint());
 
-	checked = 0;
+	checked = nullptr;
 	if (xml->getBoolAttribute (element, "checkable", false, DL_INFO)) {
 		frame->setCheckable (true);
 		frame->setChecked (xml->getBoolAttribute (element, "checked", true, DL_INFO));
diff --git a/rkward/plugin/rkpreviewbox.cpp b/rkward/plugin/rkpreviewbox.cpp
index b5dca420d..9b2dbda95 100644
--- a/rkward/plugin/rkpreviewbox.cpp
+++ b/rkward/plugin/rkpreviewbox.cpp
@@ -102,7 +102,7 @@ RKPreviewBox::RKPreviewBox (const QDomElement &element, RKComponent *parent_comp
 		connect (code_property, &RKComponentPropertyBase::valueChanged, this, &RKPreviewBox::changedCode);
 	} else {
 		RK_DEBUG (PLUGIN, DL_WARNING, "Could not find code property in preview box (remainder: %s)", dummy.toLatin1().data ());
-		code_property = 0;
+		code_property = nullptr;
 	}
 
 	// initialize
@@ -110,7 +110,7 @@ RKPreviewBox::RKPreviewBox (const QDomElement &element, RKComponent *parent_comp
 	update_timer->setSingleShot (true);
 	connect (update_timer, &QTimer::timeout, this, &RKPreviewBox::tryPreviewNow);
 	updating = false;
-	changedState (0);
+	changedState(nullptr);
 }
 
 RKPreviewBox::~RKPreviewBox () {
diff --git a/rkward/plugin/rkstandardcomponent.cpp b/rkward/plugin/rkstandardcomponent.cpp
index 7c9b09384..d3298c2ee 100644
--- a/rkward/plugin/rkstandardcomponent.cpp
+++ b/rkward/plugin/rkstandardcomponent.cpp
@@ -55,12 +55,12 @@ RKStandardComponent::RKStandardComponent (RKComponent *parent_component, QWidget
 
 	RKStandardComponent::filename = filename;
 	RKStandardComponent::id = id;
-	command_chain = 0;
-	backend = 0;
-	scripting = 0;
-	gui = 0;
-	wizard = 0;
-	xml = 0;
+	command_chain = nullptr;
+	backend = nullptr;
+	scripting = nullptr;
+	gui = nullptr;
+	wizard = nullptr;
+	xml = nullptr;
 	created = false;
 	killed = false;
 	addChild ("code", code = new RKComponentPropertyCode (this, true));		// do not change this name!
@@ -108,7 +108,7 @@ RKStandardComponent::RKStandardComponent (RKComponent *parent_component, QWidget
 	connect (backend, &ScriptBackend::idle, this, &RKStandardComponent::backendIdle);
 	connect (backend, &ScriptBackend::requestValue, this, &RKStandardComponent::getValue);
 	connect (backend, &ScriptBackend::haveError, this, &RKStandardComponent::kill);
-	if (!backend->initialize (code, parent_component == 0)) return;
+	if (!backend->initialize (code, parent_component == nullptr)) return;
 
 	// check for existence of help file
 	element = xml->getChildElement(doc_element, "help", DL_WARNING);
@@ -221,7 +221,7 @@ XMLHelper* RKStandardComponent::getXmlHelper () {
 
 	if (!xml) {
 		RKComponentHandle *handle = RKComponentMap::getComponentHandle (id);
-		xml = new XMLHelper (filename, handle ? handle->messageCatalog () : 0);
+		xml = new XMLHelper(filename, handle ? handle->messageCatalog() : nullptr);
 	}
 	return xml;
 }
@@ -309,8 +309,8 @@ void RKStandardComponent::discard () {
 	created = false;
 	gui->hide ();
 	gui->deleteLater ();
-	gui = 0;
-	wizard = 0;
+	gui = nullptr;
+	wizard = nullptr;
 
 	// clear all properties. Not the code property, as the script backend relies on it
 	for (auto it = child_map.constBegin (); it != child_map.constEnd (); ++it) {
@@ -360,7 +360,7 @@ RKXMLGUIPreviewArea* RKStandardComponent::addDockedPreview (RKComponentPropertyB
 	RK_TRACE (PLUGIN);
 
 	RK_ASSERT (gui);
-	if (!gui) return 0;
+	if (!gui) return nullptr;
 	return gui->addDockedPreview (controller, label, id);
 }
 
@@ -445,7 +445,7 @@ void RKStandardComponent::getValue (const QString &id, const int hint) {
 bool RKStandardComponent::isWizardish () {
 	RK_TRACE (PLUGIN);
 
-	if (gui) return (wizard != 0);
+	if (gui) return (wizard != nullptr);
 	if (parentComponent ()) return (parentComponent ()->isWizardish ());
 	return false;
 }
diff --git a/rkward/plugin/rkstandardcomponent.h b/rkward/plugin/rkstandardcomponent.h
index 0eb973ebc..b0ba522b0 100644
--- a/rkward/plugin/rkstandardcomponent.h
+++ b/rkward/plugin/rkstandardcomponent.h
@@ -63,7 +63,7 @@ public:
 /** Submits the current code (by simulating a click on the ok button).
 @param in_chain The command chain to insert the command in (0 for regular command stack).
 @return false, if the plugin-code could not be submitted (e.g. plugin was not satisfied) */
-	bool submit (RCommandChain *in_chain = 0);
+	bool submit(RCommandChain *in_chain = nullptr);
 /** convenience access function: closes the corresponding GUI */
 	void close ();
 /** reimplemented to actually return Dead or Processing when appropriate */
diff --git a/rkward/plugin/rkstandardcomponentgui.cpp b/rkward/plugin/rkstandardcomponentgui.cpp
index 7b491a65c..907af957e 100644
--- a/rkward/plugin/rkstandardcomponentgui.cpp
+++ b/rkward/plugin/rkstandardcomponentgui.cpp
@@ -124,10 +124,10 @@ RKStandardComponentGUI::RKStandardComponentGUI (RKStandardComponent *component,
 {
 	RK_TRACE (PLUGIN);
 
-	toggle_code_box = 0;
-	hsplitter = 0;
-	vsplitter = 0;
-	code_display = 0;
+	toggle_code_box = nullptr;
+	hsplitter = nullptr;
+	vsplitter = nullptr;
+	code_display = nullptr;
 
 	RKStandardComponentGUI::component = component;
 	RKStandardComponentGUI::code_property = code_property;
@@ -144,7 +144,7 @@ RKStandardComponentGUI::RKStandardComponentGUI (RKStandardComponent *component,
 	if (!enslaved) {
 		// code display
 		RKXMLGUIPreviewArea *area = addDockedPreview (&code_display_visibility, i18n ("Code Preview"), QString (), true);
-		code_display = new RKCommandEditorWindow (0, QUrl (), QString (), RKCommandEditorFlags::DefaultToRHighlighting);
+		code_display = new RKCommandEditorWindow(nullptr, QUrl(), QString(), RKCommandEditorFlags::DefaultToRHighlighting);
 		code_display->setReadOnly (true);
 		code_display_visibility.setBoolValue (!enslaved && RKSettingsModulePlugins::showCodeByDefault ());
 		area->setWindow(code_display);
@@ -272,7 +272,7 @@ void RKStandardComponentGUI::finalize () {
 RKXMLGUIPreviewArea* RKStandardComponentGUI::addDockedPreview (RKComponentPropertyBool *controller, const QString& label, const QString &id, bool bottom) {
 	RK_TRACE (PLUGIN);
 
-	RKXMLGUIPreviewArea *area = new RKXMLGUIPreviewArea (label, 0);
+	RKXMLGUIPreviewArea *area = new RKXMLGUIPreviewArea(label, nullptr);
 	PreviewArea parea;
 	parea.preview_area = area;
 	parea.widget = area;   // may be replaced by a wrapper in "finalize"
@@ -350,7 +350,7 @@ void RKStandardComponentGUI::doPostShowCleanup () {
 	if (toggle_code_box) {  // is Dialog
 		hpreview_area->setMinimumWidth (80);
 		vpreview_area->setMinimumHeight (40);
-		previewVisibilityChanged (0);
+		previewVisibilityChanged(nullptr);
 	}
 }
 
diff --git a/rkward/plugin/rkvarselector.cpp b/rkward/plugin/rkvarselector.cpp
index ba0c782e7..c1abeb83f 100644
--- a/rkward/plugin/rkvarselector.cpp
+++ b/rkward/plugin/rkvarselector.cpp
@@ -64,7 +64,7 @@ RKVarSelector::RKVarSelector (const QDomElement &element, RKComponent *parent_co
 	show_all_envs_action->setToolTip (i18n ("Show objects in all environments on the <i>search()</i> path, instead of just those in <i>.GlobalEnv</i>. Check this, if you want to select objects from a loaded package."));
 	connect (show_all_envs_action, &QAction::toggled, this, &RKVarSelector::rootChanged);
 
-	filter_widget = 0;
+	filter_widget = nullptr;
 	filter_widget_placeholder = new QVBoxLayout ();
 	filter_widget_placeholder->setContentsMargins (0, 0, 0, 0);
 	vbox->addLayout (filter_widget_placeholder);
diff --git a/rkward/rbackend/rcommand.cpp b/rkward/rbackend/rcommand.cpp
index edeff2124..2a00b8129 100644
--- a/rkward/rbackend/rcommand.cpp
+++ b/rkward/rbackend/rcommand.cpp
@@ -15,7 +15,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 
 
 RCommand* RCommandChain::toCommand() {
-	return (is_command ? static_cast<RCommand*> (this) : 0);
+	return (is_command ? static_cast<RCommand*>(this) : nullptr);
 }
 
 
@@ -43,7 +43,7 @@ RCommand::RCommand(const QString &command, int type, const QString &rk_equiv) :
 	status = 0;
 	has_been_run_up_to = 0;
 	_rk_equiv = rk_equiv;
-	_notifier = 0;
+	_notifier = nullptr;
 }
 
 RCommand::~RCommand(){
diff --git a/rkward/rbackend/rcommandstack.cpp b/rkward/rbackend/rcommandstack.cpp
index 0c923aff7..1042e6fd1 100644
--- a/rkward/rbackend/rcommandstack.cpp
+++ b/rkward/rbackend/rcommandstack.cpp
@@ -21,7 +21,7 @@ RCommandStack *RCommandStack::regular_stack;
 RCommandStack::RCommandStack () : RCommandChain () {
 	RK_TRACE (RBACKEND);
 	closed = false;
-	parent = 0;
+	parent = nullptr;
 }
 
 RCommandStack::~RCommandStack () {
@@ -98,7 +98,7 @@ RCommand* RCommandStack::currentCommand () {
 
 	RCommandChain *ret = activeSubItemOf (regular_stack);
 	if (ret) return ret->toCommand ();	// might still be 0, if it is not a command
-	return 0;
+	return nullptr;
 }
 
 RCommandChain* RCommandStack::activeSubItemOf (RCommandChain* item) {
@@ -155,11 +155,11 @@ bool RCommandStack::popIfCompleted (RCommandChain* item) {
 #define NUM_COLS 4
 
 // static
-RCommandStackModel* RCommandStackModel::static_model = 0;
+RCommandStackModel* RCommandStackModel::static_model = nullptr;
 
 RCommandStackModel::RCommandStackModel (QObject *parent) : QAbstractItemModel (parent) {
 	RK_TRACE (RBACKEND);
-	RK_ASSERT (static_model == 0);	// only one instance should be created
+	RK_ASSERT(static_model == nullptr);	// only one instance should be created
 
 	static_model = this;
 	listeners = 0;
@@ -168,7 +168,7 @@ RCommandStackModel::RCommandStackModel (QObject *parent) : QAbstractItemModel (p
 RCommandStackModel::~RCommandStackModel () {
 	RK_TRACE (RBACKEND);
 
-	static_model = 0;
+	static_model = nullptr;
 	RK_ASSERT (!listeners);
 }
 
@@ -189,7 +189,7 @@ QModelIndex RCommandStackModel::index (int row, int column, const QModelIndex& p
 	RK_ASSERT (listeners > 0);
 	RK_TRACE (RBACKEND);
 
-	RCommandChain* index_data = 0;
+	RCommandChain* index_data = nullptr;
 	if (!parent.isValid ()) {
 		index_data = RCommandStack::regular_stack;
 	} else {
diff --git a/rkward/rbackend/rdata.cpp b/rkward/rbackend/rdata.cpp
index d78fedcad..7f1e42e7a 100644
--- a/rkward/rbackend/rdata.cpp
+++ b/rkward/rbackend/rdata.cpp
@@ -14,7 +14,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 RData::RData () {
 	RK_TRACE (RBACKEND);
 	datatype = NoData;
-	data = 0;
+	data = nullptr;
 }
 
 RData::~RData () {
@@ -46,7 +46,7 @@ void RData::discardData () {
 		RK_ASSERT (datatype == NoData);
 	}
 
-	data = 0;
+	data = nullptr;
 	datatype = RData::NoData;
 }
 
@@ -62,7 +62,7 @@ void RData::swallowData (RData &from) {
 	data = from.data;
 	datatype = from.datatype;
 
-	from.data = 0;
+	from.data = nullptr;
 	from.datatype = RData::NoData;
 }
 
diff --git a/rkward/rbackend/rkasyncdatastreamhelper.h b/rkward/rbackend/rkasyncdatastreamhelper.h
index 08bd4f44b..a70ca6652 100644
--- a/rkward/rbackend/rkasyncdatastreamhelper.h
+++ b/rkward/rbackend/rkasyncdatastreamhelper.h
@@ -35,7 +35,7 @@ public:
 			auxstream (&auxbuffer, QIODevice::ReadWrite),
 			instream (&inbuffer, QIODevice::ReadOnly), 
 			outstream (&outbuffer, QIODevice::WriteOnly) {
-		device = 0;
+		device = nullptr;
 		expected_read_size = 0;
 	}
 	~RKAsyncDataStreamHelper () {};
diff --git a/rkward/rbackend/rkbackendtransmitter.cpp b/rkward/rbackend/rkbackendtransmitter.cpp
index d83e20def..44ce4b4e5 100644
--- a/rkward/rbackend/rkbackendtransmitter.cpp
+++ b/rkward/rbackend/rkbackendtransmitter.cpp
@@ -76,7 +76,7 @@ void RKRBackendTransmitter::doExit(){
 	auto con = connection;
 	killTimer(flushtimerid);
 	connection->waitForBytesWritten (1000);
-	connection = 0; // See handleTransmissionError
+	connection = nullptr; // See handleTransmissionError
 	RK_DEBUG(RBACKEND, DL_DEBUG, "Aborting connection to frontend");
 	con->abort();  // TODO: This never seems to complete!
 	RK_DEBUG(RBACKEND, DL_DEBUG, "Done aborting connection to frontend");
@@ -118,7 +118,7 @@ void RKRBackendTransmitter::requestReceived (RBackendRequest* request) {
 
 		// "Synchronous" requests are not necessarily answered in the order they have been queued
 		int id = request->id;
-		RBackendRequest* current_sync_request = 0;
+		RBackendRequest* current_sync_request = nullptr;
 		for (int i = current_sync_requests.size () - 1; i >= 0; --i) {
 			RBackendRequest *candidate = current_sync_requests[i];
 			if (id == candidate->id) {
diff --git a/rkward/rbackend/rkrbackend.cpp b/rkward/rbackend/rkrbackend.cpp
index 3a6567eef..2dc847853 100644
--- a/rkward/rbackend/rkrbackend.cpp
+++ b/rkward/rbackend/rkrbackend.cpp
@@ -157,7 +157,7 @@ void clearPendingInterrupt_Worker (void *) {
 
 void RKRBackend::clearPendingInterrupt () {
 	RK_TRACE (RBACKEND);
-	bool passed = R_ToplevelExec (clearPendingInterrupt_Worker, 0);
+	bool passed = R_ToplevelExec(clearPendingInterrupt_Worker, nullptr);
 	if (!passed) RK_DEBUG (RBACKEND, DL_DEBUG, "pending interrupt cleared");
 }
 
@@ -203,7 +203,7 @@ void RKInsertToplevelStatementFinishedCallback (void *) {
 
 	if (RKRBackend::this_pointer->r_running) {
 		int pos;
-		Rf_addTaskCallback (&RKToplevelStatementFinishedCallback, 0, &RKInsertToplevelStatementFinishedCallback, "_rkward_main_callback", &pos);
+		Rf_addTaskCallback(&RKToplevelStatementFinishedCallback, nullptr, &RKInsertToplevelStatementFinishedCallback, "_rkward_main_callback", &pos);
 	}
 }
 
@@ -867,7 +867,7 @@ void RKRBackend::connectCallbacks () {
 	ptr_R_ShowMessage = RShowMessage;		// rarely used in R on unix
 	ptr_R_ReadConsole = RReadConsole;
 	ptr_R_WriteConsoleEx = RWriteConsoleEx;
-	ptr_R_WriteConsole = 0;
+	ptr_R_WriteConsole = nullptr;
 	ptr_R_ResetConsole = RDoNothing;
 	ptr_R_FlushConsole = RDoNothing;
 	ptr_R_ClearerrConsole = RDoNothing;
@@ -1149,12 +1149,12 @@ bool RKRBackend::startR () {
 		{ "rk.capture.output", (DL_FUNC) (void*) &doCaptureOutput, 6 },
 		{ "rk.graphics.device", (DL_FUNC) (void*) &RKStartGraphicsDevice, 7},
 		{ "rk.graphics.device.resize", (DL_FUNC) (void*) &RKD_AdjustSize, 2},
-		{ 0, 0, 0 }
+		{ nullptr, nullptr, 0 }
 	};
 	R_registerRoutines (R_getEmbeddingDllInfo(), NULL, callMethods, NULL, NULL);
 
 	connectCallbacks();
-	RKInsertToplevelStatementFinishedCallback (0);
+	RKInsertToplevelStatementFinishedCallback(nullptr);
 	RKREventLoop::setRKEventHandler (doPendingPriorityCommands);
 	default_global_context = R_GlobalContext;
 #ifdef Q_OS_WIN
@@ -1241,7 +1241,7 @@ struct SafeParseWrap {
 
 void safeParseVector (void *data) {
 	SafeParseWrap *wrap = static_cast<SafeParseWrap*> (data);
-	wrap->pr = 0;
+	wrap->pr = nullptr;
 	// TODO: Maybe we can use R_ParseGeneral instead. Then we could find the exact character, where parsing fails. Nope: not exported API
 	wrap->pr = R_ParseVector (wrap->cv, -1, &(wrap->status), R_NilValue);
 }
@@ -1443,7 +1443,7 @@ void doPendingPriorityCommands () {
 
 	if (RKRBackend::this_pointer->killed) return;
 	RCommandProxy *command = RKRBackend::this_pointer->pending_priority_command;
-	RKRBackend::this_pointer->pending_priority_command = 0;
+	RKRBackend::this_pointer->pending_priority_command = nullptr;
 	if (command) {
 		RK_DEBUG (RBACKEND, DL_DEBUG, "running priority command %s", qPrintable (command->command));
 		{
@@ -1510,7 +1510,7 @@ void RKRBackend::printAndClearCapturedMessages (bool with_header) {
 void RKRBackend::run (const QString &locale_dir) {
 	RK_TRACE (RBACKEND);
 	killed = NotKilled;
-	previous_command = 0;
+	previous_command = nullptr;
 
 	initialize (locale_dir);
 
@@ -1578,12 +1578,12 @@ RCommandProxy * RKRBackend::handleRequest2(RBackendRequest* request, bool mayHan
 	if ((!request->synchronous) && (!isKilled ())) {
 		RK_ASSERT(mayHandleSubstack);	// i.e. not called from fetchNextCommand
 		RK_ASSERT(!request->subcommandrequest);
-		return 0;
+		return nullptr;
 	}
 
 	int i = 0;
 	while (!request->done) {
-		if (killed) return 0;
+		if (killed) return nullptr;
 		// NOTE: processX11Events() may, conceivably, lead to new requests, which may also wait for sub-commands!
 		RKREventLoop::processX11Events ();
 		// NOTE: sleeping and waking up again can be surprisingly CPU-intensive (yes: more than the event processing, above. I have profiled it).
@@ -1597,7 +1597,7 @@ RCommandProxy * RKRBackend::handleRequest2(RBackendRequest* request, bool mayHan
 	while (pending_priority_command) RKREventLoop::processX11Events ();  // Probably not needed, but make sure to process priority commands first at all times.
 
 	RCommandProxy* command = request->takeCommand ();
-	if (!command) return 0;
+	if (!command) return nullptr;
 
 	{
 		QMutexLocker lock (&all_current_commands_mutex);
@@ -1623,7 +1623,7 @@ RCommandProxy * RKRBackend::handleRequest2(RBackendRequest* request, bool mayHan
 		}
 	}
 
-	return 0;
+	return nullptr;
 }
 
 RCommandProxy* RKRBackend::fetchNextCommand () {
@@ -1631,7 +1631,7 @@ RCommandProxy* RKRBackend::fetchNextCommand () {
 
 	RBackendRequest req (!isKilled (), RBackendRequest::CommandOut);	// when killed, we do *not* actually wait for the reply, before the request is deleted.
 	req.command = previous_command;
-	previous_command = 0;
+	previous_command = nullptr;
 
 	return (handleRequest (&req, false));
 }
diff --git a/rkward/rbackend/rkrbackendprotocol_frontend.cpp b/rkward/rbackend/rkrbackendprotocol_frontend.cpp
index f9630f0f0..e82adeab4 100644
--- a/rkward/rbackend/rkrbackendprotocol_frontend.cpp
+++ b/rkward/rbackend/rkrbackendprotocol_frontend.cpp
@@ -16,7 +16,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 
 #include "../debug.h"
 
-RKRBackendProtocolFrontend* RKRBackendProtocolFrontend::_instance = 0;
+RKRBackendProtocolFrontend* RKRBackendProtocolFrontend::_instance = nullptr;
 RKRBackendProtocolFrontend::RKRBackendProtocolFrontend (RInterface* parent) : QObject (parent) {
 	RK_TRACE (RBACKEND);
 
diff --git a/rkward/rbackend/rkrbackendprotocol_shared.cpp b/rkward/rbackend/rkrbackendprotocol_shared.cpp
index cba808057..b99c220cb 100644
--- a/rkward/rbackend/rkrbackendprotocol_shared.cpp
+++ b/rkward/rbackend/rkrbackendprotocol_shared.cpp
@@ -52,8 +52,8 @@ void RBackendRequest::mergeReply (RBackendRequest *reply) {
 	command = reply->command;
 	params = reply->params;
 	output = reply->output;
-	reply->command = 0;
-	reply->output = 0;
+	reply->command = nullptr;
+	reply->output = nullptr;
 }
 
 RBackendRequest* RBackendRequest::duplicate () {
@@ -67,8 +67,8 @@ RBackendRequest* RBackendRequest::duplicate () {
 	ret->params = params;
 	ret->output = output;
 	// prevent double deletion issues
-	command = 0;
-	output = 0;
+	command = nullptr;
+	output = nullptr;
 	return ret;
 }
 
@@ -146,11 +146,11 @@ QString RKROutputBuffer::popOutputCapture (bool highlighted) {
 
 void appendToOutputList (ROutputList *list, const QString &output, ROutput::ROutputType output_type) {
 // No trace
-	ROutput *current_output = 0;
+	ROutput *current_output = nullptr;
 	if (!list->isEmpty ()) {
 		// Merge with previous output fragment, if of the same type
 		current_output = list->last ();
-		if (current_output->type != output_type) current_output = 0;
+		if (current_output->type != output_type) current_output = nullptr;
 	}
 	if (!current_output) {
 		current_output = new ROutput;
@@ -237,7 +237,7 @@ namespace RK_Debug {
 	int RK_Debug_Level = 0;
 	int RK_Debug_Flags = DEBUG_ALL;
 	int RK_Debug_CommandStep = 0;
-	QFile *debug_file = 0;
+	QFile *debug_file = nullptr;
 
 	bool setupLogFile (const QString &basename) {
 		QStringList all_debug_files (basename);
diff --git a/rkward/rbackend/rkrbackendprotocol_shared.h b/rkward/rbackend/rkrbackendprotocol_shared.h
index a4bd37075..0c0410920 100644
--- a/rkward/rbackend/rkrbackendprotocol_shared.h
+++ b/rkward/rbackend/rkrbackendprotocol_shared.h
@@ -102,7 +102,7 @@ public:
 	enum EventType {
 		RKWardEvent = QEvent::User + 1
 	};
-	explicit RKRBackendEvent (RBackendRequest* data=0) : QEvent ((QEvent::Type) RKWardEvent) { _data = data; };
+	explicit RKRBackendEvent(RBackendRequest* data=nullptr) : QEvent((QEvent::Type) RKWardEvent) { _data = data; };
 	~RKRBackendEvent () {};
 
 	RBackendRequest* data () { return _data; };
diff --git a/rkward/rbackend/rkreventloop.cpp b/rkward/rbackend/rkreventloop.cpp
index d815a4aa0..ed63be9f6 100644
--- a/rkward/rbackend/rkreventloop.cpp
+++ b/rkward/rbackend/rkreventloop.cpp
@@ -59,11 +59,11 @@ void RKREventLoop::processX11Events() {
 
 	RKRBackend::repl_status.eval_depth++;
 // In case an error (or user interrupt) is caught inside processX11EventsWorker, we don't want to long-jump out.
-	R_ToplevelExec (processX11EventsWorker, 0);
+	R_ToplevelExec(processX11EventsWorker, nullptr);
 	RKRBackend::repl_status.eval_depth--;
 }
 
-static void (* RK_eventHandlerFunction)() = 0;
+static void (* RK_eventHandlerFunction)() = nullptr;
 
 #ifndef Q_OS_WIN
 static void (* RK_old_R_PolledEvents)();
diff --git a/rkward/rbackend/rkrinterface.cpp b/rkward/rbackend/rkrinterface.cpp
index 13f25e1a1..a3ea50ef2 100644
--- a/rkward/rbackend/rkrinterface.cpp
+++ b/rkward/rbackend/rkrinterface.cpp
@@ -80,7 +80,7 @@ RInterface::RInterface () {
 	locked = 0;
 	backend_dead = false;
 	flush_timer_id = 0;
-	dummy_command_on_stack = 0;
+	dummy_command_on_stack = nullptr;
 
 	// create a fake init command
 	runStartupCommand(new RCommand(i18n("R Startup"), RCommand::App | RCommand::Sync | RCommand::ObjectListUpdate, i18n("R Startup")), nullptr, 
@@ -96,7 +96,7 @@ RInterface::RInterface () {
 				// If length of details <= 512, it tries to show the details as a QLabel.
 				details = details.leftJustified (513);
 			}
-			KMessageBox::detailedError (0, message, details, i18n ("Error starting R"), KMessageBox::Notify | KMessageBox::AllowLink);
+			KMessageBox::detailedError(nullptr, message, details, i18n("Error starting R"), KMessageBox::Notify | KMessageBox::AllowLink);
 		}
 
 		startup_errors.clear ();
@@ -149,7 +149,7 @@ RCommand *RInterface::popPreviousCommand (int id) {
 		}
 	}
 	RK_ASSERT (false);
-	return 0;
+	return nullptr;
 }
 
 RCommandChain* RInterface::openSubcommandChain (RCommand* parent_command) {
@@ -164,13 +164,13 @@ void RInterface::closeSubcommandChain (RCommand* parent_command) {
 
 	if (current_commands_with_subcommands.contains (parent_command)) {
 		current_commands_with_subcommands.removeAll (parent_command);
-		doNextCommand (0);
+		doNextCommand(nullptr);
 	}
 	if (parent_command && (parent_command == dummy_command_on_stack)) {
 		all_current_commands.removeAll (dummy_command_on_stack);
 		RCommandStack::pop (dummy_command_on_stack);
 		handleCommandOut (dummy_command_on_stack);
-		dummy_command_on_stack = 0;
+		dummy_command_on_stack = nullptr;
 	}
 }
 
@@ -273,7 +273,7 @@ void RInterface::doNextCommand (RCommand *command) {
 	}
 
 	flushOutput (true);
-	RCommandProxy *proxy = 0;
+	RCommandProxy *proxy = nullptr;
 	if (command) {
 		RKWardMainWindow::getMain ()->setWorkspaceMightBeModified (true);
 		proxy = command->makeProxy ();
@@ -336,7 +336,7 @@ void RInterface::handleRequest (RBackendRequest* request) {
 		} else {
 			RK_DEBUG (RBACKEND, DL_DEBUG, "Fake command out");
 		}
-		RCommand *command = 0;
+		RCommand *command = nullptr;
 		// NOTE: the order of processing is: first try to submit the next command, then handle the old command.
 		// The reason for doing it this way, instead of the reverse, is that this allows the backend thread / process to continue working, concurrently
 		// NOTE: cproxy should only ever be 0 in the very first cycle
@@ -351,7 +351,7 @@ void RInterface::handleRequest (RBackendRequest* request) {
 		tryNextCommand ();
 	} else if (request->type == RBackendRequest::GenericRequestWithSubcommands) {
 		RCommandProxy *cproxy = request->takeCommand();
-		RCommand *parent = 0;
+		RCommand *parent = nullptr;
 		for (int i = all_current_commands.size () - 1; i >= 0; --i) {
 			if (all_current_commands[i]->id () == cproxy->id) {
 				parent = all_current_commands[i];
@@ -593,7 +593,7 @@ GenericRRequestResult RInterface::processPlainGenericRequest(const QStringList &
 		// if we're still alive, quitting was canceled
 		return GenericRRequestResult::makeError(i18n("Quitting was canceled"));
 	} else if (call == "preLocaleChange") {
-		int res = KMessageBox::warningContinueCancel (0, i18n ("A command in the R backend is trying to change the character encoding. While RKWard offers support for this, and will try to adjust to the new locale, this operation may cause subtle bugs, if data windows are currently open. Also the feature is not well tested, yet, and it may be advisable to save your workspace before proceeding.\nIf you have any data editor opened, or in any doubt, it is recommended to close those first (this will probably be auto-detected in later versions of RKWard). In this case, please choose 'Cancel' now, then close the data windows, save, and retry."), i18n ("Locale change"));
+		int res = KMessageBox::warningContinueCancel(nullptr, i18n("A command in the R backend is trying to change the character encoding. While RKWard offers support for this, and will try to adjust to the new locale, this operation may cause subtle bugs, if data windows are currently open. Also the feature is not well tested, yet, and it may be advisable to save your workspace before proceeding.\nIf you have any data editor opened, or in any doubt, it is recommended to close those first (this will probably be auto-detected in later versions of RKWard). In this case, please choose 'Cancel' now, then close the data windows, save, and retry."), i18n("Locale change"));
 		if (res != KMessageBox::Continue) return GenericRRequestResult::makeError(i18n("Changing the locale was canceled by user"));
 	} else if (call == "listPlugins") {
 		RK_ASSERT (calllist.count () == 1);
@@ -730,8 +730,8 @@ void RInterface::processHistoricalSubstackRequest (const QString &call, const QV
 	if (!parent_command) {
 		// This can happen for Tcl events. Create a dummy command on the stack to keep things looping.
 		parent_command = new RCommand (QString (), RCommand::App | RCommand::EmptyCommand | RCommand::Sync);
-		RCommandStack::issueCommand (parent_command, 0);
-		all_current_commands.append (parent_command);
+		RCommandStack::issueCommand(parent_command, nullptr);
+		all_current_commands.append(parent_command);
 		dummy_command_on_stack = parent_command;	// so we can get rid of it again, after it's sub-commands have finished
 	}
 	in_chain = openSubcommandChain (parent_command);
@@ -789,8 +789,8 @@ void RInterface::processHistoricalSubstackRequest (const QString &call, const QV
 	} else if (call == "require") {
 		RK_ASSERT (!arglist.isEmpty());
 		QString lib_name = arglist.value(0);
-		KMessageBox::information (0, i18n ("The R-backend has indicated that in order to carry out the current task it needs the package '%1', which is not currently installed. We will open the package-management tool, and there you can try to locate and install the needed package.", lib_name), i18n ("Require package '%1'", lib_name));
-		RKLoadLibsDialog::showInstallPackagesModal (0, in_chain, QStringList(lib_name));
+		KMessageBox::information(nullptr, i18n("The R-backend has indicated that in order to carry out the current task it needs the package '%1', which is not currently installed. We will open the package-management tool, and there you can try to locate and install the needed package.", lib_name), i18n("Require package '%1'", lib_name));
+		RKLoadLibsDialog::showInstallPackagesModal(nullptr, in_chain, QStringList(lib_name));
 	} else if (call == "doPlugin") {
 		if (arglist.count () >= 2) {
 			QString message;
@@ -832,8 +832,8 @@ void RInterface::processRBackendRequest (RBackendRequest *request) {
 
 	if (type == RBackendRequest::CommandLineIn) {
 		int id = request->params["commandid"].toInt ();
-		RCommand *command = all_current_commands.value (0, 0);	// User command will always be the first.
-		if ((command == 0) || (command->id () != id)) {
+		RCommand *command = all_current_commands.value(0,nullptr);	// User command will always be the first.
+		if ((command == nullptr) || (command->id () != id)) {
 			RK_ASSERT (false);
 		} else {
 			command->commandLineIn ();
@@ -859,7 +859,7 @@ void RInterface::processRBackendRequest (RBackendRequest *request) {
 		}
 
 		bool synchronous = request->synchronous || (button_count > 1);
-		KMessageBox::createKMessageBox (dialog, button_box, button_count < 2 ? QMessageBox::Information : QMessageBox::Question, message, QStringList (), QString (), 0, KMessageBox::Notify | KMessageBox::NoExec | KMessageBox::AllowLink);
+		KMessageBox::createKMessageBox(dialog, button_box, button_count < 2 ? QMessageBox::Information : QMessageBox::Question, message, QStringList(), QString(), nullptr, KMessageBox::Notify | KMessageBox::NoExec | KMessageBox::AllowLink);
 		dialog->setWindowTitle (caption);
 
 		if (!synchronous) {
@@ -889,7 +889,7 @@ void RInterface::processRBackendRequest (RBackendRequest *request) {
 		}
 
 
-		bool ok = RKReadLineDialog::readLine (0, i18n ("R backend requests information"), request->params["prompt"].toString (), command, &result);
+		bool ok = RKReadLineDialog::readLine(nullptr, i18n("R backend requests information"), request->params["prompt"].toString(), command, &result);
 		request->params["result"] = QVariant (result);
 
 		if (dummy_command) delete command;
@@ -909,7 +909,7 @@ void RInterface::processRBackendRequest (RBackendRequest *request) {
 			backend_dead = true;
 			QString message = request->params["message"].toString ();
 			message += i18n ("\nThe R backend will be shut down immediately. This means, you can not use any more functions that rely on it. I.e. you can do hardly anything at all, not even save the workspace (but if you're lucky, R already did that). What you can do, however, is save any open command-files, the output, or copy data out of open data editors. Quit RKWard after that. Sorry!");
-			RKErrorDialog::reportableErrorMessage (0, message, QString (), i18n ("R engine has died"), "r_engine_has_died");
+			RKErrorDialog::reportableErrorMessage(nullptr, message, QString(), i18n("R engine has died"), "r_engine_has_died");
 			Q_EMIT backendStatusChanged(Dead);
 			while (!all_current_commands.isEmpty()) {
 				auto c = all_current_commands.takeLast();
diff --git a/rkward/rbackend/rkrsupport.cpp b/rkward/rbackend/rkrsupport.cpp
index a7ba9f710..b9d8e9066 100644
--- a/rkward/rbackend/rkrsupport.cpp
+++ b/rkward/rbackend/rkrsupport.cpp
@@ -300,7 +300,7 @@ RKRShadowEnvironment* RKRShadowEnvironment::environmentFor(SEXP baseenvir) {
 		}
 
 		char name[sizeof(void*)*2+3];
-		sprintf(name, "%p", baseenvir);
+		sprintf(name, "%p", (void*) baseenvir);
 		SEXP tr = Rf_allocVector(LGLSXP, 1);
 		LOGICAL(tr)[0] = true;
 		Rf_defineVar(Rf_install(name), RKRSupport::callSimpleFun2(Rf_install("new.env"), tr, R_EmptyEnv, R_GlobalEnv), shadowenvbase);
diff --git a/rkward/rbackend/rksignalsupport.cpp b/rkward/rbackend/rksignalsupport.cpp
index cd0a7930d..efbca8cd6 100644
--- a/rkward/rbackend/rksignalsupport.cpp
+++ b/rkward/rbackend/rksignalsupport.cpp
@@ -33,8 +33,8 @@ namespace RKSignalSupportPrivate {
 	struct sigaction r_sigabrt_handler;
 	struct sigaction default_sigabrt_handler;
 #endif
-	rk_sighandler_t r_sigint_handler = 0;
-	void (*new_sigint_handler) (void) = 0;
+	rk_sighandler_t r_sigint_handler = nullptr;
+	void (*new_sigint_handler) (void) = nullptr;
 	void internal_sigint_handler (int num) {
 		new_sigint_handler ();
 		signal (num, internal_sigint_handler);
@@ -110,9 +110,9 @@ void RKSignalSupport::saveDefaultSignalHandlers () {
 	RKSignalSupportPrivate::default_sigill_handler = signal (SIGILL, SIG_DFL);
 	RKSignalSupportPrivate::default_sigabrt_handler = signal (SIGABRT, SIG_DFL);
 #else
-	sigaction (SIGSEGV, 0, &RKSignalSupportPrivate::default_sigsegv_handler);
-	sigaction (SIGILL, 0, &RKSignalSupportPrivate::default_sigill_handler);
-	sigaction (SIGABRT, 0, &RKSignalSupportPrivate::default_sigabrt_handler);
+	sigaction (SIGSEGV, nullptr, &RKSignalSupportPrivate::default_sigsegv_handler);
+	sigaction (SIGILL, nullptr, &RKSignalSupportPrivate::default_sigill_handler);
+	sigaction (SIGABRT, nullptr, &RKSignalSupportPrivate::default_sigabrt_handler);
 #endif
 }
 
@@ -125,26 +125,26 @@ void RKSignalSupport::installSignalProxies () {
 	RKSignalSupportPrivate::r_sigabrt_handler = signal (SIGABRT, &RKSignalSupportPrivate::signal_proxy);
 #else
 	// retrieve R signal handler
-	sigaction (SIGSEGV, 0, &RKSignalSupportPrivate::r_sigsegv_handler);
-	sigaction (SIGILL, 0, &RKSignalSupportPrivate::r_sigill_handler);
-	sigaction (SIGABRT, 0, &RKSignalSupportPrivate::r_sigabrt_handler);
+	sigaction (SIGSEGV, nullptr, &RKSignalSupportPrivate::r_sigsegv_handler);
+	sigaction (SIGILL, nullptr, &RKSignalSupportPrivate::r_sigill_handler);
+	sigaction (SIGABRT, nullptr, &RKSignalSupportPrivate::r_sigabrt_handler);
 
 	// set new proxy handlers
 	struct sigaction proxy_action;
 	proxy_action = RKSignalSupportPrivate::r_sigsegv_handler;
 	proxy_action.sa_flags |= SA_SIGINFO;
 	proxy_action.sa_sigaction = &RKSignalSupportPrivate::signal_proxy;
-	sigaction (SIGSEGV, &proxy_action, 0);
+	sigaction (SIGSEGV, &proxy_action, nullptr);
 
 	proxy_action = RKSignalSupportPrivate::r_sigill_handler;
 	proxy_action.sa_flags |= SA_SIGINFO;
 	proxy_action.sa_sigaction = &RKSignalSupportPrivate::signal_proxy;
-	sigaction (SIGILL, &proxy_action, 0);
+	sigaction (SIGILL, &proxy_action, nullptr);
 
 	proxy_action = RKSignalSupportPrivate::default_sigabrt_handler;
 	proxy_action.sa_flags |= SA_SIGINFO;
 	proxy_action.sa_sigaction = &RKSignalSupportPrivate::signal_proxy;
-	sigaction (SIGABRT, &proxy_action, 0);
+	sigaction (SIGABRT, &proxy_action, nullptr);
 #endif
 }
 
diff --git a/rkward/rbackend/rkstructuregetter.cpp b/rkward/rbackend/rkstructuregetter.cpp
index 6109b5163..525cdd90d 100644
--- a/rkward/rbackend/rkstructuregetter.cpp
+++ b/rkward/rbackend/rkstructuregetter.cpp
@@ -307,7 +307,7 @@ void RKStructureGetter::getStructureWorker (SEXP val, const QString &name, int a
 			type |= RObject::Incomplete;
 			RK_DEBUG (RBACKEND, DL_DEBUG, "Depth limit reached. Will not recurse into slots of %s", name.toLatin1().data ());
 		} else {
-			RData::RDataStorage dummy (1, 0);
+			RData::RDataStorage dummy(1, nullptr);
 			dummy[0] = new RData ();
 
 			SEXP slots_pseudo_object = RKRSupport::callSimpleFun (rk_get_slots_fun, value, R_GlobalEnv);
@@ -330,7 +330,7 @@ void RKStructureGetter::getStructureWorker (SEXP val, const QString &name, int a
 	} else if (is_function) {
 		storage_length = RObject::StorageSizeBasicInfo + 2;
 	}
-	RData::RDataStorage res (storage_length, 0);
+	RData::RDataStorage res(storage_length, nullptr);
 	res[RObject::StoragePositionName] = namedata;
 	res[RObject::StoragePositionType] = typedata;
 	res[RObject::StoragePositionClass] = classdata;
@@ -360,7 +360,7 @@ void RKStructureGetter::getStructureWorker (SEXP val, const QString &name, int a
 			childcount = NAMED_CHILDREN_LIMIT;
 		}
 
-		RData::RDataStorage children (childcount, 0);
+		RData::RDataStorage children(childcount, nullptr);
 		for (int i = 0; i < childcount; ++i) {
 			children[i] = new RData ();		// NOTE: RData-ctor pre-initializes these to empty. Thus, we're safe even if there is an error while fetching one of the children.
 		}
@@ -429,7 +429,7 @@ void RKStructureGetter::getStructureWorker (SEXP val, const QString &name, int a
 				type |= RObject::Incomplete;
 				RK_DEBUG (RBACKEND, DL_DEBUG, "Depth limit reached. Will not recurse into namespace of %s", name.toLatin1().data ());
 			} else {
-				RData::RDataStorage dummy (1, 0);
+				RData::RDataStorage dummy(1, nullptr);
 				dummy[0] = new RData ();
 
 				getStructureSafe (namespace_envir, "NAMESPACE", RObject::PseudoObject, dummy[0], nesting_depth+99);	// HACK: By default, do not recurse into the children of the namespace, until dealing with the namespace object itself.
diff --git a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_backendtransmitter.cpp b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_backendtransmitter.cpp
index e56e55c68..d5f6dd464 100644
--- a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_backendtransmitter.cpp
+++ b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_backendtransmitter.cpp
@@ -14,9 +14,9 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include "../../debug.h"
 
 RKAsyncDataStreamHelper<RKGraphicsDeviceTransmittionLengthType> RKGraphicsDeviceBackendTransmitter::streamer;
-QIODevice* RKGraphicsDeviceBackendTransmitter::connection = 0;
+QIODevice* RKGraphicsDeviceBackendTransmitter::connection = nullptr;
 QMutex RKGraphicsDeviceBackendTransmitter::mutex;
-RKGraphicsDeviceBackendTransmitter* RKGraphicsDeviceBackendTransmitter::_instance = 0;
+RKGraphicsDeviceBackendTransmitter* RKGraphicsDeviceBackendTransmitter::_instance = nullptr;
 
 RKGraphicsDeviceBackendTransmitter::RKGraphicsDeviceBackendTransmitter (QIODevice* _connection, bool is_q_local_socket) : QThread () {
 	RK_TRACE (GRAPHICS_DEVICE);
@@ -49,7 +49,7 @@ RKGraphicsDeviceBackendTransmitter* RKGraphicsDeviceBackendTransmitter::instance
 		_instance = new RKGraphicsDeviceBackendTransmitter (con, true);
 		return _instance;
 	}
-	return 0;
+	return nullptr;
 }
 
 bool RKGraphicsDeviceBackendTransmitter::connectionAlive () {
@@ -82,6 +82,6 @@ void RKGraphicsDeviceBackendTransmitter::kill () {
 		mutex.unlock ();
 		_instance->wait (1000);
 		delete _instance;
-		_instance = 0;
+		_instance = nullptr;
 	}
 }
diff --git a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_frontendtransmitter.cpp b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_frontendtransmitter.cpp
index 7181a88f9..70213c7ea 100644
--- a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_frontendtransmitter.cpp
+++ b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_frontendtransmitter.cpp
@@ -29,8 +29,8 @@ double RKGraphicsDeviceFrontendTransmitter::lwdscale = 72.0/96;
 RKGraphicsDeviceFrontendTransmitter::RKGraphicsDeviceFrontendTransmitter () : QObject () {
 	RK_TRACE (GRAPHICS_DEVICE);
 
-	connection = 0;
-	local_server = 0;
+	connection = nullptr;
+	local_server = nullptr;
 
 	setupServer ();
 }
@@ -63,8 +63,8 @@ void RKGraphicsDeviceFrontendTransmitter::newConnection () {
 	QString token = RKFrontendTransmitter::instance ()->connectionToken ();
 	QString token_c = RKFrontendTransmitter::waitReadLine(con, 2000).trimmed ();
 	if (token_c != token) {
-		KMessageBox::detailedError (0, QString ("<p>%1</p>").arg (i18n ("There has been an error while trying to connect the on-screen graphics backend. This means, on-screen graphics using the RKWard device will not work in this session.")), i18n ("Expected connection token %1, but read connection token %2", token, token_c), i18n ("Error while connection graphics backend"));
-		con->close ();
+		KMessageBox::detailedError(nullptr, QString("<p>%1</p>").arg(i18n("There has been an error while trying to connect the on-screen graphics backend. This means, on-screen graphics using the RKWard device will not work in this session.")), i18n("Expected connection token %1, but read connection token %2", token, token_c), i18n("Error while connection graphics backend"));
+		con->close();
 		return;
 	}
 
@@ -228,7 +228,7 @@ void RKGraphicsDeviceFrontendTransmitter::newData () {
 		streamer.instream >> opcode >> devnum;
 		RK_DEBUG (GRAPHICS_DEVICE, DL_DEBUG, "Received transmission of type %d, devnum %d, size %d", opcode, devnum+1, streamer.inSize ());
 
-		RKGraphicsDevice *device = 0;
+		RKGraphicsDevice *device = nullptr;
 		if (devnum && opcode == RKDCreate) {
 			double width, height;
 			QString title;
diff --git a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp
index 1c7b62271..cb065a561 100644
--- a/rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp
+++ b/rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp
@@ -75,7 +75,7 @@ void RKStartGraphicsDevice (double width, double height, double pointsize, const
 		if (!(dev && RKGraphicsDeviceBackendTransmitter::instance () && desc->init (dev, pointsize, family, bg))) {
 			R_Free (dev);
 			delete (desc);
-			desc = 0;
+			desc = nullptr;
 		} else {
 			desc->devnum = 0;  // graphics engine will send an Activate-event, before we were even
 			                   // able to see our own devnum and call RKD_Create. Therefore, initialize
diff --git a/rkward/rkconsole.cpp b/rkward/rkconsole.cpp
index ce104fc54..761a02ee6 100644
--- a/rkward/rkconsole.cpp
+++ b/rkward/rkconsole.cpp
@@ -55,7 +55,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include "debug.h"
 
 // static
-RKConsole* RKConsole::main_console = 0;
+RKConsole* RKConsole::main_console = nullptr;
 
 RKConsole::RKConsole (QWidget *parent, bool tool_window, const char *name) : RKMDIWindow (parent, RKMDIWindow::ConsoleWindow, tool_window, name), commands_history (false, false) {
 	RK_TRACE (APP);
@@ -146,7 +146,7 @@ RKConsole::RKConsole (QWidget *parent, bool tool_window, const char *name) : RKM
 
 	commands_history.setHistory (RKSettingsModuleConsole::loadCommandHistory ());
 
-	current_command = 0;
+	current_command = nullptr;
 	current_command_displayed_up_to = 0;
 	tab_key_pressed_before = false;
 	previous_chunk_was_piped = false;
@@ -196,7 +196,7 @@ QAction* RKConsole::addProxyAction (const QString& actionName, const QString& la
 		getPart ()->actionCollection ()->addAction (actionName, ret);
 		return ret;
 	} else {
-		return 0;
+		return nullptr;
 	}
 }
 
@@ -702,7 +702,7 @@ void RKConsole::userLoadHistory (const QUrl &_url) {
 		if (url.isEmpty ()) return;
 	}
 
-	QTemporaryFile *tmpfile = 0;
+	QTemporaryFile *tmpfile = nullptr;
 	QString filename;
 	if (!url.isLocalFile ()) {
 		tmpfile = new QTemporaryFile (this);
@@ -857,12 +857,12 @@ void RKConsole::initializeActions (KActionCollection *ac) {
 
 	interrupt_command_action = ac->addAction ("interrupt", this, SLOT (resetConsole()));
 	interrupt_command_action->setText (i18n ("Interrupt running command"));
-	ac->setDefaultShortcut (interrupt_command_action, REAL_CTRL_KEY + Qt::Key_C);
+	ac->setDefaultShortcut (interrupt_command_action, REAL_CTRL_KEY | Qt::Key_C);
 	interrupt_command_action->setIcon (RKStandardIcons::getIcon (RKStandardIcons::ActionInterrupt));
 	interrupt_command_action->setEnabled (false);
 
 	copy_literal_action = ac->addAction ("rkconsole_copy_literal", this, SLOT (literalCopy()));
-	ac->setDefaultShortcut (copy_literal_action, REAL_CMD_KEY + Qt::Key_C);
+	ac->setDefaultShortcut (copy_literal_action, REAL_CMD_KEY | Qt::Key_C);
 	copy_literal_action->setText (i18n ("Copy selection literally"));
 
 	copy_commands_action = ac->addAction ("rkconsole_copy_commands", this, SLOT (copyCommands()));
@@ -952,7 +952,7 @@ void RKConsole::activate (bool with_focus) {
 ///################### BEGIN RKConsolePart ####################
 
 
-RKConsolePart::RKConsolePart (RKConsole *console) : KParts::Part (0) {
+RKConsolePart::RKConsolePart(RKConsole *console) : KParts::Part(nullptr) {
 	RK_TRACE (APP);
 
 	setComponentName (QCoreApplication::applicationName (), QGuiApplication::applicationDisplayName ());
diff --git a/rkward/rkconsole.h b/rkward/rkconsole.h
index 0ea316bfe..011681a55 100644
--- a/rkward/rkconsole.h
+++ b/rkward/rkconsole.h
@@ -40,7 +40,7 @@ class RKConsole : public RKMDIWindow, public RKScriptContextProvider {
 Q_OBJECT
 public:
 /** Constructor. */
-	RKConsole (QWidget *parent, bool tool_window, const char *name=0);
+	RKConsole (QWidget *parent, bool tool_window, const char *name=nullptr);
 /** Destructor */
 	~RKConsole ();
 
diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp
index 5d874d4c8..8fae0170d 100644
--- a/rkward/rkward.cpp
+++ b/rkward/rkward.cpp
@@ -93,24 +93,24 @@ SPDX-License-Identifier: GPL-2.0-or-later
 
 // This nevers gets called. It's needed to trick ld into linking correctly. Nothing else.
 void bogusCalls () {
-	ShowEditTextFileAgent::showEditFiles (0);		// TODO: AAAAAAAARGGGH!!!! It won't link without this bogus line!!!
-	RKReadLineDialog::readLine (0, QString(), QString(), 0, 0);	// TODO: see above
-	RKSelectListDialog::doSelect (0, QString(), QStringList(), QStringList(), false);	// TODO: see above
-	new RKEditorDataFrame (0, 0);
-	DetachedWindowContainer (0, false);
-	new RKWorkplaceView (0);
-	new RKEditObjectAgent (QStringList (), 0);
-	RKPrintAgent::printPostscript (QString (), false);
+	ShowEditTextFileAgent::showEditFiles(nullptr);                                   // TODO: AAAAAAAARGGGH!!!! It won't link without this bogus line!!!
+	RKReadLineDialog::readLine(nullptr, QString(), QString(), nullptr, nullptr);     // TODO: see above
+	RKSelectListDialog::doSelect(nullptr, QString(), QStringList(), QStringList(), false); // TODO: see above
+	new RKEditorDataFrame(nullptr, nullptr);
+	DetachedWindowContainer(nullptr, false);
+	new RKWorkplaceView(nullptr);
+	new RKEditObjectAgent(QStringList(), nullptr);
+	RKPrintAgent::printPostscript(QString(), false);
 }
 
 /** Main window **/
 
 //static
-RKWardMainWindow *RKWardMainWindow::rkward_mainwin = 0;
+RKWardMainWindow *RKWardMainWindow::rkward_mainwin = nullptr;
 
 RKWardMainWindow::RKWardMainWindow() : KParts::MainWindow() {
-	RK_TRACE (APP);
-	RK_ASSERT (rkward_mainwin == 0);
+	RK_TRACE(APP);
+	RK_ASSERT(rkward_mainwin == nullptr);
 
 	Q_INIT_RESOURCE(resources);
 	testmode_suppress_dialogs = false;
@@ -350,11 +350,11 @@ void RKWardMainWindow::initPlugins (const QStringList &automatically_added) {
 	}
 	if (!completely_broken_maps.isEmpty ()) {
 		QString maplist = "<ul><li>" + completely_broken_maps.join ("</li>\n<li>") + "</li></ul>";
-		KMessageBox::detailedError (0, QString ("<p>%1</p><p>%2</p>").arg (i18n ("The following RKWard pluginmap files could not be loaded, and have been disabled. This could be because they are broken, not compatible with this version of RKWard, or not meant for direct loading (see the 'Details' for more information). They have been disabled."), maplist), completely_broken_maps_details.join ("\n"), i18n ("Failed to load some plugin maps"));
+		KMessageBox::detailedError(nullptr, QString("<p>%1</p><p>%2</p>").arg(i18n("The following RKWard pluginmap files could not be loaded, and have been disabled. This could be because they are broken, not compatible with this version of RKWard, or not meant for direct loading (see the 'Details' for more information). They have been disabled."), maplist), completely_broken_maps_details.join ("\n"), i18n("Failed to load some plugin maps"));
 	}
 	if (!somewhat_broken_maps.isEmpty ()) {
 		QString maplist = "<ul><li>" + somewhat_broken_maps.join ("</li>\n<li>") + "</li></ul>";
-		KMessageBox::detailedError (0, QString ("<p>%1</p><p>%2</p><p>%3</p>").arg (i18n ("Some errors were encountered while loading the following RKWard pluginmap files. This could be because individual plugins are broken or not compatible with this version of RKWard (see the 'Details' for more information). Other plugins were loaded, successfully, however."), maplist, i18n ("Note: You will not be warned about these pluginmap files again, until you upgrade RKWard, or remove and re-add them in Settings->Configure RKWard->Plugins.")), somewhat_broken_maps_details.join ("\n"), i18n ("Failed to load some plugin maps"));
+		KMessageBox::detailedError(nullptr, QString("<p>%1</p><p>%2</p><p>%3</p>").arg(i18n("Some errors were encountered while loading the following RKWard pluginmap files. This could be because individual plugins are broken or not compatible with this version of RKWard (see the 'Details' for more information). Other plugins were loaded, successfully, however."), maplist, i18n("Note: You will not be warned about these pluginmap files again, until you upgrade RKWard, or remove and re-add them in Settings->Configure RKWard->Plugins.")), somewhat_broken_maps_details.join("\n"), i18n("Failed to load some plugin maps"));
 	}
 
 	slotSetStatusReady ();
@@ -427,41 +427,41 @@ void RKWardMainWindow::configureCarbonCopy () {
 void RKWardMainWindow::initToolViewsAndR () {
 	RK_TRACE (APP);
 
-	RObjectBrowser::object_browser = new RObjectBrowser (0, true);
+	RObjectBrowser::object_browser = new RObjectBrowser(nullptr, true);
 	RObjectBrowser::mainBrowser ()->setCaption (i18n ("Workspace"));
-	RKToolWindowList::registerToolWindow (RObjectBrowser::mainBrowser (), "workspace", RKToolWindowList::Left, Qt::AltModifier + Qt::Key_1);
+	RKToolWindowList::registerToolWindow (RObjectBrowser::mainBrowser (), "workspace", RKToolWindowList::Left, Qt::AltModifier | Qt::Key_1);
 
-	RKCommandLog::rkcommand_log = new RKCommandLog (0, true);
-	RKToolWindowList::registerToolWindow (RKCommandLog::rkcommand_log, "commandlog", RKToolWindowList::Bottom, Qt::AltModifier + Qt::Key_3);
+	RKCommandLog::rkcommand_log = new RKCommandLog(nullptr, true);
+	RKToolWindowList::registerToolWindow (RKCommandLog::rkcommand_log, "commandlog", RKToolWindowList::Bottom, Qt::AltModifier | Qt::Key_3);
 
 	startR ();
 
-	RKFileBrowser::main_browser = new RKFileBrowser (0, true);
+	RKFileBrowser::main_browser = new RKFileBrowser(nullptr, true);
 	RKFileBrowser::main_browser->setCaption (i18n ("Files"));
-	RKToolWindowList::registerToolWindow (RKFileBrowser::main_browser, "filebrowser", RKToolWindowList::Left, Qt::AltModifier + Qt::Key_2);
+	RKToolWindowList::registerToolWindow (RKFileBrowser::main_browser, "filebrowser", RKToolWindowList::Left, Qt::AltModifier | Qt::Key_2);
 
-	RControlWindow::control_window = new RControlWindow (0, true);
+	RControlWindow::control_window = new RControlWindow(nullptr, true);
 	RControlWindow::getControl ()->setCaption (i18n ("Pending Jobs"));
-	RKToolWindowList::registerToolWindow (RControlWindow::getControl (), "pendingjobs", RKToolWindowList::Nowhere, Qt::AltModifier + Qt::Key_4);
+	RKToolWindowList::registerToolWindow (RControlWindow::getControl (), "pendingjobs", RKToolWindowList::Nowhere, Qt::AltModifier | Qt::Key_4);
 
-	RKConsole *console = new RKConsole (0, true);
+	RKConsole *console = new RKConsole(nullptr, true);
 	RKConsole::setMainConsole (console);
-	RKToolWindowList::registerToolWindow (console, "console", RKToolWindowList::Bottom, Qt::AltModifier + Qt::Key_5);
+	RKToolWindowList::registerToolWindow (console, "console", RKToolWindowList::Bottom, Qt::AltModifier | Qt::Key_5);
 
-	RKHelpSearchWindow *help_search = new RKHelpSearchWindow (0, true);
+	RKHelpSearchWindow *help_search = new RKHelpSearchWindow(nullptr, true);
 	RKHelpSearchWindow::main_help_search = help_search;
-	RKToolWindowList::registerToolWindow (help_search, "helpsearch", RKToolWindowList::Bottom, Qt::AltModifier + Qt::Key_6);
+	RKToolWindowList::registerToolWindow (help_search, "helpsearch", RKToolWindowList::Bottom, Qt::AltModifier | Qt::Key_6);
 
-	RKCallstackViewer::_instance = new RKCallstackViewer (0, true);
+	RKCallstackViewer::_instance = new RKCallstackViewer(nullptr, true);
 	RKCallstackViewer::instance ()->setCaption (i18n ("Debugger Frames"));
-	RKToolWindowList::registerToolWindow (RKCallstackViewer::instance (), "debugframes", RKToolWindowList::Right, Qt::AltModifier + Qt::Key_8);
+	RKToolWindowList::registerToolWindow (RKCallstackViewer::instance (), "debugframes", RKToolWindowList::Right, Qt::AltModifier | Qt::Key_8);
 
 	// HACK: Creating this _after_ the callstackviewer is important, so the debug console will end up the active window when entering a debug context
-	RKDebugConsole::_instance = new RKDebugConsole (0, true);
+	RKDebugConsole::_instance = new RKDebugConsole(nullptr, true);
 	RKDebugConsole::instance ()->setCaption (i18n ("Debugger Console"));
-	RKToolWindowList::registerToolWindow (RKDebugConsole::instance (), "debugconsole", RKToolWindowList::Nowhere, Qt::AltModifier + Qt::Key_7);
+	RKToolWindowList::registerToolWindow (RKDebugConsole::instance (), "debugconsole", RKToolWindowList::Nowhere, Qt::AltModifier | Qt::Key_7);
 
-	RKDebugMessageWindow::_instance = new RKDebugMessageWindow (0, true);
+	RKDebugMessageWindow::_instance = new RKDebugMessageWindow(nullptr, true);
 	RKDebugMessageWindow::instance ()->setCaption (i18n ("RKWard Debug Messages"));
 	RKToolWindowList::registerToolWindow (RKDebugMessageWindow::instance (), "rkdebugmessages", RKToolWindowList::Nowhere, 0);
 
@@ -881,7 +881,7 @@ void RKWardMainWindow::askOpenWorkspace (const QUrl &url) {
 
 void RKWardMainWindow::slotFileLoadLibs () {
 	RK_TRACE (APP);
-	RKLoadLibsDialog *dial = new RKLoadLibsDialog (this, 0);
+	RKLoadLibsDialog *dial = new RKLoadLibsDialog(this, nullptr);
 	dial->show ();
 }
 
@@ -983,8 +983,8 @@ void RKWardMainWindow::slotNewCommandEditor () {
 void RKWardMainWindow::openAnyFile () {
 	RK_TRACE (APP);
 
-	QFileDialog* dialog = new QFileDialog (0, QString (), RKRecentUrls::mostRecentUrl(RKRecentUrls::scriptsId()).adjusted(QUrl::RemoveFilename).toLocalFile(), QString ("*|All Files (*)\n%1|R Script Files (%1)").arg (RKSettingsModuleCommandEditor::scriptFileFilter ()));
-	dialog->setFileMode (QFileDialog::ExistingFiles);
+	QFileDialog* dialog = new QFileDialog(nullptr, QString(), RKRecentUrls::mostRecentUrl(RKRecentUrls::scriptsId()).adjusted(QUrl::RemoveFilename).toLocalFile(), QString ("*|All Files (*)\n%1|R Script Files (%1)").arg(RKSettingsModuleCommandEditor::scriptFileFilter()));
+	dialog->setFileMode(QFileDialog::ExistingFiles);
 
 // Create a type selection widget, and hack it into the dialog:
 	QFrame* dummy = new QFrame (this);
diff --git a/rkward/robjectviewer.cpp b/rkward/robjectviewer.cpp
index 06e3f6fad..658976f52 100644
--- a/rkward/robjectviewer.cpp
+++ b/rkward/robjectviewer.cpp
@@ -88,7 +88,7 @@ void RObjectViewer::objectRemoved (RObject *object) {
 		status_label->show ();
 
 		stopListenForObject (_object);
-		_object = 0;
+		_object = nullptr;
 	} else {
 		RK_ASSERT (false);
 	}
@@ -183,8 +183,8 @@ void RObjectViewerWidget::invalidate (const QString& reason) {
 	palette.setColor (status_label->foregroundRole (), Qt::red);
 	status_label->setPalette (palette);
 
-	status_label->setText (reason);
-	update_button->setEnabled (_object != 0);
+	status_label->setText(reason);
+	update_button->setEnabled(_object != nullptr);
 }
 
 void RObjectViewerWidget::initialize () {
@@ -212,7 +212,7 @@ void RObjectViewerWidget::update() {
 	control->show(100);
 	command->whenFinished(this, [this](RCommand *command) {
 		setText(command->fullOutput());
-		update_button->setEnabled (_object != 0);
+		update_button->setEnabled(_object != nullptr);
 	});
 	RInterface::issueCommand(command);
 }
diff --git a/rkward/robjectviewer.h b/rkward/robjectviewer.h
index 7f4061175..f1104c90c 100644
--- a/rkward/robjectviewer.h
+++ b/rkward/robjectviewer.h
@@ -69,7 +69,7 @@ protected:
 	RObjectViewerWidget (QWidget* parent, RObject* object);
 	virtual ~RObjectViewerWidget ();
 public:
-	void objectKilled () { _object = 0; };
+	void objectKilled() { _object = nullptr; };
 
 	void invalidate (const QString& reason);
 	void initialize ();
diff --git a/rkward/scriptbackends/qtscriptbackend.cpp b/rkward/scriptbackends/qtscriptbackend.cpp
index e613130f2..25d0b53e6 100644
--- a/rkward/scriptbackends/qtscriptbackend.cpp
+++ b/rkward/scriptbackends/qtscriptbackend.cpp
@@ -20,7 +20,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 QtScriptBackend::QtScriptBackend (const QString &filename, const RKMessageCatalog *catalog) : ScriptBackend () {
 	RK_TRACE (PHP);
 
-	script_thread = 0;
+	script_thread = nullptr;
 	QtScriptBackend::filename = filename;
 	QtScriptBackend::catalog = catalog;
 	dead = false;
@@ -88,7 +88,7 @@ void QtScriptBackend::destroy () {
 	if (!dead) {
 		if (script_thread) script_thread->goToSleep (false);
 		dead = true;
-		code_property = 0;
+		code_property = nullptr;
 		if (script_thread) script_thread->kill ();
 		QTimer::singleShot (10000, this, SLOT (deleteLater()));	// don't wait for ever for the process to die, even if it's somewhat dangerous
 	}
@@ -159,7 +159,7 @@ void QtScriptBackend::needData (const QString &identifier, const int hint) {
 
 #include <QUrl>
 
-QtScriptBackendThread::QtScriptBackendThread (const QString &commonfile, const QString &scriptfile, QtScriptBackend *parent, const RKMessageCatalog *catalog) : QThread (parent), engine (0) {
+QtScriptBackendThread::QtScriptBackendThread (const QString &commonfile, const QString &scriptfile, QtScriptBackend *parent, const RKMessageCatalog *catalog) : QThread (parent), engine(nullptr) {
 	RK_TRACE (PHP);
 
 	// you'd think the engine already was in this thread, but no, it is not. You'd also think, this was fixable by setting "this" as the engine's parent, instead of 0, but no, somehow not.
diff --git a/rkward/scriptbackends/qtscriptbackend.h b/rkward/scriptbackends/qtscriptbackend.h
index 6cead860f..c1751d6a3 100644
--- a/rkward/scriptbackends/qtscriptbackend.h
+++ b/rkward/scriptbackends/qtscriptbackend.h
@@ -27,7 +27,7 @@ public:
 
 	~QtScriptBackend ();
 
-	bool initialize (RKComponentPropertyCode *code_property=0, bool add_headings=true) override;
+	bool initialize (RKComponentPropertyCode *code_property=nullptr, bool add_headings=true) override;
 	void destroy () override;
 	
 	void preprocess (int flags) override { callFunction ("do_preprocess ();\n", flags, Preprocess); };
diff --git a/rkward/scriptbackends/rkcomponentscripting.cpp b/rkward/scriptbackends/rkcomponentscripting.cpp
index f5460d427..2c991cab5 100644
--- a/rkward/scriptbackends/rkcomponentscripting.cpp
+++ b/rkward/scriptbackends/rkcomponentscripting.cpp
@@ -69,7 +69,7 @@ void RKComponentScriptingProxy::handleScriptError(const QJSValue &val, const QSt
 	if (file.isEmpty ()) file = _scriptfile;
 	if (val.isError()) {
 		QString message = i18n("Script Error at '%1' line %2: %3\n", file.isEmpty() ? i18n("inlined code") : file, val.property("lineNumber").toInt(), val.toString());
-		KMessageBox::detailedError (0, message, val.property("stack").toString());
+		KMessageBox::detailedError(nullptr, message, val.property("stack").toString());
 		Q_EMIT haveError();
 	}
 }
diff --git a/rkward/scriptbackends/scriptbackend.cpp b/rkward/scriptbackends/scriptbackend.cpp
index a5ef09766..ad1bb33d9 100644
--- a/rkward/scriptbackends/scriptbackend.cpp
+++ b/rkward/scriptbackends/scriptbackend.cpp
@@ -15,7 +15,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 ScriptBackend::ScriptBackend () : QObject() {
 	busy = false;
 	current_type = Ignore;
-	code_property = 0;
+	code_property = nullptr;
 }
 
 ScriptBackend::~ScriptBackend () {
diff --git a/rkward/scriptbackends/scriptbackend.h b/rkward/scriptbackends/scriptbackend.h
index b63caa765..11ca50d77 100644
--- a/rkward/scriptbackends/scriptbackend.h
+++ b/rkward/scriptbackends/scriptbackend.h
@@ -41,7 +41,7 @@ public:
 @param code_property If you supply a pointer to an RKComponentPropertyCode, The backend will directly set values for this property in response to calls to preproces (), calculate (), printout (), and cleanup ().
 @param add_headings (Only meaningful, if code_property is not 0). If set to true, heading comments will be added to each section of the code (e.g. "## Do calculations")
 @returns true on successful initialization, false on errors */
-	virtual bool initialize (RKComponentPropertyCode *code_property=0, bool add_headings=true) = 0;
+	virtual bool initialize (RKComponentPropertyCode *code_property=nullptr, bool add_headings=true) = 0;
 	virtual void destroy () = 0;
 	
 	virtual void preprocess (int flags) = 0;
diff --git a/rkward/scriptbackends/simplebackend.h b/rkward/scriptbackends/simplebackend.h
index d6ef57a59..896d8000e 100644
--- a/rkward/scriptbackends/simplebackend.h
+++ b/rkward/scriptbackends/simplebackend.h
@@ -30,7 +30,7 @@ public:
 	void setPrintoutTemplate (const QString &template_string) { printout_template = template_string; };
 	void setPreviewTemplate (const QString &template_string) { preview_template = template_string; };
 
-	bool initialize (RKComponentPropertyCode *code_property=0, bool add_headings=true) override;
+	bool initialize (RKComponentPropertyCode *code_property=nullptr, bool add_headings=true) override;
 	void destroy () override;
 	
 	void preprocess (int flags) override;
diff --git a/rkward/settings/rksettings.cpp b/rkward/settings/rksettings.cpp
index 2eb938fa0..5993b25c0 100644
--- a/rkward/settings/rksettings.cpp
+++ b/rkward/settings/rksettings.cpp
@@ -30,8 +30,8 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include "../debug.h"
 
 //static
-RKSettings *RKSettings::settings_dialog = 0;
-RKSettingsTracker *RKSettings::settings_tracker = 0;
+RKSettings *RKSettings::settings_dialog = nullptr;
+RKSettingsTracker *RKSettings::settings_tracker = nullptr;
 
 //static 
 void RKSettings::configureSettings (SettingsPage page, QWidget *parent, RCommandChain *chain) {
@@ -83,7 +83,7 @@ void RKSettings::configureSettings (const QString& page, QWidget *parent, RComma
 //static
 void RKSettings::dialogClosed () {
 	RK_TRACE (SETTINGS);
-	settings_dialog = 0;
+	settings_dialog = nullptr;
 }
 
 RKSettings::RKSettings (QWidget *parent) : KPageDialog (parent) {
@@ -134,20 +134,20 @@ void RKSettings::registerPageModule(RKSettings::SettingsPage super, int child) {
 void RKSettings::initModules () {
 	RK_TRACE (SETTINGS);
 
-	auto ktexteditorpages = RKSettingsModuleCommandEditor::kateConfigPages(this, 0);
+	auto ktexteditorpages = RKSettingsModuleCommandEditor::kateConfigPages(this, nullptr);
 	pages.resize(NumPages + ktexteditorpages.size());
-	modules.insert (PagePlugins, new RKSettingsModulePlugins (this, 0));
-	modules.insert (PageKatePlugins, new RKSettingsModuleKatePlugins (this, 0));
-	modules.insert (PageR, new RKSettingsModuleR (this, 0));
-	modules.insert (PageRPackages, new RKSettingsModuleRPackages (this, 0));
-	modules.insert (PageGeneral, new RKSettingsModuleGeneral (this, 0));
-	modules.insert (PageOutput, new RKSettingsModuleOutput (this, 0));
-	modules.insert (PageX11, new RKSettingsModuleGraphics (this, 0));
-	modules.insert (PageWatch, new RKSettingsModuleWatch (this, 0));
-	modules.insert (PageConsole, new RKSettingsModuleConsole (this, 0));
-	modules.insert (PageCommandEditor, new RKSettingsModuleCommandEditor (this, 0));
-	modules.insert (PageObjectBrowser, new RKSettingsModuleObjectBrowser (this, 0));
-	modules.insert (PageDebug, new RKSettingsModuleDebug (this, 0));
+	modules.insert (PagePlugins, new RKSettingsModulePlugins(this, nullptr));
+	modules.insert (PageKatePlugins, new RKSettingsModuleKatePlugins(this, nullptr));
+	modules.insert (PageR, new RKSettingsModuleR(this, nullptr));
+	modules.insert (PageRPackages, new RKSettingsModuleRPackages(this, nullptr));
+	modules.insert (PageGeneral, new RKSettingsModuleGeneral(this, nullptr));
+	modules.insert (PageOutput, new RKSettingsModuleOutput(this, nullptr));
+	modules.insert (PageX11, new RKSettingsModuleGraphics(this, nullptr));
+	modules.insert (PageWatch, new RKSettingsModuleWatch(this, nullptr));
+	modules.insert (PageConsole, new RKSettingsModuleConsole(this, nullptr));
+	modules.insert (PageCommandEditor, new RKSettingsModuleCommandEditor(this, nullptr));
+	modules.insert (PageObjectBrowser, new RKSettingsModuleObjectBrowser(this, nullptr));
+	modules.insert (PageDebug, new RKSettingsModuleDebug(this, nullptr));
 	for (int i = 0; i < ktexteditorpages.size(); ++i) {
 		modules.insert(NumPages+i, ktexteditorpages[i]);
 	}
diff --git a/rkward/settings/rksettingsmodule.cpp b/rkward/settings/rksettingsmodule.cpp
index b33854878..936175e3d 100644
--- a/rkward/settings/rksettingsmodule.cpp
+++ b/rkward/settings/rksettingsmodule.cpp
@@ -17,7 +17,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include <functional>
 
 //static
-RCommandChain* RKSettingsModule::chain = 0;
+RCommandChain* RKSettingsModule::chain = nullptr;
 
 RKSettingsModule::RKSettingsModule(RKSettings *gui, QWidget *parent) : RKSettingsModuleWidget (parent, nullptr) {
 	connect(this, &RKSettingsModule::settingsChanged, gui, &RKSettings::enableApply);
diff --git a/rkward/settings/rksettingsmodulecommandeditor.h b/rkward/settings/rksettingsmodulecommandeditor.h
index a114c5693..1bfe1bd7d 100644
--- a/rkward/settings/rksettingsmodulecommandeditor.h
+++ b/rkward/settings/rksettingsmodulecommandeditor.h
@@ -58,7 +58,7 @@ friend class RKSettingsModuleConsole;
 	RKConfigValue<bool> completion_type_enabled[N_COMPLETION_CATEGORIES] {{"Calltips", true}, {"Argument completion", true}, {"Object completion", true}, {"Filename completion", true}, {"Auto word completion", true}, {"mouseover", true}};
 	RKConfigValue<bool> cursor_navigates_completions {"Cursor navigate completions", true};
 	RKConfigValue<int> completion_options {"Completion option flags", (int) RObject::IncludeEnvirIfMasked};
-	RKConfigGroup dummyoptions = RKConfigGroup(0, N_COMPLETION_CATEGORIES, completion_type_enabled);
+	RKConfigGroup dummyoptions = RKConfigGroup(nullptr, N_COMPLETION_CATEGORIES, completion_type_enabled);
 	RKConfigValue<bool> completion_all_filetypes {"Completion all filetypes", true};
 	RKConfigGroup group {"Completion", { &dummyoptions, &auto_completion_enabled, &auto_completion_min_chars, &auto_completion_timeout, &auto_completion_cursor_activated, &tabkey_invokes_completion, &cursor_navigates_completions, &completion_options, &completion_all_filetypes }};
 };
diff --git a/rkward/windows/katepluginintegration.cpp b/rkward/windows/katepluginintegration.cpp
index 5a2584fd6..64641980e 100644
--- a/rkward/windows/katepluginintegration.cpp
+++ b/rkward/windows/katepluginintegration.cpp
@@ -50,7 +50,7 @@ KatePluginIntegrationApp::KatePluginIntegrationApp(QObject *parent) : QObject (p
 	QVector<KPluginMetaData> plugins = KPluginMetaData::findPlugins(QStringLiteral("ktexteditor"));
 	for (int i = plugins.size() -1; i >= 0; --i) {
 		PluginInfo info;
-		info.plugin = 0;
+		info.plugin = nullptr;
 		info.data = plugins[i];
 		// Note: creates a lookup-table *and* eliminates potential dupes later in the search path
 		known_plugins.insert(idForPlugin(info.data), info);
@@ -627,7 +627,7 @@ QObject* KatePluginIntegrationWindow::createPluginView(KTextEditor::Plugin* plug
 	active_plugin = plugin;
 	PluginResources& resources = plugin_resources.insert(plugin, PluginResources()).value();
 	resources.view = plugin->createView(main);
-	active_plugin = 0;
+	active_plugin = nullptr;
 	disconnect(factory(), &KXMLGUIFactory::clientAdded, this, &KatePluginIntegrationWindow::catchXMLGUIClientsHack);
 	fixUpPluginUI(app->idForPlugin(plugin), resources);
 	connect(plugin, &QObject::destroyed, this, [this, plugin]() { plugin_resources.remove(plugin); });
diff --git a/rkward/windows/katepluginintegration.h b/rkward/windows/katepluginintegration.h
index f4ff21f57..f8a52fd3e 100644
--- a/rkward/windows/katepluginintegration.h
+++ b/rkward/windows/katepluginintegration.h
@@ -108,7 +108,7 @@ friend class KatePluginIntegrationApp;
 	KTextEditor::MainWindow *main;
 	QObject* createPluginView(KTextEditor::Plugin* plugin);
 	struct PluginResources {
-		PluginResources() : view(0) {};
+		PluginResources() : view(nullptr) {};
 		QObject *view;
 		QList<KXMLGUIClient*> clients;
 		QList<RKMDIWindow*> windows;
diff --git a/rkward/windows/rcontrolwindow.cpp b/rkward/windows/rcontrolwindow.cpp
index 2e21e24bb..88b3132fa 100644
--- a/rkward/windows/rcontrolwindow.cpp
+++ b/rkward/windows/rcontrolwindow.cpp
@@ -24,11 +24,11 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include "../debug.h"
 
 //static
-RControlWindow *RControlWindow::control_window = 0;
+RControlWindow *RControlWindow::control_window = nullptr;
 
 RControlWindow::RControlWindow (QWidget *parent, bool tool_window, const char *name) : RKMDIWindow (parent, PendingJobsWindow, tool_window, name) {
 	RK_TRACE (APP);
-	setPart (new RKDummyPart (0, this));
+	setPart (new RKDummyPart(nullptr, this));
 	initializeActivationSignals ();
 	setFocusPolicy (Qt::ClickFocus);
 
@@ -67,7 +67,7 @@ RControlWindow::~RControlWindow () {
 	RK_TRACE (APP);
 
 	if (commands_view->model ()) {
-		commands_view->setModel (0);
+		commands_view->setModel(nullptr);
 		RCommandStackModel::getModel ()->removeListener ();
 	}
 }
@@ -89,7 +89,7 @@ void RControlWindow::hideEvent (QHideEvent *e) {
 	RK_TRACE (APP);
 
 	if (commands_view->model ()) {
-		commands_view->setModel (0);
+		commands_view->setModel(nullptr);
 		RCommandStackModel::getModel ()->removeListener ();
 	}
 
diff --git a/rkward/windows/rcontrolwindow.h b/rkward/windows/rcontrolwindow.h
index c50faab25..bdf37f48f 100644
--- a/rkward/windows/rcontrolwindow.h
+++ b/rkward/windows/rcontrolwindow.h
@@ -31,7 +31,7 @@ class RControlWindow : public RKMDIWindow {
 public:
 /** constructor.
 @param parent parent QWidget, usually RKGlobals::rkApp () or similar */
-	RControlWindow (QWidget *parent, bool tool_window, const char *name=0);
+	RControlWindow (QWidget *parent, bool tool_window, const char *name=nullptr);
 /** destructor */
 	~RControlWindow ();
 
diff --git a/rkward/windows/rkcallstackviewer.cpp b/rkward/windows/rkcallstackviewer.cpp
index 24da8f215..f8cfe93ef 100644
--- a/rkward/windows/rkcallstackviewer.cpp
+++ b/rkward/windows/rkcallstackviewer.cpp
@@ -22,12 +22,12 @@ SPDX-License-Identifier: GPL-2.0-or-later
 
 #include "../debug.h"
 
-RKCallstackViewer* RKCallstackViewer::_instance = 0;
+RKCallstackViewer* RKCallstackViewer::_instance = nullptr;
 
 RKCallstackViewer::RKCallstackViewer (QWidget *parent, bool tool_window, const char *name) : RKMDIWindow (parent, RKMDIWindow::CallstackViewerWindow, tool_window, name) {
 	RK_TRACE (APP);
 
-	real_widget = 0;
+	real_widget = nullptr;
 
 	QVBoxLayout *layout = new QVBoxLayout (this);
 	layout->setContentsMargins (0, 0, 0, 0);
diff --git a/rkward/windows/rkcallstackviewer.h b/rkward/windows/rkcallstackviewer.h
index 43b539d41..2c073118c 100644
--- a/rkward/windows/rkcallstackviewer.h
+++ b/rkward/windows/rkcallstackviewer.h
@@ -19,8 +19,8 @@ class QLabel;
 class RKCallstackViewer : public RKMDIWindow {
 	Q_OBJECT
 public:
-	RKCallstackViewer (QWidget *parent, bool tool_window, const char *name=0);
-	~RKCallstackViewer ();
+	RKCallstackViewer(QWidget *parent, bool tool_window, const char *name=nullptr);
+	~RKCallstackViewer();
 
 /** reimplemented to create the real widget only when the viewer is shown for the first time */
 	void showEvent (QShowEvent *e) override;
diff --git a/rkward/windows/rkcodecompletion.cpp b/rkward/windows/rkcodecompletion.cpp
index 56bad4e9f..14fa509d4 100644
--- a/rkward/windows/rkcodecompletion.cpp
+++ b/rkward/windows/rkcodecompletion.cpp
@@ -545,10 +545,10 @@ bool RKCompletionManager::eventFilter (QObject*, QEvent* event) {
 
 				// No, we cannot just send a fake key event, easily...
 				KActionCollection *kate_edit_actions = view ()->findChild<KActionCollection*> ("edit_actions");
-				QAction *action = kate_edit_actions ? (kate_edit_actions->action (k->key () == Qt::Key_Up ? "move_line_up" : "move_line_down")) : 0;
+				QAction *action = kate_edit_actions ? (kate_edit_actions->action (k->key () == Qt::Key_Up ? "move_line_up" : "move_line_down")) : nullptr;
 				if (!action) {
 					kate_edit_actions = view ()->actionCollection ();
-					action = kate_edit_actions ? (kate_edit_actions->action (k->key () == Qt::Key_Up ? "move_line_up" : "move_line_down")) : 0;
+					action = kate_edit_actions ? (kate_edit_actions->action (k->key () == Qt::Key_Up ? "move_line_up" : "move_line_down")) : nullptr;
 				}
 				if (action) action->trigger ();
 				else RK_ASSERT (action);
@@ -731,7 +731,7 @@ QStringList RKCodeCompletionModel::rawPartialCompletions() const {
 //////////////////////// RKCallHintModel //////////////////////////
 RKCallHintModel::RKCallHintModel (RKCompletionManager* manager) : RKCompletionModelBase (manager) {
 	RK_TRACE (COMMANDEDITOR);
-	function = 0;
+	function = nullptr;
 }
 
 // TODO: There could be more than one function by a certain name, and we could support this!
@@ -945,7 +945,7 @@ void RKFileCompletionModelWorker::run () {
 
 RKFileCompletionModel::RKFileCompletionModel (RKCompletionManager* manager) : RKCompletionModelBase (manager) {
 	RK_TRACE (COMMANDEDITOR);
-	worker = 0;
+	worker = nullptr;
 }
 
 RKFileCompletionModel::~RKFileCompletionModel () {
@@ -978,7 +978,7 @@ void RKFileCompletionModel::completionsReady (const QString& string, const QStri
 	RK_TRACE (COMMANDEDITOR);
 
 	RK_DEBUG (COMMANDEDITOR, DL_DEBUG, "Filename completion finished for '%s': %d matches", qPrintable (string), files.size () + exes.size ());
-	worker = 0;
+	worker = nullptr;
 	if (current_fragment == string) {
 		beginResetModel ();
 		names = files + exes; // TODO: This could be prettier
diff --git a/rkward/windows/rkcommandeditorwindow.cpp b/rkward/windows/rkcommandeditorwindow.cpp
index 2737ada8a..6dd5d1ecb 100644
--- a/rkward/windows/rkcommandeditorwindow.cpp
+++ b/rkward/windows/rkcommandeditorwindow.cpp
@@ -98,8 +98,8 @@ RKCommandEditorWindow::RKCommandEditorWindow (QWidget *parent, const QUrl &_url,
 	RK_ASSERT (editor);
 
 	QUrl url = _url;
-	m_doc = 0;
-	preview_dir = 0;
+	m_doc = nullptr;
+	preview_dir = nullptr;
 	visible_to_kateplugins = flags & RKCommandEditorFlags::VisibleToKTextEditorPlugins;
 	if (visible_to_kateplugins) addUiBuddy(RKWardMainWindow::getMain()->katePluginIntegration()->mainWindow()->dynamicGuiClient());
 	bool use_r_highlighting = (flags & RKCommandEditorFlags::ForceRHighlighting) || (url.isEmpty() && (flags & RKCommandEditorFlags::DefaultToRHighlighting)) || RKSettingsModuleCommandEditor::matchesScriptFileFilter (url.fileName ());
@@ -334,7 +334,7 @@ QAction *findAction (KTextEditor::View* view, const QString &actionName) {
 		if (found) return found;
 	}
 
-	return 0;
+	return nullptr;
 }
 
 void RKCommandEditorWindow::initializeActions (KActionCollection* ac) {
@@ -348,8 +348,8 @@ void RKCommandEditorWindow::initializeActions (KActionCollection* ac) {
 	// NOTE: enter_and_submit is not currently added to the menu
 	QAction *action = ac->addAction ("enter_and_submit", this, SLOT (enterAndSubmit()));
 	action->setText (i18n ("Insert line break and run"));
-	ac->setDefaultShortcuts (action, QList<QKeySequence>() << Qt::AltModifier + Qt::Key_Return << Qt::AltModifier + Qt::Key_Enter);
-	ac->setDefaultShortcut (action, Qt::AltModifier + Qt::Key_Return); // KF5 TODO: This line needed only for KF5 < 5.2, according to documentation
+	ac->setDefaultShortcuts (action, QList<QKeySequence>() << (Qt::AltModifier | Qt::Key_Return) << (Qt::AltModifier | Qt::Key_Enter));
+	ac->setDefaultShortcut (action, Qt::AltModifier | Qt::Key_Return); // KF5 TODO: This line needed only for KF5 < 5.2, according to documentation
 
 	RKStandardActions::functionHelp (this, this);
 	RKStandardActions::onlineHelp (this, this);
@@ -462,7 +462,7 @@ void RKCommandEditorWindow::initBlocks () {
 		actionmenu_run_block->addAction (record.run);
 
 		// these two not strictly needed due to removeBlock(), below. Silences a GCC warning, however.
-		record.range = 0;
+		record.range = nullptr;
 		record.active = false;
 
 		block_records.append (record);
@@ -564,9 +564,9 @@ void RKCommandEditorWindow::discardPreview () {
 		preview_manager->setPreviewDisabled ();
 		RInterface::issueCommand (QString (".rk.killPreviewDevice(%1)\nrk.discard.preview.data (%1)").arg (RObject::rQuote(preview_manager->previewId ())), RCommand::App | RCommand::Sync);
 		delete preview_dir;
-		preview_dir = 0;
+		preview_dir = nullptr;
 		delete preview_input_file;
-		preview_input_file = 0;
+		preview_input_file = nullptr;
 	}
 	action_no_preview->setChecked (true);
 }
@@ -833,13 +833,13 @@ void RKCommandEditorWindow::doRenderPreview () {
 
 	if (!preview_dir) {
 		preview_dir = new QTemporaryDir ();
-		preview_input_file = 0;
+		preview_input_file = nullptr;
 	}
 	if (preview_input_file) {
 		// When switching between .Rmd and .R previews, discard input file
 		if ((mode == RMarkdownPreview) != (preview_input_file->fileName().endsWith (".Rmd"))) {
 			delete preview_input_file;
-			preview_input_file = 0;
+			preview_input_file = nullptr;
 		} else {
 			preview_input_file->remove ();  // If re-using an existing filename, remove it first. Somehow, contrary to documentation, this does not happen in open(WriteOnly), below.
 		}
@@ -1039,7 +1039,7 @@ void RKCommandEditorWindow::removeBlock (int index, bool was_deleted) {
 	}
 
 	QString actiontext = i18n ("%1 (Unused)", index + 1);
-	block_records[index].range = 0;
+	block_records[index].range = nullptr;
 	block_records[index].active = false;
 	block_records[index].mark->setText (actiontext);
 	block_records[index].unmark->setText (actiontext);
@@ -1060,8 +1060,8 @@ void RKCommandEditorWindow::selectionChanged (KTextEditor::View* view) {
 }
 
 // static
-KTextEditor::Document* RKCommandHighlighter::_doc = 0;
-KTextEditor::View* RKCommandHighlighter::_view = 0;
+KTextEditor::Document* RKCommandHighlighter::_doc = nullptr;
+KTextEditor::View* RKCommandHighlighter::_view = nullptr;
 KTextEditor::Document* RKCommandHighlighter::getDoc () {
 	if (_doc) return _doc;
 
@@ -1071,7 +1071,7 @@ KTextEditor::Document* RKCommandHighlighter::getDoc () {
 
 	_doc = editor->createDocument (RKWardMainWindow::getMain ());
 // NOTE: A (dummy) view is needed to access highlighting attributes.
-	_view = _doc->createView (0);
+	_view = _doc->createView(nullptr);
 	_view->hide ();
 	RK_ASSERT (_doc);
 	return _doc;
diff --git a/rkward/windows/rkcommandlog.cpp b/rkward/windows/rkcommandlog.cpp
index bf151f473..9a9f1d78a 100644
--- a/rkward/windows/rkcommandlog.cpp
+++ b/rkward/windows/rkcommandlog.cpp
@@ -27,7 +27,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include "../debug.h"
 
 //static
-RKCommandLog *RKCommandLog::rkcommand_log = 0;
+RKCommandLog *RKCommandLog::rkcommand_log = nullptr;
 
 RKCommandLog::RKCommandLog (QWidget *parent, bool tool_window, const char *name) : RKMDIWindow (parent, CommandLogWindow, tool_window, name) {
 	RK_TRACE (APP);
@@ -280,7 +280,7 @@ void RKCommandLogView::selectAll () {
 #include <QAction>
 #include <QGuiApplication>
 
-RKCommandLogPart::RKCommandLogPart (RKCommandLog *for_log) : KParts::Part (0) {
+RKCommandLogPart::RKCommandLogPart(RKCommandLog *for_log) : KParts::Part(nullptr) {
 	RK_TRACE (APP);
 
 	setComponentName (QCoreApplication::applicationName (), QGuiApplication::applicationDisplayName ());
diff --git a/rkward/windows/rkcommandlog.h b/rkward/windows/rkcommandlog.h
index 037cffded..652a9efaf 100644
--- a/rkward/windows/rkcommandlog.h
+++ b/rkward/windows/rkcommandlog.h
@@ -40,8 +40,8 @@ protected:
 friend class RCommand;
 /** Command has finished. If the command has failed, it may be necessary to print some more information */
 	void rCommandDone (RCommand *command);
-	RKCommandLog (QWidget *parent, bool tool_window, const char *name=0);
-	~RKCommandLog ();
+	RKCommandLog(QWidget *parent, bool tool_window, const char *name=nullptr);
+	~RKCommandLog();
 public Q_SLOTS:
 /** configures the log_view-window */
 	void configureLog ();
diff --git a/rkward/windows/rkdebugconsole.cpp b/rkward/windows/rkdebugconsole.cpp
index fa2b1521c..d7fa96458 100644
--- a/rkward/windows/rkdebugconsole.cpp
+++ b/rkward/windows/rkdebugconsole.cpp
@@ -24,7 +24,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 
 #include "../debug.h"
 
-RKDebugConsole* RKDebugConsole::_instance = 0;
+RKDebugConsole* RKDebugConsole::_instance = nullptr;
 
 RKDebugConsole::RKDebugConsole (QWidget *parent, bool tool_window, const char *name) : RKMDIWindow (parent, DebugConsoleWindow, tool_window, name) {
 	RK_TRACE (APP);
diff --git a/rkward/windows/rkdebugconsole.h b/rkward/windows/rkdebugconsole.h
index cbdd27af9..4dd43f57b 100644
--- a/rkward/windows/rkdebugconsole.h
+++ b/rkward/windows/rkdebugconsole.h
@@ -19,8 +19,8 @@ class QLabel;
 class RKDebugConsole : public RKMDIWindow {
 	Q_OBJECT
 public:
-	RKDebugConsole (QWidget *parent, bool tool_window, const char *name=0);
-	~RKDebugConsole ();
+	RKDebugConsole(QWidget *parent, bool tool_window, const char *name=nullptr);
+	~RKDebugConsole();
 
 	static RKDebugConsole *instance () { return _instance; };
 
diff --git a/rkward/windows/rkdebugmessagewindow.cpp b/rkward/windows/rkdebugmessagewindow.cpp
index 12d082ad7..21ff88cda 100644
--- a/rkward/windows/rkdebugmessagewindow.cpp
+++ b/rkward/windows/rkdebugmessagewindow.cpp
@@ -19,12 +19,12 @@ SPDX-License-Identifier: GPL-2.0-or-later
 
 #include "../debug.h"
 
-RKDebugMessageWindow* RKDebugMessageWindow::_instance = 0;
+RKDebugMessageWindow* RKDebugMessageWindow::_instance = nullptr;
 
 RKDebugMessageWindow::RKDebugMessageWindow (QWidget* parent, bool tool_window, const char* name) : RKMDIWindow (parent, RKMDIWindow::DebugMessageWindow, tool_window, name) {
 	RK_TRACE (APP);
 	RK_ASSERT (!_instance);
-	real_widget = 0;
+	real_widget = nullptr;
 	first = true;
 
 	QVBoxLayout *layout = new QVBoxLayout (this);
@@ -80,7 +80,7 @@ void RKDebugMessageWindow::discardWidget () {
 	if (real_widget) {
 		RK_DEBUG (APP, DL_INFO, "discarding debug message viewer");
 		delete real_widget;
-		real_widget = 0;
+		real_widget = nullptr;
 	}
 }
 
diff --git a/rkward/windows/rkdebugmessagewindow.h b/rkward/windows/rkdebugmessagewindow.h
index e30d796c0..4be6998a2 100644
--- a/rkward/windows/rkdebugmessagewindow.h
+++ b/rkward/windows/rkdebugmessagewindow.h
@@ -17,8 +17,8 @@ class QTextEdit;
  * developers. */
 class RKDebugMessageWindow : public RKMDIWindow {
 public:
-	RKDebugMessageWindow (QWidget *parent, bool tool_window, const char *name=0);
-	~RKDebugMessageWindow ();
+	RKDebugMessageWindow(QWidget *parent, bool tool_window, const char *name=nullptr);
+	~RKDebugMessageWindow();
 
 /** reimplemented to create the real widget only when the viewer is shown */
 	void showEvent (QShowEvent *e) override;
diff --git a/rkward/windows/rkfilebrowser.cpp b/rkward/windows/rkfilebrowser.cpp
index 20db6c05e..9529cdbbd 100644
--- a/rkward/windows/rkfilebrowser.cpp
+++ b/rkward/windows/rkfilebrowser.cpp
@@ -37,12 +37,12 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include "../debug.h"
 
 // static
-RKFileBrowser *RKFileBrowser::main_browser = 0;
+RKFileBrowser *RKFileBrowser::main_browser = nullptr;
 
 RKFileBrowser::RKFileBrowser (QWidget *parent, bool tool_window, const char *name) : RKMDIWindow (parent, FileBrowserWindow, tool_window, name) {
 	RK_TRACE (APP);
 
-	real_widget = 0;
+	real_widget = nullptr;
 
 	QVBoxLayout *layout = new QVBoxLayout (this);
 	layout->setContentsMargins (0, 0, 0, 0);
diff --git a/rkward/windows/rkfilebrowser.h b/rkward/windows/rkfilebrowser.h
index 1884b3306..303723733 100644
--- a/rkward/windows/rkfilebrowser.h
+++ b/rkward/windows/rkfilebrowser.h
@@ -25,8 +25,8 @@ class QAction;
 class RKFileBrowser : public RKMDIWindow {
 	Q_OBJECT
 public:
-	RKFileBrowser (QWidget *parent, bool tool_window, const char *name=0);
-	~RKFileBrowser ();
+	RKFileBrowser(QWidget *parent, bool tool_window, const char *name=nullptr);
+	~RKFileBrowser();
 
 /** reimplemented to create the real file browser widget only when the file browser is shown for the first time */
 	void showEvent (QShowEvent *e) override;
diff --git a/rkward/windows/rkhelpsearchwindow.cpp b/rkward/windows/rkhelpsearchwindow.cpp
index d36f58afe..5522eaac6 100644
--- a/rkward/windows/rkhelpsearchwindow.cpp
+++ b/rkward/windows/rkhelpsearchwindow.cpp
@@ -40,11 +40,11 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #define COL_PACKAGE 3
 #define COL_COUNT 4
 
-RKHelpSearchWindow* RKHelpSearchWindow::main_help_search = 0;
+RKHelpSearchWindow* RKHelpSearchWindow::main_help_search = nullptr;
 
 RKHelpSearchWindow::RKHelpSearchWindow (QWidget *parent, bool tool_window, const char *name) : RKMDIWindow (parent, SearchHelpWindow, tool_window, name) {
 	RK_TRACE (APP);
-	setPart (new RKDummyPart (0, this));
+	setPart (new RKDummyPart(nullptr, this));
 	initializeActivationSignals ();
 	setFocusPolicy (Qt::ClickFocus);
 
diff --git a/rkward/windows/rkhelpsearchwindow.h b/rkward/windows/rkhelpsearchwindow.h
index 1cc8dd609..b033207e4 100644
--- a/rkward/windows/rkhelpsearchwindow.h
+++ b/rkward/windows/rkhelpsearchwindow.h
@@ -28,7 +28,7 @@ class RCommandChain;
 class RKHelpSearchWindow : public RKMDIWindow {
 	Q_OBJECT
 public:
-	RKHelpSearchWindow (QWidget *parent, bool tool_window, const char *name=0);
+	RKHelpSearchWindow (QWidget *parent, bool tool_window, const char *name=nullptr);
 	~RKHelpSearchWindow ();
 /** small convenience function to get context help for RKCommandEditorWindow and RKConsole.
 @param context_line The current line
diff --git a/rkward/windows/rkhtmlwindow.cpp b/rkward/windows/rkhtmlwindow.cpp
index cf4e8b892..7c555b1f1 100644
--- a/rkward/windows/rkhtmlwindow.cpp
+++ b/rkward/windows/rkhtmlwindow.cpp
@@ -973,13 +973,13 @@ bool RKHelpRenderer::renderRKHelp (const QUrl &url, RKHTMLWindow* container) {
 
 	QStringList anchors, anchornames;
 
-	RKComponentHandle *chandle = 0;
+	RKComponentHandle *chandle = nullptr;
 	if (for_component) {
 		chandle = componentPathToHandle (url.path ());
 		if (!chandle) return false;
 	}
 
-	XMLHelper component_xml_helper (for_component ? chandle->getFilename () : QString (), for_component ? chandle->messageCatalog () : 0);
+	XMLHelper component_xml_helper(for_component ? chandle->getFilename() : QString(), for_component ? chandle->messageCatalog() : nullptr);
 	component_xml = &component_xml_helper;
 	QString help_file_name;
 	QDomElement element;
@@ -1284,8 +1284,8 @@ QString RKHelpRenderer::componentPathToId (const QString &path) {
 	RK_TRACE (APP);
 
 	QStringList path_segments = path.split ('/', Qt::SkipEmptyParts);
-	if (path_segments.count () > 2) return 0;
-	if (path_segments.count () < 1) return 0;
+	if (path_segments.count () > 2) return QString();
+	if (path_segments.count () < 1) return QString();
 	if (path_segments.count () == 1) path_segments.push_front ("rkward");
 	RK_ASSERT (path_segments.count () == 2);
 
@@ -1326,7 +1326,7 @@ void RKHelpRenderer::writeHTML (const QString& string) {
 #include <KIO/CopyJob>
 
 // static
-RKOutputWindowManager* RKOutputWindowManager::_self = 0;
+RKOutputWindowManager* RKOutputWindowManager::_self = nullptr;
 
 RKOutputWindowManager* RKOutputWindowManager::self () {
 	if (!_self) {
@@ -1443,7 +1443,7 @@ QList<RKHTMLWindow*> RKOutputWindowManager::existingOutputWindows(const QString
 void RKOutputWindowManager::fileChanged (const QString &path) {
 	RK_TRACE (APP);
 
-	RKHTMLWindow *w = 0;
+	RKHTMLWindow *w = nullptr;
 	QList<RKHTMLWindow *> window_list = windows.values (path);
 	for (int i = 0; i < window_list.size (); ++i) {
 		window_list[i]->refresh ();
diff --git a/rkward/windows/rkhtmlwindow.h b/rkward/windows/rkhtmlwindow.h
index 2512ee66d..0ea5cbb30 100644
--- a/rkward/windows/rkhtmlwindow.h
+++ b/rkward/windows/rkhtmlwindow.h
@@ -63,7 +63,7 @@ public:
  *  If window is not 0, and the url is a help window, open it, there (otherwise in a new window).
  *  TODO: move to RKWorkplace? As this can really open a bunch of different things, although generally _from_ an html window.
  */
-	static bool handleRKWardURL (const QUrl &url, RKHTMLWindow *window=0);
+	static bool handleRKWardURL(const QUrl &url, RKHTMLWindow *window=nullptr);
 	void openRKHPage (const QUrl &url);
 
 	bool isModified () override;
@@ -176,7 +176,7 @@ friend class RKHTMLWindow;
 class RKHelpRenderer {
 public:
 /** ctor */
-	explicit RKHelpRenderer (QIODevice *_device) { device = _device; help_xml = 0; component_xml = 0; };
+	explicit RKHelpRenderer(QIODevice *_device) { device = _device; help_xml = nullptr; component_xml = nullptr; };
 /** destructor */
 	~RKHelpRenderer () {};
 /** render an rkward://[page|component]-page to the device given in the ctor.
diff --git a/rkward/windows/rkmdiwindow.cpp b/rkward/windows/rkmdiwindow.cpp
index 6c3e782b5..dadd46753 100644
--- a/rkward/windows/rkmdiwindow.cpp
+++ b/rkward/windows/rkmdiwindow.cpp
@@ -164,8 +164,8 @@ bool RKMDIWindow::close (CloseWindowMode ask_save) {
 			if (tool_window_bar) RKWorkplace::mainWorkplace ()->attachWindow (this);
 			else {
 				state = Attached;
-				hide ();
-				setParent (0);
+				hide();
+				setParent(nullptr);
 			}
 		}
 
diff --git a/rkward/windows/rktoolwindowbar.cpp b/rkward/windows/rktoolwindowbar.cpp
index 62bcc493a..5bbd344dd 100644
--- a/rkward/windows/rktoolwindowbar.cpp
+++ b/rkward/windows/rktoolwindowbar.cpp
@@ -31,7 +31,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #define SPLITTER_MIN_SIZE 30
 
 RKToolWindowBar::RKToolWindowBar (KMultiTabBarPosition position, QWidget *parent) : KMultiTabBar (position, parent),
-	container (0) {
+	container(nullptr) {
 	RK_TRACE (APP);
 
 	setStyle (KMultiTabBar::KDEV3ICON);
@@ -177,10 +177,10 @@ void RKToolWindowBar::removeWidget (RKMDIWindow *widget) {
 	removeTab (id);
 	widget_to_id.remove (widget);
 	disconnect (widget, &QObject::destroyed, this, &RKToolWindowBar::windowDestroyed);
-	widget->tool_window_bar = 0;
+	widget->tool_window_bar = nullptr;
 
 	if (widget->isAttached ()) {
-		widget->setParent (0);
+		widget->setParent(nullptr);
 		widget->hide ();
 	}
 
@@ -241,7 +241,7 @@ void RKToolWindowBar::hideWidget (RKMDIWindow *widget) {
 		container->hide ();
 	}
 
-	RKWardMainWindow::getMain()->partManager()->setActivePart (0);
+	RKWardMainWindow::getMain()->partManager()->setActivePart(nullptr);
 	widget->active = false;
 	widget->hide ();
 
@@ -273,7 +273,7 @@ RKMDIWindow* RKToolWindowBar::idToWidget (int id) const {
 		}
 	}
 
-	return 0;
+	return nullptr;
 }
 
 bool RKToolWindowBar::eventFilter (QObject *obj, QEvent *ev) {
diff --git a/rkward/windows/rktoolwindowlist.cpp b/rkward/windows/rktoolwindowlist.cpp
index 4ad6a1e4e..2d732ac60 100644
--- a/rkward/windows/rktoolwindowlist.cpp
+++ b/rkward/windows/rktoolwindowlist.cpp
@@ -41,7 +41,7 @@ RKMDIWindow* RKToolWindowList::findToolWindowById (const QString &id) {
 		if (RKToolWindowListPrivate::registered_tool_windows[i].id == id) return RKToolWindowListPrivate::registered_tool_windows[i].window;
 	}
 
-	return 0;
+	return nullptr;
 }
 
 void RKToolWindowList::unregisterToolWindow (RKMDIWindow *window) {
diff --git a/rkward/windows/rktoplevelwindowgui.cpp b/rkward/windows/rktoplevelwindowgui.cpp
index 7678b79fc..ab3b2d999 100644
--- a/rkward/windows/rktoplevelwindowgui.cpp
+++ b/rkward/windows/rktoplevelwindowgui.cpp
@@ -75,7 +75,7 @@ RKTopLevelWindowGUI::RKTopLevelWindowGUI(KXmlGuiWindow *for_window) : QObject(fo
 	prev_action = actionCollection ()->addAction ("prev_window", this, SLOT (previousWindow()));
 	prev_action->setText (i18n ("Previous Window"));
 	prev_action->setIcon (QIcon (RKCommonFunctions::getRKWardDataDir () + "icons/window_back.png"));
-	actionCollection ()->setDefaultShortcut (prev_action, Qt::ControlModifier + Qt::Key_Tab);
+	actionCollection ()->setDefaultShortcut (prev_action, Qt::ControlModifier | Qt::Key_Tab);
 	next_action = actionCollection ()->addAction ("next_window", this, SLOT (nextWindow()));
 	next_action->setText (i18n ("Next Window"));
 	next_action->setIcon (QIcon (RKCommonFunctions::getRKWardDataDir () + "icons/window_forward.png"));
diff --git a/rkward/windows/rkwindowcatcher.cpp b/rkward/windows/rkwindowcatcher.cpp
index a600b969a..6ee51eead 100644
--- a/rkward/windows/rkwindowcatcher.cpp
+++ b/rkward/windows/rkwindowcatcher.cpp
@@ -31,7 +31,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include "../misc/rkcommonfunctions.h"
 #include "../debug.h"
 
-RKWindowCatcher *RKWindowCatcher::_instance = 0;
+RKWindowCatcher *RKWindowCatcher::_instance = nullptr;
 RKWindowCatcher* RKWindowCatcher::instance () {
 	if (!_instance) {
 		RK_TRACE (MISC);
@@ -232,7 +232,7 @@ void RKWindowCatcher::killDevice (int device_number) {
 // static
 QHash<int, RKCaughtX11Window*> RKCaughtX11Window::device_windows;
 
-RKCaughtX11Window::RKCaughtX11Window (QWindow* window_to_embed, int device_number) : RKMDIWindow (0, X11Window) {
+RKCaughtX11Window::RKCaughtX11Window(QWindow* window_to_embed, int device_number) : RKMDIWindow(nullptr, X11Window) {
 	RK_TRACE (MISC);
 // TODO: Actually, the WindowCatcher should pass a QWindow*, not WId.
 	commonInit (device_number);
@@ -267,7 +267,7 @@ RKCaughtX11Window::RKCaughtX11Window (QWindow* window_to_embed, int device_numbe
 	QTimer::singleShot (100, this, SLOT (doEmbed()));
 }
 
-RKCaughtX11Window::RKCaughtX11Window (RKGraphicsDevice* rkward_device, int device_number) : RKMDIWindow (0, X11Window) {
+RKCaughtX11Window::RKCaughtX11Window(RKGraphicsDevice* rkward_device, int device_number) : RKMDIWindow(nullptr, X11Window) {
 	RK_TRACE (MISC);
 
 	commonInit (device_number);
@@ -290,16 +290,16 @@ RKCaughtX11Window::RKCaughtX11Window (RKGraphicsDevice* rkward_device, int devic
 void RKCaughtX11Window::commonInit (int device_number) {
 	RK_TRACE (MISC);
 
-	capture = 0;
-	embedded = 0;
+	capture = nullptr;
+	embedded = nullptr;
 	embedding_complete = false;
-	rk_native_device = 0;
+	rk_native_device = nullptr;
 	killed_in_r = close_attempted = false;
 	RKCaughtX11Window::device_number = device_number;
 	RK_ASSERT (!device_windows.contains (device_number));
 	device_windows.insert (device_number, this);
 
-	error_dialog = new RKProgressControl (0, i18n ("An error occurred"), i18n ("An error occurred"), RKProgressControl::DetailedError);
+	error_dialog = new RKProgressControl(nullptr, i18n("An error occurred"), i18n("An error occurred"), RKProgressControl::DetailedError);
 	setPart (new RKCaughtX11WindowPart (this));
 	setMetaInfo (i18n ("Graphics Device Window"), QUrl ("rkward://page/rkward_plot_history"), RKSettings::PageX11);
 	initializeActivationSignals ();
@@ -410,7 +410,7 @@ void RKCaughtX11Window::forceClose() {
 	if (embedded) {
 		// HACK: Somehow (R 3.0.0alpha), the X11() window is surprisingly die-hard, if it is not closed "the regular way".
 		// So we expurge it, and leave the rest to the user.
-		embedded->setParent(0);
+		embedded->setParent(nullptr);
 		qApp->processEvents();
 	}
 	RKMDIWindow::close(NoAskSaveModified);
@@ -720,7 +720,7 @@ void RKCaughtX11Window::updateHistoryActions (int history_length, int position,
 //////////////////////////////// BEGIN RKCaughtX11WindowPart //////////////////////////
 
 
-RKCaughtX11WindowPart::RKCaughtX11WindowPart (RKCaughtX11Window *window) : KParts::Part (0) {
+RKCaughtX11WindowPart::RKCaughtX11WindowPart(RKCaughtX11Window *window) : KParts::Part(nullptr) {
 	RK_TRACE (MISC);
 
 	setComponentName (QCoreApplication::applicationName (), QGuiApplication::applicationDisplayName ());
diff --git a/rkward/windows/rkworkplace.cpp b/rkward/windows/rkworkplace.cpp
index fbce4f0cf..b3716c6c0 100644
--- a/rkward/windows/rkworkplace.cpp
+++ b/rkward/windows/rkworkplace.cpp
@@ -267,7 +267,7 @@ void RKWorkplace::addWindow (RKMDIWindow *window, bool attached) {
 			}
 		}
 		if (pos < 0) {   // not yet known: implicit registration -> create corresponding named_window_spec on the fly.
-			registerNamedWindow (window_name_override, 0, attached ? RKWardMainWindow::getMain () : 0);
+			registerNamedWindow(window_name_override, nullptr, attached ? RKWardMainWindow::getMain() : nullptr);
 			pos = named_windows.size () - 1;
 		}
 
@@ -285,7 +285,7 @@ void RKWorkplace::addWindow (RKMDIWindow *window, bool attached) {
 
 		// add window in the correct area
 		if (nw.parent == RKWardMainWindow::getMain ()) attached = true;
-		else if (nw.parent == 0) attached = false;
+		else if (nw.parent == nullptr) attached = false;
 		else { // custom parent
 			RKXMLGUIPreviewArea* area = qobject_cast<RKXMLGUIPreviewArea*>(nw.parent);
 			if (!area) {
@@ -378,7 +378,7 @@ RKMDIWindow* RKWorkplace::getNamedWindow (const QString& id) {
 		}
 	}
 
-	return 0;
+	return nullptr;
 }
 
 void RKWorkplace::namedWindowDestroyed (QObject* window) {
@@ -390,7 +390,7 @@ void RKWorkplace::namedWindowDestroyed (QObject* window) {
 				named_windows.removeAt (i);
 				return;
 			} else {
-				named_windows[i].window = 0;
+				named_windows[i].window = nullptr;
 			}
 		}
 	}
@@ -486,7 +486,7 @@ RKMDIWindow* RKWorkplace::openHelpWindow (const QUrl &url, bool only_once) {
 
 	if (url.isEmpty ()) {
 		RK_ASSERT (false);
-		return 0;
+		return nullptr;
 	}
 
 	if (only_once) {
@@ -603,7 +603,7 @@ bool RKWorkplace::canEditObject (RObject *object) {
 RKEditor* RKWorkplace::editNewDataFrame (const QString &name) {
 	RK_TRACE (APP);
 
-	RKEditorDataFrame* ed = new RKEditorDataFrame (name, 0);
+	RKEditorDataFrame* ed = new RKEditorDataFrame(name, nullptr);
 	addWindow (ed);
 	ed->activate ();
 
@@ -619,12 +619,12 @@ RKEditor *RKWorkplace::editObject (RObject *object) {
 		if (iobj->isVariable () && iobj->parentObject ()->isDataFrame ()) {
 			iobj = iobj->parentObject ();
 		} else {
-			return 0;
+			return nullptr;
 		}
 	}
 
 	bool activate = window_style_override != "preview";
-	RKEditor *ed = 0;
+	RKEditor *ed = nullptr;
 	QList<RKEditor*> existing_editors = object->editors ();
 	RKMDIWindow *nw = getNamedWindow(window_name_override);
 	for (int i = 0; i < existing_editors.size (); ++i) {
@@ -646,11 +646,11 @@ RKEditor *RKWorkplace::editObject (RObject *object) {
 		}
 		if ((RKSettingsModuleGeneral::warnLargeObjectThreshold () != 0) && (size > RKSettingsModuleGeneral::warnLargeObjectThreshold ())) {
 			if (KMessageBox::warningContinueCancel (view (), i18n ("You are about to edit object \"%1\", which is very large (%2 fields). RKWard is not optimized to handle very large objects in the built in data editor. This will use a lot of memory, and - depending on your system - might be very slow. For large objects it is generally recommended to edit using command line means or to split into smaller chunks before editing. On the other hand, if you have enough memory, or the data is simple enough (numeric data is easier to handle, than factor), editing may not be a problem at all. You can configure this warning (or turn it off entirely) under Settings->Configure RKWard->General.\nReally edit object?", iobj->getFullName (), size), i18n ("About to edit very large object")) != KMessageBox::Continue) {
-				return 0;
+				return nullptr;
 			}
 		}
 
-		ed = new RKEditorDataFrame (static_cast<RContainerObject*> (iobj), 0);
+		ed = new RKEditorDataFrame(static_cast<RContainerObject*>(iobj), nullptr);
 		addWindow (ed);
 	}
 
@@ -747,7 +747,7 @@ void RKWorkplace::removeWindow (QObject *object) {
 void RKWorkplace::windowRemoved () {
 	RK_TRACE (APP);
 
-	if (activeWindow (RKMDIWindow::AnyWindowState) != 0) return;	// some RKMDIWindow is already active
+	if (activeWindow (RKMDIWindow::AnyWindowState) != nullptr) return;	// some RKMDIWindow is already active
 	QWidget *appWin = QApplication::activeWindow ();
 	if (appWin && appWin != RKWardMainWindow::getMain () && !qobject_cast<DetachedWindowContainer*> (appWin)) return; // a dialog window or the like is active
 
@@ -940,7 +940,7 @@ RKMDIWindow* restoreDocumentWindowInternal (RKWorkplace* wp, const ItemSpecifica
 bool RKWorkplace::restoreDocumentWindow (const QString &description, const QString &base) {
 	RK_TRACE (APP);
 
-	return (restoreDocumentWindowInternal (this, parseItemDescription (description), base) != 0);
+	return (restoreDocumentWindowInternal(this, parseItemDescription(description), base) != nullptr);
 }
 
 QStringList RKWorkplace::makeWorkplaceDescription () {
@@ -997,7 +997,7 @@ void RKWorkplace::restoreWorkplace (const QStringList &description) {
 	QString base;
 	for (int i = 0; i < description.size (); ++i) {
 		ItemSpecification spec = parseItemDescription (description[i]);
-		RKMDIWindow *win = 0;
+		RKMDIWindow *win = nullptr;
 		if (spec.type == "base") {
 			RK_ASSERT (i == 0);
 			base = spec.specification;
@@ -1061,7 +1061,7 @@ void RKWorkplace::splitAndAttachWindow (RKMDIWindow* source) {
 
 class RKMDIWindowHistoryWidget : public QListWidget {
 public:
-	RKMDIWindowHistoryWidget () : QListWidget (0) {
+	RKMDIWindowHistoryWidget() : QListWidget(nullptr) {
 		RK_TRACE (APP);
 
 		current = 0;
@@ -1148,7 +1148,7 @@ private:
 RKMDIWindowHistory::RKMDIWindowHistory (QObject *parent) : QObject (parent) {
 	RK_TRACE (APP);
 
-	switcher = 0;
+	switcher = nullptr;
 }
 
 RKMDIWindowHistory::~RKMDIWindowHistory () {
@@ -1192,7 +1192,7 @@ RKMDIWindow* RKMDIWindowHistory::previousDocumentWindow () {
 	for (int i = recent_windows.count () - 1; i >= 0; --i) {
 		if (!recent_windows[i]->isToolWindow ()) return (recent_windows[i]);
 	}
-	return 0;
+	return nullptr;
 }
 
 void RKMDIWindowHistory::updateSwitcher () {
@@ -1236,7 +1236,7 @@ void RKMDIWindowHistory::switcherDestroyed () {
 	RK_TRACE (APP);
 
 	RK_ASSERT (switcher);
-	switcher = 0;
+	switcher = nullptr;
 }
 
 void RKMDIWindowHistory::popLastWindow (RKMDIWindow* match) {
diff --git a/rkward/windows/rkworkplace.h b/rkward/windows/rkworkplace.h
index b75b6b929..0ef04f76a 100644
--- a/rkward/windows/rkworkplace.h
+++ b/rkward/windows/rkworkplace.h
@@ -174,11 +174,11 @@ public:
 /** Write a description of all current windows to the R backend. This can later be read by restoreWorkplace (). Has no effect, if RKSettingsModuleGeneral::workplaceSaveMode () != RKSettingsModuleGeneral::SaveWorkplaceWithWorkspace
 @param url the url to use. Can be left null, in which case the current workspace url will be used.
 @param chain command chain to place the command in */
-	void saveWorkplace (const QUrl &for_url=QUrl(), RCommandChain *chain=0);
+	void saveWorkplace (const QUrl &for_url=QUrl(), RCommandChain *chain=nullptr);
 /** Load a description of windows from the R backend (created by saveWorkplace ()), and (try to) restore all windows accordingly
 Has no effect, if RKSettingsModuleGeneral::workplaceSaveMode () != RKSettingsModuleGeneral::SaveWorkplaceWithWorkspace
 @param chain command chain to place the command in */
-	void restoreWorkplace (RCommandChain *chain=0, bool merge=false);
+	void restoreWorkplace (RCommandChain *chain=nullptr, bool merge=false);
 /** Like the other restoreWorkplace (), but takes the description as a parameter rather than reading from the R workspace. To be used, when RKSettingsModuleGeneral::workplaceSaveMode () == RKSettingsModuleGeneral::SaveWorkplaceWithSeesion
 @param description workplace description */
 	void restoreWorkplace (const QStringList &description);
@@ -199,7 +199,7 @@ Has no effect, if RKSettingsModuleGeneral::workplaceSaveMode () != RKSettingsMod
 	KConfigBase *workspaceConfig ();
 	QString portableUrl (const QUrl &url);
 /** Register a named area where to place MDI windows. For directing preview windows to a specific location. */
-	void registerNamedWindow (const QString& id, QObject *owner, QWidget* parent, RKMDIWindow *window=0);
+	void registerNamedWindow (const QString& id, QObject *owner, QWidget* parent, RKMDIWindow *window=nullptr);
 /** Return the window in the specified named area (can be 0). */
 	RKMDIWindow *getNamedWindow (const QString& id);
 /** Make the next window to be created appear in a specific location (can be a named window). 
diff --git a/rkward/windows/rkworkplaceview.cpp b/rkward/windows/rkworkplaceview.cpp
index 3960d7462..bf1bb5089 100644
--- a/rkward/windows/rkworkplaceview.cpp
+++ b/rkward/windows/rkworkplaceview.cpp
@@ -203,7 +203,7 @@ RKWorkplaceViewPane* RKWorkplaceView::createPane (bool init_actions) {
 RKWorkplaceView::RKWorkplaceView (QWidget *parent) : QSplitter (parent) {
 	RK_TRACE (APP);
 
-	newpane = 0;
+	newpane = nullptr;
 	RKWorkplaceViewPane *pane = createPane (false);
 	addWidget (pane);
 	panes.append (pane);
@@ -388,7 +388,7 @@ void RKWorkplaceView::splitView (Qt::Orientation orientation, const QString &des
 	if (!RKWorkplace::mainWorkplace ()->restoreDocumentWindow (_description, base)) {
 		RKWorkplace::mainWorkplace ()->openHelpWindow (QUrl ("rkward://page/rkward_split_views"));
 	}
-	newpane = 0;
+	newpane = nullptr;
 
 	splitter->setSizes (sizes);
 	setUpdatesEnabled (true);
@@ -424,11 +424,11 @@ RKWorkplaceViewPane* RKWorkplaceView::findWindow (RKMDIWindow *widget) const {
 	for (int i = 0; i < panes.size (); ++i) {
 		if (panes[i]->indexOf (widget) > -1) return panes[i];
 	}
-	return 0;
+	return nullptr;
 }
 
 bool RKWorkplaceView::hasWindow (RKMDIWindow *widget) const {
-	return (findWindow (widget) != 0);
+	return (findWindow (widget) != nullptr);
 }
 
 bool RKWorkplaceView::windowInActivePane (RKMDIWindow *widget) const {
@@ -453,9 +453,9 @@ void RKWorkplaceView::purgePane (RKWorkplaceViewPane* pane) {
 	if (panes.count () < 2) return;  // keep at least one pane around for layout purposes
 
 	QSplitter* split = static_cast<QSplitter*> (pane->parentWidget ());
-	pane->hide ();
-	pane->setParent (0); // TODO: needed?
-	pane->deleteLater ();
+	pane->hide();
+	pane->setParent(nullptr); // TODO: needed?
+	pane->deleteLater();
 	while (split != this && split->count () < 1) {
 		QSplitter* p = static_cast<QSplitter*> (split->parentWidget ());
 		delete (split);
@@ -508,8 +508,8 @@ void RKWorkplaceView::restoreLayout(const QString& desc) {
 			RKMDIWindow *win = static_cast<RKMDIWindow*> (panes[i]->widget (0));
 			panes[i]->removeTab (0);
 			windows_to_readd.append (win);
-			win->hide ();
-			win->setParent (0);
+			win->hide();
+			win->setParent(nullptr);
 		}
 	}
 	while (count ()) {
@@ -581,7 +581,7 @@ void RKWorkplaceView::nextPane () {
 void RKWorkplaceView::purgeEmptyPanes () {
 	RK_TRACE (APP);
 
-	newpane = 0; // just in case of broken specifications during workplace restoration
+	newpane = nullptr; // just in case of broken specifications during workplace restoration
 	for (int i = 0; i < panes.count (); ++i) {
 		if (panes.count() > 1 && panes[i]->count() < 1) {
 			purgePane (panes[i]);
diff --git a/rkward/windows/robjectbrowser.cpp b/rkward/windows/robjectbrowser.cpp
index 87305f401..7e14b3a2e 100644
--- a/rkward/windows/robjectbrowser.cpp
+++ b/rkward/windows/robjectbrowser.cpp
@@ -35,12 +35,12 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include "../debug.h"
 
 // static
-RObjectBrowser* RObjectBrowser::object_browser = 0;
+RObjectBrowser* RObjectBrowser::object_browser = nullptr;
 
 RObjectBrowser::RObjectBrowser (QWidget *parent, bool tool_window, const char *name) : RKMDIWindow (parent, WorkspaceBrowserWindow, tool_window, name) {
 	RK_TRACE (APP);
 
-	internal = 0;
+	internal = nullptr;
 	locked = true;
 
 	QVBoxLayout *layout = new QVBoxLayout (this);
@@ -159,7 +159,7 @@ void RObjectBrowserInternal::focusInEvent (QFocusEvent *e) {
 
 void RObjectBrowserInternal::updateButtonClicked () {
 	RK_TRACE (APP);
-	RObjectList::getObjectList ()->updateFromR (0);
+	RObjectList::getObjectList()->updateFromR(nullptr);
 }
 
 void RObjectBrowserInternal::currentHelpContext (QString* symbol, QString* package) {
diff --git a/rkward/windows/robjectbrowser.h b/rkward/windows/robjectbrowser.h
index eb88bc77f..d418372df 100644
--- a/rkward/windows/robjectbrowser.h
+++ b/rkward/windows/robjectbrowser.h
@@ -29,8 +29,8 @@ Note: Most actual functionality is realized in RObjectBrowserInternal, which is
 */
 class RObjectBrowser : public RKMDIWindow {
 public:
-	RObjectBrowser (QWidget *parent, bool tool_window, const char *name=0);
-	~RObjectBrowser ();
+	RObjectBrowser(QWidget *parent, bool tool_window, const char *name=nullptr);
+	~RObjectBrowser();
 	void unlock ();
 	static RObjectBrowser *mainBrowser () { return object_browser; };
 /** reimplemented to create the real file browser widget only when the file browser is shown for the first time */



More information about the rkward-tracker mailing list