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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue Jan 2 13:04:53 UTC 2007


Revision: 1042
          http://svn.sourceforge.net/rkward/?rev=1042&view=rev
Author:   tfry
Date:     2007-01-02 05:04:52 -0800 (Tue, 02 Jan 2007)

Log Message:
-----------
krazy fixes

Modified Paths:
--------------
    trunk/rkward/rkward/plugin/rkcomponent.cpp
    trunk/rkward/rkward/plugin/rkcomponentmap.cpp
    trunk/rkward/rkward/plugin/rkcomponentproperties.cpp
    trunk/rkward/rkward/plugin/rkcomponentproperties.h
    trunk/rkward/rkward/plugin/rkformula.cpp
    trunk/rkward/rkward/plugin/rkstandardcomponent.cpp
    trunk/rkward/rkward/plugin/rkstandardcomponent.h
    trunk/rkward/rkward/plugin/rkstandardcomponentgui.cpp
    trunk/rkward/rkward/plugin/rkstandardcomponentgui.h
    trunk/rkward/rkward/plugin/rktext.cpp

Modified: trunk/rkward/rkward/plugin/rkcomponent.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponent.cpp	2007-01-02 12:54:57 UTC (rev 1041)
+++ trunk/rkward/rkward/plugin/rkcomponent.cpp	2007-01-02 13:04:52 UTC (rev 1042)
@@ -52,7 +52,7 @@
 					list->insert (prefix + it.currentKey (), it.current ()->value ());
 				}
 			} else {
-				it.current ()->fetchPropertyValuesRecursive (list, true, prefix + it.currentKey () + ".");
+				it.current ()->fetchPropertyValuesRecursive (list, true, prefix + it.currentKey () + '.');
 			}
 		}
 	}
@@ -83,7 +83,7 @@
 	RK_TRACE (PLUGIN);
 
 	RK_DO (qDebug ("Component type %d does not have a value. Remaining modifier is: '%s'", type (), modifier.latin1 ()), PLUGIN, DL_WARNING);
-	return QString::null;
+	return QString ();
 }
 
 bool RKComponentBase::isSatisfied () {
@@ -219,7 +219,7 @@
 			QString key = it.currentKey ();
 	// unfortunately, several items might hvae the same key, and there seems to be no way to selectively remove the current item only.
 	// however, this function should only ever be called in cases of emergency and to prevent crashes. So we make extra sure to remove the child,
-	// even if we remove a little more than neccessary along the way.
+	// even if we remove a little more than necessary along the way.
 			while (parentComponent ()->child_map.remove (key));
 			return;
 		}

Modified: trunk/rkward/rkward/plugin/rkcomponentmap.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponentmap.cpp	2007-01-02 12:54:57 UTC (rev 1041)
+++ trunk/rkward/rkward/plugin/rkcomponentmap.cpp	2007-01-02 13:04:52 UTC (rev 1042)
@@ -166,7 +166,7 @@
 	QDomElement document_element = xml->openXMLFile (plugin_map_file, DL_ERROR);
 	if (xml->highestError () >= DL_ERROR) return (0);
 
-	QString prefix = QFileInfo (plugin_map_file).dirPath (true) + "/" + xml->getStringAttribute (document_element, "base_prefix", QString::null, DL_INFO);
+	QString prefix = QFileInfo (plugin_map_file).dirPath (true) + '/' + xml->getStringAttribute (document_element, "base_prefix", QString::null, DL_INFO);
 	QString cnamespace = xml->getStringAttribute (document_element, "namespace", "rkward", DL_INFO) + "::";
 
 	// step 1: create (list of) components

Modified: trunk/rkward/rkward/plugin/rkcomponentproperties.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponentproperties.cpp	2007-01-02 12:54:57 UTC (rev 1041)
+++ trunk/rkward/rkward/plugin/rkcomponentproperties.cpp	2007-01-02 13:04:52 UTC (rev 1042)
@@ -76,7 +76,7 @@
 
 The parent components will be invalid, if any of their children is not satisfied. They may however be satisfied, if they - in turn - are not required.
 
