[education/rkward] /: Merge ktexteditor settings into main settings dialog

Thomas Friedrichsmeier null at kde.org
Sat Mar 12 23:15:38 GMT 2022


Git commit 1721ccee6bfa477e338543c3bfc8fd63294ed590 by Thomas Friedrichsmeier.
Committed on 12/03/2022 at 23:14.
Pushed by tfry into branch 'master'.

Merge ktexteditor settings into main settings dialog

M  +3    -5    ChangeLog
M  +15   -5    rkward/settings/rksettings.cpp
M  +3    -3    rkward/settings/rksettings.h
M  +4    -1    rkward/settings/rksettingsmodule.h
M  +46   -3    rkward/settings/rksettingsmodulecommandeditor.cpp
M  +18   -1    rkward/settings/rksettingsmodulecommandeditor.h
M  +3    -3    rkward/settings/rksettingsmoduleconsole.cpp
M  +1    -1    rkward/settings/rksettingsmoduleconsole.h
M  +3    -3    rkward/settings/rksettingsmoduledebug.cpp
M  +1    -1    rkward/settings/rksettingsmoduledebug.h
M  +3    -3    rkward/settings/rksettingsmodulegeneral.cpp
M  +1    -1    rkward/settings/rksettingsmodulegeneral.h
M  +3    -3    rkward/settings/rksettingsmodulegraphics.cpp
M  +1    -1    rkward/settings/rksettingsmodulegraphics.h
M  +1    -1    rkward/settings/rksettingsmodulekateplugins.cpp
M  +1    -1    rkward/settings/rksettingsmodulekateplugins.h
M  +3    -3    rkward/settings/rksettingsmoduleobjectbrowser.cpp
M  +1    -1    rkward/settings/rksettingsmoduleobjectbrowser.h
M  +3    -3    rkward/settings/rksettingsmoduleoutput.cpp
M  +1    -1    rkward/settings/rksettingsmoduleoutput.h
M  +3    -3    rkward/settings/rksettingsmoduleplugins.cpp
M  +1    -1    rkward/settings/rksettingsmoduleplugins.h
M  +6    -6    rkward/settings/rksettingsmoduler.cpp
M  +2    -2    rkward/settings/rksettingsmoduler.h
M  +3    -3    rkward/settings/rksettingsmodulewatch.cpp
M  +1    -1    rkward/settings/rksettingsmodulewatch.h
M  +1    -1    rkward/windows/rkcommandeditorwindow.cpp

https://invent.kde.org/education/rkward/commit/1721ccee6bfa477e338543c3bfc8fd63294ed590

diff --git a/ChangeLog b/ChangeLog
index 235dff44..6c97a9b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,11 +2,9 @@ TODOS for autotests:
   - Check and update the standards files
   - Use options(warn=1), in order to get warnings into the test?
 
-TODOS for output directories:
-  - setting, when opening workspace with no attached active output file:
-    - create new empty file
-    - open "default.rko" <- default setting?
-
+- Merge ktexteditor (script) settings into the main settings dialog
+- Internal: Code cleanup around settings
+- Output file handling has been reworked, entirely
 - Fixed: Cursor navigation in completion list
 - rkwardtests library gains helper functions for checking for expected errors
 - Internal: Allow R-level calls to support both subcommands, and a return value at the same time
diff --git a/rkward/settings/rksettings.cpp b/rkward/settings/rksettings.cpp
index c4f81177..b8473c06 100644
--- a/rkward/settings/rksettings.cpp
+++ b/rkward/settings/rksettings.cpp
@@ -91,13 +91,12 @@ void RKSettings::dialogClosed () {
 	settings_dialog = 0;
 }
 
