[education/rkward] rkward: Integrate config pages for kate plugins into settings dialog
Thomas Friedrichsmeier
null at kde.org
Mon Jul 22 22:34:28 BST 2024
Git commit 1b88dec6e83456dcd8ff103d8d5ecf588eed14c0 by Thomas Friedrichsmeier.
Committed on 22/07/2024 at 21:34.
Pushed by tfry into branch 'master'.
Integrate config pages for kate plugins into settings dialog
M +28 -25 rkward/settings/rksettingsmodulecommandeditor.cpp
M +10 -0 rkward/settings/rksettingsmodulecommandeditor.h
M +1 -1 rkward/settings/rksettingsmoduleconsole.cpp
M +1 -1 rkward/settings/rksettingsmoduleconsole.h
M +1 -1 rkward/settings/rksettingsmoduledebug.cpp
M +1 -1 rkward/settings/rksettingsmoduledebug.h
M +1 -1 rkward/settings/rksettingsmodulegeneral.h
M +1 -1 rkward/settings/rksettingsmodulegraphics.cpp
M +1 -1 rkward/settings/rksettingsmodulegraphics.h
M +15 -4 rkward/settings/rksettingsmodulekateplugins.cpp
M +1 -1 rkward/settings/rksettingsmodulekateplugins.h
M +1 -1 rkward/settings/rksettingsmoduleobjectbrowser.cpp
M +1 -1 rkward/settings/rksettingsmoduleobjectbrowser.h
M +1 -1 rkward/settings/rksettingsmoduleoutput.cpp
M +1 -1 rkward/settings/rksettingsmoduleoutput.h
M +1 -1 rkward/settings/rksettingsmoduleplugins.cpp
M +1 -1 rkward/settings/rksettingsmoduleplugins.h
M +1 -1 rkward/settings/rksettingsmoduler.cpp
M +1 -1 rkward/settings/rksettingsmodulewatch.cpp
M +1 -1 rkward/settings/rksettingsmodulewatch.h
M +11 -2 rkward/windows/katepluginintegration.cpp
M +3 -1 rkward/windows/katepluginintegration.h
https://invent.kde.org/education/rkward/-/commit/1b88dec6e83456dcd8ff103d8d5ecf588eed14c0
diff --git a/rkward/settings/rksettingsmodulecommandeditor.cpp b/rkward/settings/rksettingsmodulecommandeditor.cpp
index c7dd2ee65..755d5aaa4 100644
--- a/rkward/settings/rksettingsmodulecommandeditor.cpp
+++ b/rkward/settings/rksettingsmodulecommandeditor.cpp
@@ -173,30 +173,33 @@ private:
QLineEdit* script_file_filter_box;
};
-class RKTextEditorConfigPageWrapper : public RKSettingsModuleWidget {
-public:
- RKTextEditorConfigPageWrapper(QWidget* parent, RKSettingsModule *parent_module, KTextEditor::ConfigPage* wrapped) :
- RKSettingsModuleWidget(parent, parent_module, QLatin1String(("kate_" + wrapped->name()).toLatin1()), RKSettingsModuleCommandEditor::page_id),
- page(wrapped)
- {
- RK_TRACE(SETTINGS);
- setWindowTitle(page->name());
- setWindowIcon(page->icon());
-
- auto vbox = new QVBoxLayout(this);
- vbox->setContentsMargins(0,0,0,0);
- vbox->addWidget(wrapped);
- connect(wrapped, &KTextEditor::ConfigPage::changed, this, &RKTextEditorConfigPageWrapper::change);
- }
- void applyChanges() override {
- page->apply();
- }
- QString longCaption() const override {
- return page->fullName();
- }
-private:
- KTextEditor::ConfigPage* page;
-};
+RKTextEditorConfigPageWrapper::RKTextEditorConfigPageWrapper(QWidget* parent, RKSettingsModule *parent_module, RKSettingsModule::PageId superpage, KTextEditor::ConfigPage* wrapped) :
+ RKSettingsModuleWidget(parent, parent_module, QLatin1String(("kate_" + wrapped->name()).toLatin1()), superpage),
+ page(wrapped)
+{
+ RK_TRACE(SETTINGS);
+ setWindowTitle(page->name());
+ setWindowIcon(page->icon());
+
+ auto vbox = new QVBoxLayout(this);
+ vbox->setContentsMargins(0,0,0,0);
+ vbox->addWidget(wrapped);
+ connect(wrapped, &KTextEditor::ConfigPage::changed, this, &RKTextEditorConfigPageWrapper::change);
+}
+
+RKTextEditorConfigPageWrapper::~RKTextEditorConfigPageWrapper() {
+ RK_TRACE(SETTINGS);
+ delete page;
+}
+
+void RKTextEditorConfigPageWrapper::applyChanges() {
+ RK_TRACE(SETTINGS);
+ page->apply();
+}
+
+QString RKTextEditorConfigPageWrapper::longCaption() const {
+ return page->fullName();
+}
QList<RKSettingsModuleWidget*> RKSettingsModuleCommandEditor::createPages(QWidget *parent) {
RK_TRACE(SETTINGS);
@@ -205,7 +208,7 @@ QList<RKSettingsModuleWidget*> RKSettingsModuleCommandEditor::createPages(QWidge
auto ed = KTextEditor::Editor::instance();
int n = ed->configPages();
for (int i = 0; i < n; ++i) {
- ret.append(new RKTextEditorConfigPageWrapper(parent, this, ed->configPage(i, parent)));
+ ret.append(new RKTextEditorConfigPageWrapper(parent, this, RKSettingsModuleCommandEditor::page_id, ed->configPage(i, parent)));
}
return ret;
}
diff --git a/rkward/settings/rksettingsmodulecommandeditor.h b/rkward/settings/rksettingsmodulecommandeditor.h
index 44768f199..bcf069e35 100644
--- a/rkward/settings/rksettingsmodulecommandeditor.h
+++ b/rkward/settings/rksettingsmodulecommandeditor.h
@@ -111,4 +111,14 @@ friend class RKSettingsPageCommandEditor;
static RKConfigValue<QString> script_file_filter;
};
+class RKTextEditorConfigPageWrapper : public RKSettingsModuleWidget {
+public:
+ RKTextEditorConfigPageWrapper(QWidget* parent, RKSettingsModule *parent_module, RKSettingsModule::PageId superpage, KTextEditor::ConfigPage* wrapped);
+ ~RKTextEditorConfigPageWrapper() override;
+ void applyChanges() override;
+ QString longCaption() const override;
+private:
+ KTextEditor::ConfigPage* page;
+};
+
#endif
diff --git a/rkward/settings/rksettingsmoduleconsole.cpp b/rkward/settings/rksettingsmoduleconsole.cpp
index 0db57e470..a4dcade14 100644
--- a/rkward/settings/rksettingsmoduleconsole.cpp
+++ b/rkward/settings/rksettingsmoduleconsole.cpp
@@ -1,6 +1,6 @@
/*
rksettingsmoduleconsole - This file is part of RKWard (https://rkward.kde.org). Created: Sun Oct 16 2005
-SPDX-FileCopyrightText: 2005-2022 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2005-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmoduleconsole.h b/rkward/settings/rksettingsmoduleconsole.h
index 602a035a7..f7e311de3 100644
--- a/rkward/settings/rksettingsmoduleconsole.h
+++ b/rkward/settings/rksettingsmoduleconsole.h
@@ -1,6 +1,6 @@
/*
rksettingsmoduleconsole - This file is part of the RKWard project. Created: Sun Oct 16 2005
-SPDX-FileCopyrightText: 2005-2022 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2005-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmoduledebug.cpp b/rkward/settings/rksettingsmoduledebug.cpp
index cea24b7a1..aa7eaf219 100644
--- a/rkward/settings/rksettingsmoduledebug.cpp
+++ b/rkward/settings/rksettingsmoduledebug.cpp
@@ -1,6 +1,6 @@
/*
rksettingsmoduledebug - This file is part of RKWard (https://rkward.kde.org). Created: Tue Oct 23 2007
-SPDX-FileCopyrightText: 2007-2022 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2007-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmoduledebug.h b/rkward/settings/rksettingsmoduledebug.h
index c726e0b0f..c3924940f 100644
--- a/rkward/settings/rksettingsmoduledebug.h
+++ b/rkward/settings/rksettingsmoduledebug.h
@@ -1,6 +1,6 @@
/*
rksettingsmoduledebug - This file is part of the RKWard project. Created: Tue Oct 23 2007
-SPDX-FileCopyrightText: 2007-2022 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2007-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmodulegeneral.h b/rkward/settings/rksettingsmodulegeneral.h
index 9fb01a3ff..da0207895 100644
--- a/rkward/settings/rksettingsmodulegeneral.h
+++ b/rkward/settings/rksettingsmodulegeneral.h
@@ -1,6 +1,6 @@
/*
rksettingsmodulegeneral - This file is part of the RKWard project. Created: Fri Jul 30 2004
-SPDX-FileCopyrightText: 2004-2022 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2004-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmodulegraphics.cpp b/rkward/settings/rksettingsmodulegraphics.cpp
index 7a824be29..95abf4f56 100644
--- a/rkward/settings/rksettingsmodulegraphics.cpp
+++ b/rkward/settings/rksettingsmodulegraphics.cpp
@@ -1,6 +1,6 @@
/*
rksettingsmodulegraphics - This file is part of RKWard (https://rkward.kde.org). Created: Mon Sep 13 2010
-SPDX-FileCopyrightText: 2010-2022 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2010-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmodulegraphics.h b/rkward/settings/rksettingsmodulegraphics.h
index 294c58d7a..36f93f2f8 100644
--- a/rkward/settings/rksettingsmodulegraphics.h
+++ b/rkward/settings/rksettingsmodulegraphics.h
@@ -1,6 +1,6 @@
/*
rksettingsmodulegraphics - This file is part of the RKWard project. Created: Mon Sep 13 2010
-SPDX-FileCopyrightText: 2010-2022 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2010-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmodulekateplugins.cpp b/rkward/settings/rksettingsmodulekateplugins.cpp
index f638d3959..94169d099 100644
--- a/rkward/settings/rksettingsmodulekateplugins.cpp
+++ b/rkward/settings/rksettingsmodulekateplugins.cpp
@@ -1,6 +1,6 @@
/*
rksettingsmodulekateplugins - This file is part of RKWard (https://rkward.kde.org). Created: Thu Mar 26 2010
-SPDX-FileCopyrightText: 2020 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2020-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
@@ -10,14 +10,16 @@ SPDX-License-Identifier: GPL-2.0-or-later
#include <QTreeWidget>
#include <QVBoxLayout>
#include <QLabel>
+#include <QIcon>
#include <KPluginMetaData>
#include <KLocalizedString>
#include <KConfigGroup>
#include <KConfig>
-#include <QIcon>
+#include <KTextEditor/Plugin>
#include "rksettingsmoduleplugins.h"
+#include "rksettingsmodulecommandeditor.h"
#include "../windows/katepluginintegration.h"
#include "../misc/rkcommonfunctions.h"
#include "../rkward.h"
@@ -92,8 +94,17 @@ RKSettingsModuleKatePlugins::~RKSettingsModuleKatePlugins() {
}
QList<RKSettingsModuleWidget*> RKSettingsModuleKatePlugins::createPages(QWidget *parent) {
-// TODO: add the plugin config pages
- return QList<RKSettingsModuleWidget*>{ new RKSettingsPageKatePlugins(parent, this) };
+ RK_TRACE(SETTINGS);
+
+ QList<RKSettingsModuleWidget*> ret { new RKSettingsPageKatePlugins(parent, this) };
+ auto loaded_plugins = RKWardMainWindow::getMain()->katePluginIntegration()->loadedPlugins();
+ for (auto it = loaded_plugins.constBegin(); it != loaded_plugins.constEnd(); ++it) {
+ auto p = *it;
+ for (int i = 0; i < p->configPages(); ++i) {
+ ret.append(new RKTextEditorConfigPageWrapper(parent, this, RKSettingsModuleKatePlugins::page_id, p->configPage(i, nullptr)));
+ }
+ }
+ return ret;
}
void RKSettingsModuleKatePlugins::syncConfig(KConfig *config, RKConfigBase::ConfigSyncAction a) {
diff --git a/rkward/settings/rksettingsmodulekateplugins.h b/rkward/settings/rksettingsmodulekateplugins.h
index c6c8e87d6..9c42500c0 100644
--- a/rkward/settings/rksettingsmodulekateplugins.h
+++ b/rkward/settings/rksettingsmodulekateplugins.h
@@ -1,6 +1,6 @@
/*
rksettingsmodulekateplugins - This file is part of the RKWard project. Created: Thu Mar 26 2010
-SPDX-FileCopyrightText: 2020 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2020-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmoduleobjectbrowser.cpp b/rkward/settings/rksettingsmoduleobjectbrowser.cpp
index 98bc7ced4..86137a5e0 100644
--- a/rkward/settings/rksettingsmoduleobjectbrowser.cpp
+++ b/rkward/settings/rksettingsmoduleobjectbrowser.cpp
@@ -1,6 +1,6 @@
/*
rksettingsmodule - This file is part of RKWard (https://rkward.kde.org). Created: Fri Apr 22 2005
-SPDX-FileCopyrightText: 2005-2015 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2005-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmoduleobjectbrowser.h b/rkward/settings/rksettingsmoduleobjectbrowser.h
index 92399dea3..e5b3245f6 100644
--- a/rkward/settings/rksettingsmoduleobjectbrowser.h
+++ b/rkward/settings/rksettingsmoduleobjectbrowser.h
@@ -1,6 +1,6 @@
/*
rksettingsmodule - This file is part of the RKWard project. Created: Fri Apr 22 2005
-SPDX-FileCopyrightText: 2005-2018 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2005-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmoduleoutput.cpp b/rkward/settings/rksettingsmoduleoutput.cpp
index 8b81c68a2..03aa67801 100644
--- a/rkward/settings/rksettingsmoduleoutput.cpp
+++ b/rkward/settings/rksettingsmoduleoutput.cpp
@@ -1,6 +1,6 @@
/*
rksettingsmoduleoutput - This file is part of RKWard (https://rkward.kde.org). Created: Fri Jul 30 2004
-SPDX-FileCopyrightText: 2004-2022 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2004-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmoduleoutput.h b/rkward/settings/rksettingsmoduleoutput.h
index 891cd1664..665696544 100644
--- a/rkward/settings/rksettingsmoduleoutput.h
+++ b/rkward/settings/rksettingsmoduleoutput.h
@@ -1,6 +1,6 @@
/*
rksettingsmoduleoutput - This file is part of the RKWard project. Created: Fri Jul 30 2004
-SPDX-FileCopyrightText: 2004-2022 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2004-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmoduleplugins.cpp b/rkward/settings/rksettingsmoduleplugins.cpp
index 1a1142527..1d010e9d0 100644
--- a/rkward/settings/rksettingsmoduleplugins.cpp
+++ b/rkward/settings/rksettingsmoduleplugins.cpp
@@ -1,6 +1,6 @@
/*
rksettingsmoduleplugins - This file is part of RKWard (https://rkward.kde.org). Created: Wed Jul 28 2004
-SPDX-FileCopyrightText: 2004-2020 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2004-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmoduleplugins.h b/rkward/settings/rksettingsmoduleplugins.h
index 904ffc1ca..89b8117b0 100644
--- a/rkward/settings/rksettingsmoduleplugins.h
+++ b/rkward/settings/rksettingsmoduleplugins.h
@@ -1,6 +1,6 @@
/*
rksettingsmoduleplugins - This file is part of the RKWard project. Created: Wed Jul 28 2004
-SPDX-FileCopyrightText: 2004-2022 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2004-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmoduler.cpp b/rkward/settings/rksettingsmoduler.cpp
index 41bbfd5a3..59a803ff3 100755
--- a/rkward/settings/rksettingsmoduler.cpp
+++ b/rkward/settings/rksettingsmoduler.cpp
@@ -1,6 +1,6 @@
/*
rksettingsmoduler - This file is part of RKWard (https://rkward.kde.org). Created: Wed Jul 28 2004
-SPDX-FileCopyrightText: 2004-2022 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2004-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmodulewatch.cpp b/rkward/settings/rksettingsmodulewatch.cpp
index 7ceafb88f..cd6f9ef6d 100644
--- a/rkward/settings/rksettingsmodulewatch.cpp
+++ b/rkward/settings/rksettingsmodulewatch.cpp
@@ -1,6 +1,6 @@
/*
rksettingsmodulewatch - This file is part of RKWard (https://rkward.kde.org). Created: Thu Aug 26 2004
-SPDX-FileCopyrightText: 2004 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2004-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/settings/rksettingsmodulewatch.h b/rkward/settings/rksettingsmodulewatch.h
index 0b78388b7..d4f587766 100644
--- a/rkward/settings/rksettingsmodulewatch.h
+++ b/rkward/settings/rksettingsmodulewatch.h
@@ -1,6 +1,6 @@
/*
rksettingsmodulewatch - This file is part of the RKWard project. Created: Thu Aug 26 2004
-SPDX-FileCopyrightText: 2004-2018 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2004-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
diff --git a/rkward/windows/katepluginintegration.cpp b/rkward/windows/katepluginintegration.cpp
index bf002b0e2..6fe77c25b 100644
--- a/rkward/windows/katepluginintegration.cpp
+++ b/rkward/windows/katepluginintegration.cpp
@@ -1,6 +1,6 @@
/*
katepluginintegration - This file is part of RKWard (https://rkward.kde.org). Created: Mon Jun 12 2017
-SPDX-FileCopyrightText: 2017-2023 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2017-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
@@ -237,8 +237,17 @@ void KatePluginIntegrationApp::unloadPlugin(const QString &identifier) {
info.plugin = nullptr;
}
+QList<KTextEditor::Plugin*> KatePluginIntegrationApp::loadedPlugins() const {
+ RK_TRACE(APP);
+ QList<KTextEditor::Plugin*> ret;
+ for (auto it = known_plugins.constBegin(); it != known_plugins.constEnd(); ++it) {
+ if ((*it).plugin) ret.append((*it).plugin);
+ }
+ return ret;
+}
+
void KatePluginIntegrationApp::saveConfigAndUnload() {
- RK_TRACE (APP);
+ RK_TRACE(APP);
for (auto it = known_plugins.constBegin(); it != known_plugins.constEnd(); ++it) {
unloadPlugin(it.key());
diff --git a/rkward/windows/katepluginintegration.h b/rkward/windows/katepluginintegration.h
index 4f4b7f35f..86f79f0ce 100644
--- a/rkward/windows/katepluginintegration.h
+++ b/rkward/windows/katepluginintegration.h
@@ -1,6 +1,6 @@
/*
katepluginintegration - This file is part of the RKWard project. Created: Mon Jun 12 2017
-SPDX-FileCopyrightText: 2017-2023 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
+SPDX-FileCopyrightText: 2017-2024 by Thomas Friedrichsmeier <thomas.friedrichsmeier at kdemail.net>
SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
@@ -50,6 +50,8 @@ friend class KatePluginIntegrationWindow;
KTextEditor::Plugin *plugin(const QString &name);
private:
friend class RKSettingsPageKatePlugins;
+friend class RKSettingsModuleKatePlugins;
+ QList<KTextEditor::Plugin*> loadedPlugins() const;
KatePluginIntegrationWindow *window; // For now, only one main window
KTextEditor::Application *app;
/** Provides a hidden dummy view (created on the fly as needed), for plugins that assume there is always at least one view/document around. */
More information about the rkward-tracker
mailing list