-Typically properties are owned by RKComponent (s), but this is not technically neccessary.
+Typically properties are owned by RKComponent (s), but this is not technically necessary.
 
 Properties and components share much common functionality. See RKComponentBase.
 
@@ -111,7 +111,7 @@
 	RK_TRACE (PLUGIN);
 	if (!modifier.isEmpty ()) {
 		warnModifierNotRecognized (modifier);
-		return QString::null;
+		return QString ();
 	}
 	return _value;
 }
@@ -173,7 +173,7 @@
 	is_valid = true;
 }
 
-void RKComponentPropertyBool::internalSetValue (QString new_value) {
+void RKComponentPropertyBool::internalSetValue (const QString &new_value) {
 	RK_TRACE (PLUGIN);
 
 	_value = new_value;
@@ -218,7 +218,7 @@
 	}
 
 	warnModifierNotRecognized (modifier);
-	return QString::null;
+	return QString ();
 }
 
 bool RKComponentPropertyBool::setValue (const QString &string) {
@@ -334,7 +334,7 @@
 
 	if (!modifier.isEmpty ()) {
 		warnModifierNotRecognized (modifier);
-		return QString::null;
+		return QString ();
 	}
 	return _value;
 }
@@ -409,7 +409,7 @@
 	if (!is_valid) current_value = default_value;
 }
 
