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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue Apr 24 10:11:59 UTC 2007


Revision: 1839
          http://svn.sourceforge.net/rkward/?rev=1839&view=rev
Author:   tfry
Date:     2007-04-24 03:11:59 -0700 (Tue, 24 Apr 2007)

Log Message:
-----------
Be sure to initialize the inverted member of bool properties.
Some minor stuff along the way

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

Modified: trunk/rkward/rkward/plugin/rkcomponent.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponent.cpp	2007-04-23 20:10:20 UTC (rev 1838)
+++ trunk/rkward/rkward/plugin/rkcomponent.cpp	2007-04-24 10:11:59 UTC (rev 1839)
@@ -29,7 +29,7 @@
 	RK_DO (qDebug ("looking up '%s'", identifier.latin1 ()), PLUGIN, DL_DEBUG);
 
 	RKComponentBase *child = child_map.find (identifier.section (".", 0, 0));
-	if (!child) {	// if we do not have such a child, return 0 unless this is a property
+	if (!child) {	// if we do not have such a child, return this (and set remainder)
 		*remainder = identifier;
 		return this;
 	} else {	// else do recursive lookup

Modified: trunk/rkward/rkward/plugin/rkcomponentproperties.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponentproperties.cpp	2007-04-23 20:10:20 UTC (rev 1838)
+++ trunk/rkward/rkward/plugin/rkcomponentproperties.cpp	2007-04-24 10:11:59 UTC (rev 1839)
@@ -144,7 +144,7 @@
 
 void RKComponentPropertyBase::warnModifierNotRecognized (const QString &modifier) {
 	RK_TRACE (PLUGIN);
-	RK_DO (qDebug ("Modifier '%s' not recongnized.", modifier.latin1 ()), PLUGIN, DL_ERROR);
+	RK_DO (qDebug ("Modifier '%s' not recognized.", modifier.latin1 ()), PLUGIN, DL_ERROR);
 }
 
 ///////////////////////////////////////////// Bool //////////////////////////////////////////
@@ -154,6 +154,7 @@
 	RKComponentPropertyBool::value_true = value_true;
 	RKComponentPropertyBool::value_false = value_false;
 	default_value = default_state;
+	inverted = false;
 	internalSetValue (default_state);
 }
 
@@ -172,9 +173,9 @@
 		RKComponentPropertyBool *negated = new RKComponentPropertyBool (this, false, false, value_true, value_false);
 		negated->setInverted (true);
 		negated->connectToGovernor (this);
-		*remainder = identifier.section (".", 1);
+		*remainder = QString::null;		// reset
 		addChild ("not", negated);		// so subsequent lookups will not recreate the negated property
-		return (negated);
+		return (negated->lookupComponent (identifier.section (".", 1), remainder));
 	}
 
 	return (this);


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