[rkward] /: Make <browser> respect being not required.

Thomas Friedrichsmeier null at kde.org
Fri Oct 19 12:30:30 BST 2018


Git commit 4f877921d7129d380c843f8d8dbaaa094955c085 by Thomas Friedrichsmeier.
Committed on 19/10/2018 at 11:28.
Pushed by tfry into branch 'master'.

Make <browser> respect being not required.

M  +1    -0    ChangeLog
M  +7    -1    rkward/plugin/rkpluginbrowser.cpp
M  +1    -1    rkward/plugin/rkpluginbrowser.h
M  +1    -1    rkward/scriptbackends/rkcomponentscripting.cpp

https://commits.kde.org/rkward/4f877921d7129d380c843f8d8dbaaa094955c085

diff --git a/ChangeLog b/ChangeLog
index 5e4ed76a..eafe1d6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
 --- Version 0.7.1 - UNRELEASED
+- Fixed: <browser> element could not be set to not required
 - Fixed: max.print option was not saved, correctly, when set from RKWard settings
 - Add command-line option --autoreuse to avoid shipping two separate .desktop files
 - <select> elements in plugin dialogs can be set to accept only a single selection
diff --git a/rkward/plugin/rkpluginbrowser.cpp b/rkward/plugin/rkpluginbrowser.cpp
index e4f57f01..8c023ad1 100644
--- a/rkward/plugin/rkpluginbrowser.cpp
+++ b/rkward/plugin/rkpluginbrowser.cpp
@@ -2,7 +2,7 @@
                           rkpluginbrowser  -  description
                              -------------------
     begin                : Sat Mar 10 2005
-    copyright            : (C) 2005, 2006, 2007, 2009, 2010, 2012, 2014 by Thomas Friedrichsmeier
+    copyright            : (C) 2018 by Thomas Friedrichsmeier
     email                : thomas.friedrichsmeier at kdemail.net
  ***************************************************************************/
 
@@ -75,6 +75,12 @@ RKPluginBrowser::~RKPluginBrowser () {
 	RK_TRACE (PLUGIN);
 }
 
+RKComponentBase::ComponentStatus RKPluginBrowser::recursiveStatus () {
+	if (status == RKComponentBase::Processing) return status;
+	if (isInactive () || !required) return RKComponentBase::Satisfied;
+	return status;
+}
+
 void RKPluginBrowser::textChanged (RKComponentPropertyBase *) {
 	RK_TRACE (PLUGIN);
 
diff --git a/rkward/plugin/rkpluginbrowser.h b/rkward/plugin/rkpluginbrowser.h
index c2bb65d3..722822f1 100644
--- a/rkward/plugin/rkpluginbrowser.h
+++ b/rkward/plugin/rkpluginbrowser.h
@@ -45,7 +45,7 @@ public:
 	QVariant value (const QString &modifier=QString ()) override { return (selection->value (modifier)); };
 	QStringList getUiLabelPair () const override;
 	int type () override { return ComponentBrowser; };
-	ComponentStatus recursiveStatus () override { return status; };
+	ComponentStatus recursiveStatus () override;
 public slots:
 	void textChangedFromUi ();
 	void textChanged (RKComponentPropertyBase *);
diff --git a/rkward/scriptbackends/rkcomponentscripting.cpp b/rkward/scriptbackends/rkcomponentscripting.cpp
index 726c13a2..96ba0bee 100644
--- a/rkward/scriptbackends/rkcomponentscripting.cpp
+++ b/rkward/scriptbackends/rkcomponentscripting.cpp
@@ -79,7 +79,7 @@ void RKComponentScriptingProxy::handleScriptError (const QString& current_file)
 	QString file = current_file;
 	if (file.isEmpty ()) file = _scriptfile;
 	if (engine.hasUncaughtException ()) {
-		QString message = i18n ("Script Error: %1\n", engine.uncaughtException ().toString ());
+		QString message = i18n ("Script Error at '%1' line %2: %3\n", file.isEmpty() ? i18n ("inlined code") : file, engine.uncaughtExceptionLineNumber (), engine.uncaughtException ().toString ());
 		KMessageBox::detailedError (0, message, engine.uncaughtExceptionBacktrace ().join ("\n"));
 		engine.clearExceptions ();
 		emit (haveError());



More information about the rkward-tracker mailing list