-void RKComponentPropertyInt::internalSetValue (QString new_value) {
+void RKComponentPropertyInt::internalSetValue (const QString &new_value) {
 	current_value = new_value.toInt (&is_valid);
 	if (!is_valid) {
 		_value = new_value;
@@ -499,7 +499,7 @@
 
 	if (!modifier.isEmpty ()) {
 		warnModifierNotRecognized (modifier);
-		return QString::null;
+		return QString ();
 	}
 	return _value;
 }
@@ -576,7 +576,7 @@
 	if (!is_valid) current_value = default_value;
 }
 
-void RKComponentPropertyDouble::internalSetValue (QString new_value) {
+void RKComponentPropertyDouble::internalSetValue (const QString &new_value) {
 	RK_TRACE (PLUGIN);
 
 	current_value = new_value.toDouble (&is_valid);
@@ -1003,7 +1003,7 @@
 RKComponentPropertyCode::RKComponentPropertyCode (QObject *parent, bool required) : RKComponentPropertyBase (parent, required) {
 	RK_TRACE (PLUGIN);
 
-	preprocess_code = calculate_code = printout_code = cleanup_code = QString::null;
+	preprocess_code = calculate_code = printout_code = cleanup_code = QString ();
 }
 
 RKComponentPropertyCode::~RKComponentPropertyCode () {

Modified: trunk/rkward/rkward/plugin/rkcomponentproperties.h
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponentproperties.h	2007-01-02 12:54:57 UTC (rev 1041)
+++ trunk/rkward/rkward/plugin/rkcomponentproperties.h	2007-01-02 13:04:52 UTC (rev 1042)
@@ -20,7 +20,7 @@
 
 #include <qobject.h>
 
-/* we need these foward declarations for now, due to cylcic includes. TODO: fix this */
+/* we need these forward declarations for now, due to cylcic includes. TODO: fix this */
 class RKComponentPropertyBase;
 class RKComponentPropertyBool;
 #include "rkcomponent.h"
@@ -97,7 +97,7 @@
 /** helper function. Sets the value without emitting change signal */
 	void internalSetValue (bool new_value);
 /** helper function. Sets the value without emitting change signal */
-	void internalSetValue (QString new_value);
+	void internalSetValue (const QString &new_value);
 	bool default_value;
 	bool current_value;
 	QString value_true;
@@ -144,7 +144,7 @@
 /** helper function. Sets the value without emitting change signal */
 	void internalSetValue (int new_value);
 /** helper function. Sets the value without emitting change signal */
-	void internalSetValue (QString new_value);
+	void internalSetValue (const QString &new_value);
 	int default_value;
 	int current_value;
 /** we could do without the validator, and create the logic on our own. Using Qt's validator, however, a) saves some typing b) allows to provide a validator object in use in lineedits, etc. (see getValidator ()) */
@@ -193,7 +193,7 @@
 /** helper function. Sets the value without emitting change signal */
 	void internalSetValue (double new_value);
 /** helper function. Sets the value without emitting change signal */
-	void internalSetValue (QString new_value);
+	void internalSetValue (const QString &new_value);
 	double default_value;
 	double current_value;
 /** we could do without the validator, and create the logic on our own. Using Qt's validator, however, a) saves some typing b) allows to provide a validator object in use in lineedits, etc. (see getValidator ()) */

Modified: trunk/rkward/rkward/plugin/rkformula.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkformula.cpp	2007-01-02 12:54:57 UTC (rev 1041)
+++ trunk/rkward/rkward/plugin/rkformula.cpp	2007-01-02 13:04:52 UTC (rev 1042)
@@ -168,9 +168,9 @@
 	}
 	if (multitable) {
 		table_string = "data.frame (";
-		if (dep_var) table_string.append (mangleName (dep_var) + "=" + dep_var->getFullName ());
+		if (dep_var) table_string.append (mangleName (dep_var) + '=' + dep_var->getFullName ());
 		for (ObjectList::const_iterator it = vlist.begin (); it != vlist.end (); ++it) {
-			table_string.append (", " + mangleName ((*it)) + "=" + (*it)->getFullName ());
+			table_string.append (", " + mangleName ((*it)) + '=' + (*it)->getFullName ());
 		}
 		table_string.append (")");
 	} else {
@@ -223,7 +223,7 @@
 
 QString RKFormula::mangleName (RObject *var) {
 	RK_TRACE (PLUGIN);
-	if (!var) return QString::null;
+	if (!var) return QString ();
 		
 	QString dummy = var->getShortName ();
 	QString dummy2 = dummy;

Modified: trunk/rkward/rkward/plugin/rkstandardcomponent.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkstandardcomponent.cpp	2007-01-02 12:54:57 UTC (rev 1041)
+++ trunk/rkward/rkward/plugin/rkstandardcomponent.cpp	2007-01-02 13:04:52 UTC (rev 1042)
@@ -74,7 +74,7 @@
 
 	// initialize the PHP-backend with the code-template
 	QDomElement element = xml->getChildElement (doc_element, "code", DL_WARNING);
-	QString dummy = QFileInfo (filename).dirPath () + "/" + xml->getStringAttribute (element, "file", "code.php", DL_WARNING);
+	QString dummy = QFileInfo (filename).dirPath () + '/' + xml->getStringAttribute (element, "file", "code.php", DL_WARNING);
 	backend = new PHPBackend ();
 	connect (backend, SIGNAL (idle ()), this, SLOT (backendIdle ()));
 	connect (backend, SIGNAL (requestValue (const QString&)), this, SLOT (getValue (const QString&)));
@@ -577,9 +577,9 @@
 
 	RKComponentPropertyConnection conn;
 	conn.client_property = client_id;
-	if (!client_property.isEmpty ()) conn.client_property += "." + client_property;
+	if (!client_property.isEmpty ()) conn.client_property += '.' + client_property;
 	conn.governor_property = governor_id;
-	if (!governor_property.isEmpty ()) conn.governor_property += "." + governor_property;
+	if (!governor_property.isEmpty ()) conn.governor_property += '.' + governor_property;
 	conn.reconcile = reconcile;
 	conn.origin = origin;
 	connection_list.append (conn);

Modified: trunk/rkward/rkward/plugin/rkstandardcomponent.h
===================================================================
--- trunk/rkward/rkward/plugin/rkstandardcomponent.h	2007-01-02 12:54:57 UTC (rev 1041)
+++ trunk/rkward/rkward/plugin/rkstandardcomponent.h	2007-01-02 13:04:52 UTC (rev 1042)
@@ -107,7 +107,7 @@
 
 Calls parent_component->addChild () for built child-components. As an exception, this may be omitted for passive components (e.g. layouting components) that do not specify an id
 
-Reminder to the twisted brain: Typically inside a standard-component, *all* child components, even if nested in layouting components, etc. have the same standard-component as parent! Only embedded full-fledged components are a truely separate unit!
+Reminder to the twisted brain: Typically inside a standard-component, *all* child components, even if nested in layouting components, etc. have the same standard-component as parent! Only embedded full-fledged components are a truly separate unit!
 
 @author Thomas Friedrichsmeier */
 class RKComponentBuilder {

Modified: trunk/rkward/rkward/plugin/rkstandardcomponentgui.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkstandardcomponentgui.cpp	2007-01-02 12:54:57 UTC (rev 1041)
+++ trunk/rkward/rkward/plugin/rkstandardcomponentgui.cpp	2007-01-02 13:04:52 UTC (rev 1042)
@@ -41,7 +41,7 @@
 	RK_TRACE (PLUGIN);
 
 	// create an error-dialog
-	error_dialog = new RKRErrorDialog (i18n ("The R-backend has reported one or more error(s) while processing the plugin '%1'.\nThis may lead to an incorrect ouput and is likely due to a bug in the plugin.\nA transcript of the error message(s) is shown below.").arg (component->getFilename ()), i18n ("R-Error"), false);
+	error_dialog = new RKRErrorDialog (i18n ("The R-backend has reported one or more error(s) while processing the plugin '%1'.\nThis may lead to an incorrect output and is likely due to a bug in the plugin.\nA transcript of the error message(s) is shown below.").arg (component->getFilename ()), i18n ("R-Error"), false);
 
 	RKStandardComponentGUI::component = component;
 	RKStandardComponentGUI::code_property = code_property;

Modified: trunk/rkward/rkward/plugin/rkstandardcomponentgui.h
===================================================================
--- trunk/rkward/rkward/plugin/rkstandardcomponentgui.h	2007-01-02 12:54:57 UTC (rev 1041)
+++ trunk/rkward/rkward/plugin/rkstandardcomponentgui.h	2007-01-02 13:04:52 UTC (rev 1042)
@@ -28,7 +28,7 @@
 class RKStandardComponentStack: public QWidgetStack {
 public:
 /** constructor. */
-	RKStandardComponentStack (QWidget *parent);
+	explicit RKStandardComponentStack (QWidget *parent);
 	~RKStandardComponentStack ();
 /** see RKStandardComponent::havePage () */
 	bool havePage (bool next);
@@ -39,7 +39,7 @@
 /** go to the first page (call after creation) */
 	void goToFirstPage ();
 
-/** for use during construction. Adds a new page. Subsequent calls to addComponentToCurrentPage work on the new page. Even the first page has to be added explicitely!
+/** for use during construction. Adds a new page. Subsequent calls to addComponentToCurrentPage work on the new page. Even the first page has to be added explicitly!
 @param parent The RKComponent acting as parent for the newly created page */
 	RKComponent *addPage (RKComponent *parent);
 

Modified: trunk/rkward/rkward/plugin/rktext.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rktext.cpp	2007-01-02 12:54:57 UTC (rev 1041)
+++ trunk/rkward/rkward/plugin/rktext.cpp	2007-01-02 13:04:52 UTC (rev 1042)
@@ -41,7 +41,7 @@
 	for (unsigned int i=0; i < lines.count (); i++) {
 		QString line = lines[i].stripWhiteSpace ();
 		if (!line.isEmpty ()) {
-			initial_text.append (line + "\n");
+			initial_text.append (line + '\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