[rkward-cvs] rkward/rkward/dataeditor rkeditordataframe.cpp,1.26,1.27 twintable.cpp,1.27,1.28 twintabledatamember.cpp,1.9,1.10 twintablemetamember.cpp,1.11,1.12

Thomas Friedrichsmeier tfry at users.sourceforge.net
Thu Sep 29 16:02:53 UTC 2005


Update of /cvsroot/rkward/rkward/rkward/dataeditor
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6449/rkward/dataeditor

Modified Files:
	rkeditordataframe.cpp twintable.cpp twintabledatamember.cpp 
	twintablemetamember.cpp 
Log Message:
Code cleanups, focus: replacing "" with QString::null / QString.isEmpty (). Fix credits

Index: twintablemetamember.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/dataeditor/twintablemetamember.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** twintablemetamember.cpp	21 Oct 2004 16:34:42 -0000	1.11
--- twintablemetamember.cpp	29 Sep 2005 16:02:50 -0000	1.12
***************
*** 167,171 ****
  	if (!var) {
  		RK_ASSERT (false);
! 		return "";
  	}
  	if (row == NAME_ROW) {
--- 167,171 ----
  	if (!var) {
  		RK_ASSERT (false);
! 		return QString::null;
  	}
  	if (row == NAME_ROW) {
***************
*** 180,184 ****
  		return var->getValueLabelString ();
  	}
! 	return "";
  }
  
--- 180,184 ----
  		return var->getValueLabelString ();
  	}
! 	return QString::null;
  }
  
***************
*** 188,192 ****
  	if (!var) {
  		RK_ASSERT (false);
! 		return "";
  	}
  	if (row == NAME_ROW) {
--- 188,192 ----
  	if (!var) {
  		RK_ASSERT (false);
! 		return QString::null;
  	}
  	if (row == NAME_ROW) {
***************
*** 201,205 ****
  		return var->getValueLabelString ();
  	}
! 	return "";
  }
  
--- 201,205 ----
  		return var->getValueLabelString ();
  	}
! 	return QString::null;
  }
  

Index: twintable.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/dataeditor/twintable.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** twintable.cpp	29 Sep 2005 13:24:48 -0000	1.27
--- twintable.cpp	29 Sep 2005 16:02:50 -0000	1.28
***************
*** 428,432 ****
  		if (pasted.length () <= (next_delim + 1)) {
  			// unfortunately QString.right (<=0) does not return an empty string!
! 			pasted = "";
  		} else {
  			pasted=pasted.right (pasted.length () - (next_delim + 1));
--- 428,432 ----
  		if (pasted.length () <= (next_delim + 1)) {
  			// unfortunately QString.right (<=0) does not return an empty string!
! 			pasted = QString::null;
  		} else {
  			pasted=pasted.right (pasted.length () - (next_delim + 1));

Index: twintabledatamember.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/dataeditor/twintabledatamember.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** twintabledatamember.cpp	21 Oct 2004 16:34:42 -0000	1.9
--- twintabledatamember.cpp	29 Sep 2005 16:02:50 -0000	1.10
***************
*** 161,165 ****
  	if (!var) {
  		RK_ASSERT (false);
! 		return "";
  	}
  	return var->getText (row);
--- 161,165 ----
  	if (!var) {
  		RK_ASSERT (false);
! 		return QString::null;
  	}
  	return var->getText (row);
***************
*** 170,174 ****
  	if (!var) {
  		RK_ASSERT (false);
! 		return "";
  	}
  	return var->getRText (row);
--- 170,174 ----
  	if (!var) {
  		RK_ASSERT (false);
! 		return QString::null;
  	}
  	return var->getRText (row);

Index: rkeditordataframe.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/dataeditor/rkeditordataframe.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** rkeditordataframe.cpp	14 Sep 2005 21:07:07 -0000	1.26
--- rkeditordataframe.cpp	29 Sep 2005 16:02:50 -0000	1.27
***************
*** 96,100 ****
  
  	// actually, given the object, we already know the child-names. We don't know their order, however, so we better fetch the name-row again.
! 	RCommand *command = new RCommand ("names (" + object->getFullName () + ")", RCommand::Sync | RCommand::GetStringVector, "", this, GET_NAMES_COMMAND);
  	RKGlobals::rInterface ()->issueCommand (command, open_chain);
  
--- 96,100 ----
  
  	// actually, given the object, we already know the child-names. We don't know their order, however, so we better fetch the name-row again.
! 	RCommand *command = new RCommand ("names (" + object->getFullName () + ")", RCommand::Sync | RCommand::GetStringVector, QString::null, this, GET_NAMES_COMMAND);
  	RKGlobals::rInterface ()->issueCommand (command, open_chain);
  
***************
*** 184,188 ****
  void RKEditorDataFrame::columnAdded (int col) {
  	RK_TRACE (EDITOR);
! 	RObject *obj = static_cast<RContainerObject *> (getObject ())->createNewChild (static_cast<RContainerObject *> (getObject ())->validizeName (""), this);
  	RK_ASSERT (obj->isVariable ());	
  	RKGlobals::rInterface ()->issueCommand (new RCommand (".rk.data.frame.insert.column (" + getObject ()->getFullName () + ", \"" + obj->getShortName () + "\", " + QString ().setNum (col+1) + ")", RCommand::App | RCommand::Sync));
--- 184,188 ----
  void RKEditorDataFrame::columnAdded (int col) {
  	RK_TRACE (EDITOR);
! 	RObject *obj = static_cast<RContainerObject *> (getObject ())->createNewChild (static_cast<RContainerObject *> (getObject ())->validizeName (QString::null), this);
  	RK_ASSERT (obj->isVariable ());	
  	RKGlobals::rInterface ()->issueCommand (new RCommand (".rk.data.frame.insert.column (" + getObject ()->getFullName () + ", \"" + obj->getShortName () + "\", " + QString ().setNum (col+1) + ")", RCommand::App | RCommand::Sync));





More information about the rkward-tracker mailing list