[education/rkward/kf5] rkward/windows: Add (dummy) implementation of ktexteditor viewbar handling

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


Git commit 5d8478fa1f1efc809adf663b6ac117157f6ab6b3 by Thomas Friedrichsmeier.
Committed on 04/04/2024 at 21:38.
Pushed by tfry into branch 'kf5'.

Add (dummy) implementation of ktexteditor viewbar handling

M  +23   -0    rkward/windows/katepluginintegration.cpp
M  +7    -2    rkward/windows/katepluginintegration.h

https://invent.kde.org/education/rkward/-/commit/5d8478fa1f1efc809adf663b6ac117157f6ab6b3

diff --git a/rkward/windows/katepluginintegration.cpp b/rkward/windows/katepluginintegration.cpp
index 65fdac0e0..9166c07f2 100644
--- a/rkward/windows/katepluginintegration.cpp
+++ b/rkward/windows/katepluginintegration.cpp
@@ -513,6 +513,29 @@ QObject *KatePluginIntegrationWindow::pluginView(const QString &name) {
 	return plugin_resources.value(app->plugin(name)).view;
 }
 
+/* BEGIN deliberately left unimplemented */
+QWidget *KatePluginIntegrationWindow::createViewBar(KTextEditor::View *) {
+	RK_TRACE (APP);
+	return nullptr;
+}
+
+void KatePluginIntegrationWindow::deleteViewBar(KTextEditor::View *) {
+	RK_TRACE (APP);
+}
+
+void KatePluginIntegrationWindow::showViewBar(KTextEditor::View *) {
+	RK_TRACE (APP);
+}
+
+void KatePluginIntegrationWindow::hideViewBar(KTextEditor::View *) {
+	RK_TRACE (APP);
+}
+
+void KatePluginIntegrationWindow::addWidgetToViewBar(KTextEditor::View *, QWidget *)  {
+	RK_TRACE (APP);
+}
+/* END deliberately left unimplemented */
+
 bool KatePluginIntegrationWindow::closeSplitView(KTextEditor::View* view) {
 	RK_TRACE (APP);
 
diff --git a/rkward/windows/katepluginintegration.h b/rkward/windows/katepluginintegration.h
index f175c7972..d5a3630aa 100644
--- a/rkward/windows/katepluginintegration.h
+++ b/rkward/windows/katepluginintegration.h
@@ -92,12 +92,17 @@ private Q_SLOTS:
 	bool hideToolView(QWidget *widget);
 	QObject *pluginView(const QString &name);
 
-/* Apparently, these are truely optional, so let's disable them for the time being
+	/* Apparently, these are truely optional. We provide dummy implementations anyway to
+	 * get a better signal to noise ratio in warnings.
+	 *
+	 * "Viewbar" is the area containing line number, etc. If not created by the main window,
+	 * each view gets equipped with its own bar. That may actually be preferrable, as
+	 * our global bottom bar is quite crowded, already. */
 	QWidget *createViewBar(KTextEditor::View *view);
 	void deleteViewBar(KTextEditor::View *view);
 	void showViewBar(KTextEditor::View *view);
 	void hideViewBar(KTextEditor::View *view);
-	void addWidgetToViewBar(KTextEditor::View *view, QWidget *bar); */
+	void addWidgetToViewBar(KTextEditor::View *view, QWidget *bar);
 
 // New in Kate 2023-07, not yet formalized in KTextEditor
 	QWidget *toolviewForName(const QString &toolviewName);



More information about the rkward-tracker mailing list