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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue Jan 22 18:25:55 UTC 2008


Revision: 2340
          http://rkward.svn.sourceforge.net/rkward/?rev=2340&view=rev
Author:   tfry
Date:     2008-01-22 10:25:55 -0800 (Tue, 22 Jan 2008)

Log Message:
-----------
correct more potential string split problems

Modified Paths:
--------------
    trunk/rkward/rkward/core/rkvariable.cpp
    trunk/rkward/rkward/plugin/rkcomponentproperties.cpp

Modified: trunk/rkward/rkward/core/rkvariable.cpp
===================================================================
--- trunk/rkward/rkward/core/rkvariable.cpp	2008-01-22 18:04:09 UTC (rev 2339)
+++ trunk/rkward/rkward/core/rkvariable.cpp	2008-01-22 18:25:55 UTC (rev 2340)
@@ -965,7 +965,7 @@
 	formatting_options.precision = 0;
 	bool empty = true;
 
-	QStringList list = string.split ("#");
+	QStringList list = string.split ("#", QString::SkipEmptyParts);
 	QString option, parameter;
 	for (QStringList::const_iterator it = list.constBegin (); it != list.constEnd (); ++it) {
 		option = (*it).section (':', 0, 0);

Modified: trunk/rkward/rkward/plugin/rkcomponentproperties.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponentproperties.cpp	2008-01-22 18:04:09 UTC (rev 2339)
+++ trunk/rkward/rkward/plugin/rkcomponentproperties.cpp	2008-01-22 18:25:55 UTC (rev 2340)
@@ -806,10 +806,10 @@
 bool RKComponentPropertyRObjects::setValue (const QString &value) {
 	RK_TRACE (PLUGIN);
 
-	object_list.clear ();
+	setObjectValue (0);
 
 	bool ok = true;
-	QStringList slist = value.split (separator);
+	QStringList slist = value.split (separator, QString::SkipEmptyParts);
 
 	for (QStringList::const_iterator it = slist.begin (); it != slist.end (); ++it) {
 		RObject *obj = RObjectList::getObjectList ()->findObject (value);
@@ -829,7 +829,7 @@
 bool RKComponentPropertyRObjects::isStringValid (const QString &value) {
 	RK_TRACE (PLUGIN);
 
-	QStringList slist = value.split (separator);
+	QStringList slist = value.split (separator, QString::SkipEmptyParts);
 
 	for (QStringList::const_iterator it = slist.begin (); it != slist.end (); ++it) {
 		RObject *obj = RObjectList::getObjectList ()->findObject (value);


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