-RKSettings::RKSettings (QWidget *parent) : KPageDialog (parent) {
+RKSettings::RKSettings (QWidget *parent) : KPageDialog (parent), pages(nullptr) {
 	RK_TRACE (SETTINGS);
 
 	setFaceType (KPageDialog::Tree);
 	setWindowTitle (i18n ("Settings"));
 	buttonBox ()->setStandardButtons (QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Cancel | QDialogButtonBox::Help);
-	// KF5 TODO: connect buttons
 	button (QDialogButtonBox::Apply)->setEnabled (false);
 	connect (button(QDialogButtonBox::Apply), &QPushButton::clicked, this, &RKSettings::applyAll);
 	connect (button(QDialogButtonBox::Help), &QPushButton::clicked, this, &RKSettings::helpClicked);
@@ -118,11 +117,12 @@ RKSettings::~RKSettings() {
 		delete *it;
 	}
 	modules.clear ();
-	
+	delete pages;
+
 	dialogClosed ();
 }
 
-void RKSettings::registerPageModule(RKSettings::SettingsPage super, RKSettings::SettingsPage child) {
+void RKSettings::registerPageModule(RKSettings::SettingsPage super, int child) {
 	RK_TRACE (SETTINGS);
 
 	RKSettingsModule *childm = modules[child];
@@ -131,6 +131,8 @@ void RKSettings::registerPageModule(RKSettings::SettingsPage super, RKSettings::
 	} else {
 		pages[child] = addSubPage(pages[super], childm, childm->caption());
 	}
+	pages[child]->setHeader(childm->longCaption());
+	pages[child]->setIcon(childm->icon());
 }
 
 #include <QLabel>
@@ -138,6 +140,8 @@ void RKSettings::registerPageModule(RKSettings::SettingsPage super, RKSettings::
 void RKSettings::initModules () {
 	RK_TRACE (SETTINGS);
 
+	auto ktexteditorpages = RKSettingsModuleCommandEditor::kateConfigPages(this, 0);
+	pages = new KPageWidgetItem*[(NumPages + ktexteditorpages.size())];
 	modules.insert (PagePlugins, new RKSettingsModulePlugins (this, 0));
 	modules.insert (PageKatePlugins, new RKSettingsModuleKatePlugins (this, 0));
 	modules.insert (PageR, new RKSettingsModuleR (this, 0));
@@ -150,6 +154,9 @@ void RKSettings::initModules () {
 	modules.insert (PageCommandEditor, new RKSettingsModuleCommandEditor (this, 0));
 	modules.insert (PageObjectBrowser, new RKSettingsModuleObjectBrowser (this, 0));
 	modules.insert (PageDebug, new RKSettingsModuleDebug (this, 0));
+	for (int i = 0; i < ktexteditorpages.size(); ++i) {
+		modules.insert(NumPages+i, ktexteditorpages[i]);
+	}
 
 	QLabel *l = new QLabel(i18n("<h1>Add-ons</h1><p>RKWard add-ons come in a variety of forms, each with their own configuration options:</p><h2>R packages</h2><p><a href=\"rkward://settings/rpackages\">Add-ons to the R language itself</a>. These are usually downloaded from \"CRAN\". Some of these add-on packages may additionally contain RKWard plugins.</p><h2>RKWard plugins</h2><p><a href=\"rkward://settings/plugins\">Graphical dialogs to R functionality</a>. These plugins are usually pre-installed with RKWard, or with an R package. However, they can be activated/deactivated to help keep the menus manageable. Note that it is relatively easy to <a href=\"https://api.kde.org/doc/rkwardplugins/\">create your own custom dialogs as plugins</a>!</p><h2>Kate plugins</h2><p><a href=\"rkward://settings/kateplugins\">Plugins developed for Kate / KTextEditor</a>. These provide shared functionality that is useful in the context of text editing and IDE applications. These plugins are usually found pre-installed on your system. You can configure to load the plugins that are useful to your own workflow.</p>"));
 	l->setWordWrap(true);
@@ -167,6 +174,9 @@ void RKSettings::initModules () {
 	registerPageModule(NoPage, PageCommandEditor);
 	registerPageModule(NoPage, PageObjectBrowser);
 	registerPageModule(NoPage, PageDebug);
+	for (int i = 0; i < ktexteditorpages.size(); ++i) {
+		registerPageModule(PageCommandEditor, NumPages+i);
+	}
 }
 
 void RKSettings::raisePage (SettingsPage page) {
@@ -217,7 +227,7 @@ void RKSettings::applyAll() {
 		if (it.value()->hasChanges()) {
 			it.value()->doApply();
 			it.value()->save(KSharedConfig::openConfig().data());
-			tracker()->signalSettingsChange(it.key());
+			tracker()->signalSettingsChange(RKSettings::SettingsPage(it.key()));
 		}
 	}
 	button(QDialogButtonBox::Apply)->setEnabled(false);
diff --git a/rkward/settings/rksettings.h b/rkward/settings/rksettings.h
index 7c570184..455bda6d 100644
--- a/rkward/settings/rksettings.h
+++ b/rkward/settings/rksettings.h
@@ -80,15 +80,15 @@ private:
 	void raisePage (SettingsPage page);
 	static void dialogClosed ();
 
-	typedef QMap<SettingsPage, RKSettingsModule *> ModuleMap;
+	typedef QMap<int, RKSettingsModule *> ModuleMap;
 	ModuleMap modules;
-	KPageWidgetItem *pages[NumPages];
+	KPageWidgetItem** pages;
 
 	static RKSettings *settings_dialog;
 friend class RKWardMainWindow;
 	static RKSettingsTracker *settings_tracker;
 
-	void registerPageModule(SettingsPage super, SettingsPage child);
+	void registerPageModule(SettingsPage super, int child);
 };
 
 /** This class represents a very simple QObject. It's only purpose is to emit signals when certain settings have changed. Classes that need to
diff --git a/rkward/settings/rksettingsmodule.h b/rkward/settings/rksettingsmodule.h
index e9a98b6c..fce49500 100644
--- a/rkward/settings/rksettingsmodule.h
+++ b/rkward/settings/rksettingsmodule.h
@@ -20,6 +20,7 @@
 #include <qstring.h>
 #include <qwidget.h>
 #include <QUrl>
+#include <QIcon>
 #include <KConfigGroup>
 
 class KConfig;
@@ -164,7 +165,9 @@ public:
 
 	virtual void save (KConfig *config) = 0;
 	
-	virtual QString caption () = 0;
+	virtual QString caption() const = 0;
+	virtual QString longCaption() const { return caption(); };
+	virtual QIcon icon() const { return QIcon(); };
 /** Some settings modules execute R commands on "apply". If an RCommandChain is specified for the RKSettings-dialog, those commands should
 be inserted into this chain. It's safe to use this unconditionally, as if there is no chain, this will return 0, which corresponds to using the top-level chain */
 	RCommandChain *commandChain () { return chain; };
diff --git a/rkward/settings/rksettingsmodulecommandeditor.cpp b/rkward/settings/rksettingsmodulecommandeditor.cpp
index 271b62a7..ace9d770 100644
--- a/rkward/settings/rksettingsmodulecommandeditor.cpp
+++ b/rkward/settings/rksettingsmodulecommandeditor.cpp
@@ -19,6 +19,8 @@
 #include <KLocalizedString>
 #include <kconfig.h>
 #include <kconfiggroup.h>
+#include <KTextEditor/Editor>
+#include <KTextEditor/ConfigPage>
 
 #include <QLabel>
 #include <QVBoxLayout>
@@ -164,9 +166,9 @@ RKSettingsModuleCommandEditor::~RKSettingsModuleCommandEditor () {
 	RK_TRACE (SETTINGS);
 }
 
-QString RKSettingsModuleCommandEditor::caption () {
-	RK_TRACE (SETTINGS);
-	return (i18n ("Script editor"));
+QString RKSettingsModuleCommandEditor::caption() const {
+	RK_TRACE(SETTINGS);
+	return(i18n("Script editor"));
 }
 
 void RKSettingsModuleCommandEditor::applyChanges () {
@@ -213,3 +215,44 @@ bool RKSettingsModuleCommandEditor::matchesScriptFileFilter (const QString &file
 	return false;
 }
 
+
+QList<RKSettingsModuleKTextEditorConfigWrapper *> RKSettingsModuleCommandEditor::kateConfigPages(RKSettings* gui, QWidget* parent) {
+	RK_TRACE(SETTINGS);
+
+	QList<RKSettingsModuleKTextEditorConfigWrapper *> ret;
+	auto ed = KTextEditor::Editor::instance();
+	int n = ed->configPages();
+	for (int i = 0; i < n; ++i) {
+		ret.append(new RKSettingsModuleKTextEditorConfigWrapper(gui, parent, ed->configPage(i, parent)));
+	}
+	return ret;
+}
+
+
+RKSettingsModuleKTextEditorConfigWrapper::RKSettingsModuleKTextEditorConfigWrapper(RKSettings* gui, QWidget* parent, KTextEditor::ConfigPage* wrapped) : RKSettingsModule(gui, parent), page(wrapped) {
+	RK_TRACE(SETTINGS);
+	auto vbox = new QVBoxLayout(this);
+	vbox->setContentsMargins(0,0,0,0);
+	vbox->addWidget(wrapped);
+	connect(wrapped, &KTextEditor::ConfigPage::changed, this, &RKSettingsModuleKTextEditorConfigWrapper::change);
+}
+
+RKSettingsModuleKTextEditorConfigWrapper::~RKSettingsModuleKTextEditorConfigWrapper() {
+	RK_TRACE(SETTINGS);
+}
+
+void RKSettingsModuleKTextEditorConfigWrapper::applyChanges() {
+	page->apply();
+}
+
+QString RKSettingsModuleKTextEditorConfigWrapper::caption() const {
+	return page->name();
+}
+
+QString RKSettingsModuleKTextEditorConfigWrapper::longCaption() const {
+	return page->fullName();
+}
+
+QIcon RKSettingsModuleKTextEditorConfigWrapper::icon() const {
+	return page->icon();
+}
diff --git a/rkward/settings/rksettingsmodulecommandeditor.h b/rkward/settings/rksettingsmodulecommandeditor.h
index 63bb77e8..48f9395d 100644
--- a/rkward/settings/rksettingsmodulecommandeditor.h
+++ b/rkward/settings/rksettingsmodulecommandeditor.h
@@ -25,6 +25,7 @@ class QLineEdit;
 class QGroupBox;
 class QComboBox;
 class QGridLayout;
+namespace KTextEditor { class ConfigPage; }
 
 class RKCodeCompletionSettingsWidget;
 class RKCodeCompletionSettings {
@@ -83,6 +84,20 @@ private:
 	bool show_common;
 };
 
+class RKSettingsModuleKTextEditorConfigWrapper : public RKSettingsModule {
+public:
+	RKSettingsModuleKTextEditorConfigWrapper(RKSettings* gui, QWidget* parent, KTextEditor::ConfigPage* wrapped);
+	~RKSettingsModuleKTextEditorConfigWrapper();
+	void applyChanges() override;
+	void save(KConfig *) override { };
+	static void validateSettingsInteractive(QList<RKSetupWizardItem*>*) {};
+	QString caption() const override;
+	QString longCaption() const override;
+	QIcon icon() const override;
+private:
+	KTextEditor::ConfigPage* page;
+};
+
 /**
 configuration for the Command Editor windows
 
@@ -99,7 +114,7 @@ public:
 	static void syncConfig(KConfig *config, RKConfigBase::ConfigSyncAction);
 	static void validateSettingsInteractive (QList<RKSetupWizardItem*>*) {};
 
-	QString caption () override;
+	QString caption() const override;
 
 	static const RKCodeCompletionSettings* completionSettings() { return &completion_settings; };
 
@@ -111,6 +126,8 @@ public:
 	static int maxNumRecentFiles () { return num_recent_files; };
 	static QString scriptFileFilter () { return script_file_filter; };
 	static bool matchesScriptFileFilter (const QString &filename);
+
+	static QList<RKSettingsModuleKTextEditorConfigWrapper*> kateConfigPages(RKSettings* gui, QWidget* parent);
 private:
 	static RKCodeCompletionSettings completion_settings;
 	static RKConfigValue<bool> autosave_enabled;
diff --git a/rkward/settings/rksettingsmoduleconsole.cpp b/rkward/settings/rksettingsmoduleconsole.cpp
index e97e17ae..53e38d5b 100644
--- a/rkward/settings/rksettingsmoduleconsole.cpp
+++ b/rkward/settings/rksettingsmoduleconsole.cpp
@@ -133,9 +133,9 @@ void RKSettingsModuleConsole::applyChanges () {
 	completion_settings_widget->applyChanges();
 }
 	
-QString RKSettingsModuleConsole::caption () {
-	RK_TRACE (SETTINGS);
+QString RKSettingsModuleConsole::caption() const {
+	RK_TRACE(SETTINGS);
 
-	return (i18n ("Console"));
+	return(i18n("Console"));
 }
 
diff --git a/rkward/settings/rksettingsmoduleconsole.h b/rkward/settings/rksettingsmoduleconsole.h
index 70db82b8..032471d4 100644
--- a/rkward/settings/rksettingsmoduleconsole.h
+++ b/rkward/settings/rksettingsmoduleconsole.h
@@ -60,7 +60,7 @@ public:
 	static QStringList loadCommandHistory ();
 	static void saveCommandHistory (const QStringList &list);
 
-	QString caption () override;
+	QString caption() const override;
 
 	QUrl helpURL () override { return QUrl ("rkward://page/rkward_console#settings"); };
 private:
diff --git a/rkward/settings/rksettingsmoduledebug.cpp b/rkward/settings/rksettingsmoduledebug.cpp
index 03d625e1..6c59b1c6 100644
--- a/rkward/settings/rksettingsmoduledebug.cpp
+++ b/rkward/settings/rksettingsmoduledebug.cpp
@@ -103,9 +103,9 @@ void RKSettingsModuleDebug::settingChanged (int) {
 	change ();
 }
 
-QString RKSettingsModuleDebug::caption () {
-	RK_TRACE (SETTINGS);
-	return (i18n ("Debug"));
+QString RKSettingsModuleDebug::caption() const {
+	RK_TRACE(SETTINGS);
+	return(i18n("Debug"));
 }
 
 void RKSettingsModuleDebug::applyChanges () {
diff --git a/rkward/settings/rksettingsmoduledebug.h b/rkward/settings/rksettingsmoduledebug.h
index 377d2b18..ee77403e 100644
--- a/rkward/settings/rksettingsmoduledebug.h
+++ b/rkward/settings/rksettingsmoduledebug.h
@@ -39,7 +39,7 @@ public:
 	static void syncConfig(KConfig *config, RKConfigBase::ConfigSyncAction a);
 	static void validateSettingsInteractive (QList<RKSetupWizardItem*>*) {};
 
-	QString caption () override;
+	QString caption() const override;
 
 	// static members are declared in debug.h and defined in main.cpp
 public slots:
diff --git a/rkward/settings/rksettingsmodulegeneral.cpp b/rkward/settings/rksettingsmodulegeneral.cpp
index 2a03d2b5..7bda5334 100644
--- a/rkward/settings/rksettingsmodulegeneral.cpp
+++ b/rkward/settings/rksettingsmodulegeneral.cpp
@@ -172,9 +172,9 @@ void RKSettingsModuleGeneral::updateLastUsedUrl (const QString& thing, const QUr
 	}
 }
 
-QString RKSettingsModuleGeneral::caption () {
-	RK_TRACE (SETTINGS);
-	return (i18n ("General"));
+QString RKSettingsModuleGeneral::caption() const {
+	RK_TRACE(SETTINGS);
+	return(i18n("General"));
 }
 
 void RKSettingsModuleGeneral::applyChanges () {
diff --git a/rkward/settings/rksettingsmodulegeneral.h b/rkward/settings/rksettingsmodulegeneral.h
index 06d2258f..3ccd1b1d 100644
--- a/rkward/settings/rksettingsmodulegeneral.h
+++ b/rkward/settings/rksettingsmodulegeneral.h
@@ -58,7 +58,7 @@ public:
 	static void syncConfig(KConfig *config, RKConfigBase::ConfigSyncAction a);
 	static void validateSettingsInteractive (QList<RKSetupWizardItem*>*) {};
 
-	QString caption () override;
+	QString caption() const override;
 
 /// returns the directory-name where the logfiles should reside
 	static QString &filesPath () { return files_path; };
diff --git a/rkward/settings/rksettingsmodulegraphics.cpp b/rkward/settings/rksettingsmodulegraphics.cpp
index 028a9631..d3c2a7ab 100644
--- a/rkward/settings/rksettingsmodulegraphics.cpp
+++ b/rkward/settings/rksettingsmodulegraphics.cpp
@@ -158,9 +158,9 @@ void RKSettingsModuleGraphics::boxChanged () {
 	change ();
 }
 
-QString RKSettingsModuleGraphics::caption () {
-	RK_TRACE (SETTINGS);
-	return (i18n ("Onscreen Graphics"));
+QString RKSettingsModuleGraphics::caption() const {
+	RK_TRACE(SETTINGS);
+	return(i18n("Onscreen Graphics"));
 }
 
 void RKSettingsModuleGraphics::applyChanges () {
diff --git a/rkward/settings/rksettingsmodulegraphics.h b/rkward/settings/rksettingsmodulegraphics.h
index 9425c2af..c56bb1a0 100644
--- a/rkward/settings/rksettingsmodulegraphics.h
+++ b/rkward/settings/rksettingsmodulegraphics.h
@@ -49,7 +49,7 @@ public:
 	static void syncConfig(KConfig *config, RKConfigBase::ConfigSyncAction a);
 	static void validateSettingsInteractive (QList<RKSetupWizardItem*>*) {};
 
-	QString caption () override;
+	QString caption() const override;
 	QUrl helpURL () override { return QUrl ("rkward://page/rkward_plot_history#scd_settings"); };
 
 	enum DefaultDevice {
diff --git a/rkward/settings/rksettingsmodulekateplugins.cpp b/rkward/settings/rksettingsmodulekateplugins.cpp
index 5a0e3d44..e22e1a25 100644
--- a/rkward/settings/rksettingsmodulekateplugins.cpp
+++ b/rkward/settings/rksettingsmodulekateplugins.cpp
@@ -99,7 +99,7 @@ void RKSettingsModuleKatePlugins::syncConfig(KConfig *config, RKConfigBase::Conf
 	plugins_to_load.syncConfig(cg, a);
 }
 
-QString RKSettingsModuleKatePlugins::caption() {
+QString RKSettingsModuleKatePlugins::caption() const {
 	RK_TRACE(SETTINGS);
 
 	return i18n("Kate Plugins");
diff --git a/rkward/settings/rksettingsmodulekateplugins.h b/rkward/settings/rksettingsmodulekateplugins.h
index e8609b97..cdf17503 100644
--- a/rkward/settings/rksettingsmodulekateplugins.h
+++ b/rkward/settings/rksettingsmodulekateplugins.h
@@ -36,7 +36,7 @@ public:
 	static void syncConfig(KConfig *config, RKConfigBase::ConfigSyncAction a);
 	static void validateSettingsInteractive(QList<RKSetupWizardItem*>*) {};
 
-	QString caption() override;
+	QString caption() const override;
 
 	static QStringList pluginsToLoad() { return plugins_to_load; };
 private:
diff --git a/rkward/settings/rksettingsmoduleobjectbrowser.cpp b/rkward/settings/rksettingsmoduleobjectbrowser.cpp
index d8fbee94..ce3111c6 100644
--- a/rkward/settings/rksettingsmoduleobjectbrowser.cpp
+++ b/rkward/settings/rksettingsmoduleobjectbrowser.cpp
@@ -89,9 +89,9 @@ void RKSettingsModuleObjectBrowser::applyChanges () {
 	getstructure_blacklist = blacklist_choser->getValues();
 }
 
-QString RKSettingsModuleObjectBrowser::caption () {
-	RK_TRACE (SETTINGS);
-	return (i18n ("Workspace"));
+QString RKSettingsModuleObjectBrowser::caption() const {
+	RK_TRACE(SETTINGS);
+	return(i18n("Workspace"));
 }
 
 void writeSettings (KConfigGroup &cg, bool *settings) {
diff --git a/rkward/settings/rksettingsmoduleobjectbrowser.h b/rkward/settings/rksettingsmoduleobjectbrowser.h
index c8bc4de4..8c62e824 100644
--- a/rkward/settings/rksettingsmoduleobjectbrowser.h
+++ b/rkward/settings/rksettingsmoduleobjectbrowser.h
@@ -39,7 +39,7 @@ public:
 	void applyChanges () override;
 
 /** @returns the caption ("Workspace Browser") */
-	QString caption () override;
+	QString caption() const override;
 
 	void save(KConfig *config) override { syncConfig(config, RKConfigBase::SaveConfig); };
 	static void syncConfig(KConfig *config, RKConfigBase::ConfigSyncAction a);
diff --git a/rkward/settings/rksettingsmoduleoutput.cpp b/rkward/settings/rksettingsmoduleoutput.cpp
index 0527b471..cecfa4dc 100644
--- a/rkward/settings/rksettingsmoduleoutput.cpp
+++ b/rkward/settings/rksettingsmoduleoutput.cpp
@@ -189,9 +189,9 @@ void RKSettingsModuleOutput::boxChanged () {
 	graphics_jpg_quality_box->setEnabled (graphics_type_box->itemData (graphics_type_box->currentIndex ()).toString () == "\"JPG\"");
 }
 
-QString RKSettingsModuleOutput::caption () {
-	RK_TRACE (SETTINGS);
-	return (i18n ("Output"));
+QString RKSettingsModuleOutput::caption() const {
+	RK_TRACE(SETTINGS);
+	return(i18n("Output"));
 }
 
 void RKSettingsModuleOutput::applyChanges () {
diff --git a/rkward/settings/rksettingsmoduleoutput.h b/rkward/settings/rksettingsmoduleoutput.h
index 4f8b8c2d..77bbf576 100644
--- a/rkward/settings/rksettingsmoduleoutput.h
+++ b/rkward/settings/rksettingsmoduleoutput.h
@@ -81,7 +81,7 @@ public:
 
 	static void validateSettingsInteractive (QList<RKSetupWizardItem*>*) {};
 
-	QString caption () override;
+	QString caption() const override;
 
 	static bool autoShow () { return auto_show; };
 	static bool autoRaise () { return auto_raise; };
diff --git a/rkward/settings/rksettingsmoduleplugins.cpp b/rkward/settings/rksettingsmoduleplugins.cpp
index ece03306..75a275e5 100644
--- a/rkward/settings/rksettingsmoduleplugins.cpp
+++ b/rkward/settings/rksettingsmoduleplugins.cpp
@@ -97,9 +97,9 @@ void RKSettingsModulePlugins::settingChanged () {
 	change ();
 }
 
-QString RKSettingsModulePlugins::caption () {
-	RK_TRACE (SETTINGS);
-	return (i18n ("RKWard Plugins"));
+QString RKSettingsModulePlugins::caption() const {
+	RK_TRACE(SETTINGS);
+	return(i18n("RKWard Plugins"));
 }
 
 void RKSettingsModulePlugins::applyChanges () {
diff --git a/rkward/settings/rksettingsmoduleplugins.h b/rkward/settings/rksettingsmoduleplugins.h
index 98f2feeb..9360dd1d 100644
--- a/rkward/settings/rksettingsmoduleplugins.h
+++ b/rkward/settings/rksettingsmoduleplugins.h
@@ -46,7 +46,7 @@ public:
 	static void syncConfig(KConfig *config, RKConfigBase::ConfigSyncAction a);
 	static void validateSettingsInteractive (QList<RKSetupWizardItem*>*) {};
 
-	QString caption () override;
+	QString caption() const override;
 
 	/** @returns a list of active plugin maps */
 	static QStringList pluginMaps ();
diff --git a/rkward/settings/rksettingsmoduler.cpp b/rkward/settings/rksettingsmoduler.cpp
index dc38c1ee..f00b7d85 100755
--- a/rkward/settings/rksettingsmoduler.cpp
+++ b/rkward/settings/rksettingsmoduler.cpp
@@ -175,9 +175,9 @@ void RKSettingsModuleR::settingChanged () {
 	change ();
 }
 
-QString RKSettingsModuleR::caption () {
-	RK_TRACE (SETTINGS);
-	return (i18n ("R-Backend"));
+QString RKSettingsModuleR::caption() const {
+	RK_TRACE(SETTINGS);
+	return(i18n("R-Backend"));
 }
 
 void RKSettingsModuleR::applyChanges () {
@@ -435,9 +435,9 @@ void RKSettingsModuleRPackages::addRepository (QStringList *string_list) {
 	if (ok) (*string_list).append (new_string);
 }
 
-QString RKSettingsModuleRPackages::caption () {
-	RK_TRACE (SETTINGS);
-	return (i18n ("R-Packages"));
+QString RKSettingsModuleRPackages::caption() const {
+	RK_TRACE(SETTINGS);
+	return(i18n("R-Packages"));
 }
 
 #define SELECT_CRAN_MIRROR_COMMAND 123
diff --git a/rkward/settings/rksettingsmoduler.h b/rkward/settings/rksettingsmoduler.h
index e668a235..ef926ffb 100644
--- a/rkward/settings/rksettingsmoduler.h
+++ b/rkward/settings/rksettingsmoduler.h
@@ -44,7 +44,7 @@ public:
 	static void syncConfig(KConfig *config, RKConfigBase::ConfigSyncAction a);
 	static void validateSettingsInteractive (QList<RKSetupWizardItem*>*) {};
 
-	QString caption () override;
+	QString caption() const override;
 	
 /** generate the commands needed to set the R run time options */
 	static QStringList makeRRunTimeOptionCommands ();
@@ -119,7 +119,7 @@ public:
 /** returns the list of packages which are essential to rkward. This is hard-coded. */
 	static QStringList essentialPackages () { return essential_packages.split ("\n"); };
 
-	QString caption () override;
+	QString caption() const override;
 public slots:
 	void settingChanged ();
 	void addLibLoc (QStringList *string_list);
diff --git a/rkward/settings/rksettingsmodulewatch.cpp b/rkward/settings/rksettingsmodulewatch.cpp
index 67bcc276..dbbadba3 100644
--- a/rkward/settings/rksettingsmodulewatch.cpp
+++ b/rkward/settings/rksettingsmodulewatch.cpp
@@ -241,9 +241,9 @@ void RKSettingsModuleWatch::applyChanges () {
 	sync_filter = getFilterSettings (sync_filter_boxes);
 }
 	
-QString RKSettingsModuleWatch::caption () {
-	RK_TRACE (SETTINGS);
+QString RKSettingsModuleWatch::caption() const {
+	RK_TRACE(SETTINGS);
 
-	return (i18n ("Command log"));
+	return(i18n("Command log"));
 }
 
diff --git a/rkward/settings/rksettingsmodulewatch.h b/rkward/settings/rksettingsmodulewatch.h
index 6fede98e..cfe939f1 100644
--- a/rkward/settings/rksettingsmodulewatch.h
+++ b/rkward/settings/rksettingsmodulewatch.h
@@ -50,7 +50,7 @@ public:
 
 	static uint maxLogLines () { return max_log_lines; };
 
-	QString caption () override;
+	QString caption() const override;
 public slots:
 	void changedSetting (int);
 private:
diff --git a/rkward/windows/rkcommandeditorwindow.cpp b/rkward/windows/rkcommandeditorwindow.cpp
index c3d7dee1..21111125 100644
--- a/rkward/windows/rkcommandeditorwindow.cpp
+++ b/rkward/windows/rkcommandeditorwindow.cpp
@@ -331,7 +331,7 @@ void RKCommandEditorWindow::fixupPartGUI () {
 	RK_TRACE (COMMANDEDITOR);
 
 	// strip down the katepart's GUI. remove some stuff we definitely don't need.
-	RKCommonFunctions::removeContainers (m_view, QString ("bookmarks,tools_spelling,tools_spelling_from_cursor,tools_spelling_selection,switch_to_cmd_line").split (','), true);
+	RKCommonFunctions::removeContainers (m_view, QString ("bookmarks,tools_spelling,tools_spelling_from_cursor,tools_spelling_selection,switch_to_cmd_line,set_confdlg").split (','), true);
 	RKCommonFunctions::moveContainer (m_view, "Menu", "tools", "edit", true);
 }
 



More information about the rkward-tracker mailing list