[rkward-cvs] SF.net SVN: rkward:[2475] trunk/rkward/rkward/plugin

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed May 13 15:39:43 UTC 2009


Revision: 2475
          http://rkward.svn.sourceforge.net/rkward/?rev=2475&view=rev
Author:   tfry
Date:     2009-05-13 15:39:41 +0000 (Wed, 13 May 2009)

Log Message:
-----------
Fix some small serialization / unserialization bugs

Modified Paths:
--------------
    trunk/rkward/rkward/plugin/rkcomponentproperties.cpp
    trunk/rkward/rkward/plugin/rkstandardcomponentgui.cpp

Modified: trunk/rkward/rkward/plugin/rkcomponentproperties.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponentproperties.cpp	2009-05-13 11:08:11 UTC (rev 2474)
+++ trunk/rkward/rkward/plugin/rkcomponentproperties.cpp	2009-05-13 15:39:41 UTC (rev 2475)
@@ -814,7 +814,7 @@
 	QStringList slist = value.split (separator, QString::SkipEmptyParts);
 
 	for (QStringList::const_iterator it = slist.begin (); it != slist.end (); ++it) {
-		RObject *obj = RObjectList::getObjectList ()->findObject (value);
+		RObject *obj = RObjectList::getObjectList ()->findObject (*it);
 		if (obj && isObjectValid (obj)) {
 			object_list.append (obj);
 			listenForObject (obj);
@@ -834,7 +834,7 @@
 	QStringList slist = value.split (separator, QString::SkipEmptyParts);
 
 	for (QStringList::const_iterator it = slist.begin (); it != slist.end (); ++it) {
-		RObject *obj = RObjectList::getObjectList ()->findObject (value);
+		RObject *obj = RObjectList::getObjectList ()->findObject (*it);
 		if (!(obj && isObjectValid (obj))) {
 			return false;
 		}

Modified: trunk/rkward/rkward/plugin/rkstandardcomponentgui.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkstandardcomponentgui.cpp	2009-05-13 11:08:11 UTC (rev 2474)
+++ trunk/rkward/rkward/plugin/rkstandardcomponentgui.cpp	2009-05-13 15:39:41 UTC (rev 2475)
@@ -31,6 +31,7 @@
 #include <QCloseEvent>
 
 #include "rkcomponentmap.h"
+#include "../misc/rkcommonfunctions.h"
 #include "../windows/rkworkplace.h"
 #include "../windows/rkcommandeditorwindow.h"
 #include "../rbackend/rinterface.h"
@@ -161,7 +162,8 @@
 	command.clear ();
 	RKComponentHandle *handle = component->getHandle ();
 	if (handle->isAccessible ()) {
-		command.append ("\n.rk.rerun.plugin.link(plugin=\"" + RKComponentMap::getComponentId (handle) + "\", settings=\"" + component->serializeState () + "\", label=\"" + i18n ("Run again") + "\")\n");
+		command.append ("\n.rk.rerun.plugin.link(plugin=\"" + RKComponentMap::getComponentId (handle) + "\", settings=\"" + RKCommonFunctions::escape (component->serializeState ()) + "\", label=\"" + i18n ("Run again") + "\")\n");
+		// NOTE: the serialized state is quote-escape *again* for passing to R.
 	}
 	// separator line
 	command.append (".rk.make.hr()\n");


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list