[education/rkward] rkward/misc: Disable online search option, if there is no symbol to search for.

Thomas Friedrichsmeier null at kde.org
Mon Jun 13 13:16:26 BST 2022


Git commit c7f10c59064aee399bb892f4e97121b63a298d45 by Thomas Friedrichsmeier.
Committed on 13/06/2022 at 12:16.
Pushed by tfry into branch 'master'.

Disable online search option, if there is no symbol to search for.

M  +4    -1    rkward/misc/rkstandardactions.cpp

https://invent.kde.org/education/rkward/commit/c7f10c59064aee399bb892f4e97121b63a298d45

diff --git a/rkward/misc/rkstandardactions.cpp b/rkward/misc/rkstandardactions.cpp
index 4003cac7..72e0fb55 100644
--- a/rkward/misc/rkstandardactions.cpp
+++ b/rkward/misc/rkstandardactions.cpp
@@ -122,7 +122,10 @@ public slots:
 		RK_TRACE (MISC);
 		QString symbol, package;
 		provider->currentHelpContext (&symbol, &package);
-		actions->setSelectedText (symbol + " " + package + " R");
+		menu->menuAction()->setEnabled(!symbol.isEmpty());
+		if (symbol.isEmpty()) return;
+
+		actions->setSelectedText(symbol + " " + package + " R");
 		menu->clear();
 
 		// Coerce WebshortcutsMenu to single level


More information about the rkward-tracker mailing list