[rkward-cvs] rkward/rkward/agents rkloadagent.cpp,1.4,1.5 rksaveagent.cpp,1.3,1.4 rksaveagent.h,1.2,1.3

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


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

Modified Files:
	rkloadagent.cpp rksaveagent.cpp rksaveagent.h 
Log Message:
Code cleanups, focus: replacing "" with QString::null / QString.isEmpty (). Fix credits

Index: rkloadagent.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/agents/rkloadagent.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rkloadagent.cpp	17 Nov 2004 20:28:01 -0000	1.4
--- rkloadagent.cpp	29 Sep 2005 16:02:50 -0000	1.5
***************
*** 55,59 ****
  	}
  
! 	command = new RCommand ("load (\"" + url.path () + "\")", RCommand::App, "", this, WORKSPACE_LOAD_COMMAND);
  	RKGlobals::rInterface ()->issueCommand (command);
  
--- 55,59 ----
  	}
  
! 	command = new RCommand ("load (\"" + url.path () + "\")", RCommand::App, QString::null, this, WORKSPACE_LOAD_COMMAND);
  	RKGlobals::rInterface ()->issueCommand (command);
  

Index: rksaveagent.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/agents/rksaveagent.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rksaveagent.h	2 Sep 2004 15:08:51 -0000	1.2
--- rksaveagent.h	29 Sep 2005 16:02:50 -0000	1.3
***************
*** 34,38 ****
  
  /** creates a new RKSaveAgent. If when_done == Quit, the RKSaveAgent will quit the application as soon as saving was successful (or it asked to by the user). Similarily, if when_done==Load, it will load a new workspace after saving (specify the url in load_url). If url is given (not empty), and not save_file_as, the agent will try to save to the given url, else it will ask the user to specify a url. RKSaveAgent will self destruct when done. */
! 	RKSaveAgent (KURL url, bool save_file_as=false, DoneAction when_done=DoNothing, KURL load_url="");
  	
  	~RKSaveAgent ();
--- 34,38 ----
  
  /** creates a new RKSaveAgent. If when_done == Quit, the RKSaveAgent will quit the application as soon as saving was successful (or it asked to by the user). Similarily, if when_done==Load, it will load a new workspace after saving (specify the url in load_url). If url is given (not empty), and not save_file_as, the agent will try to save to the given url, else it will ask the user to specify a url. RKSaveAgent will self destruct when done. */
! 	RKSaveAgent (KURL url, bool save_file_as=false, DoneAction when_done=DoNothing, KURL load_url=QString::null);
  	
  	~RKSaveAgent ();

Index: rksaveagent.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/agents/rksaveagent.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rksaveagent.cpp	2 Sep 2004 15:08:51 -0000	1.3
--- rksaveagent.cpp	29 Sep 2005 16:02:50 -0000	1.4
***************
*** 43,47 ****
  	save_chain = RKGlobals::rInterface ()->startChain (0);
  	
! 	RKGlobals::rInterface ()->issueCommand (new RCommand ("save.image (\"" + save_url.path () + "\")", RCommand::App, "", this), save_chain);
  }
  
--- 43,47 ----
  	save_chain = RKGlobals::rInterface ()->startChain (0);
  	
! 	RKGlobals::rInterface ()->issueCommand (new RCommand ("save.image (\"" + save_url.path () + "\")", RCommand::App, QString::null, this), save_chain);
  }
  
***************
*** 70,74 ****
  			res = KMessageBox::warningYesNoCancel (0, i18n ("Saving to file '") + save_url.path () + i18n ("' failed. What do you want to do?"), i18n ("Save failed"), KGuiItem (i18n ("Try saving with a different filename")), KGuiItem (i18n ("Saving failed")));
  			if (res == KMessageBox::Yes) {
! 				if (askURL ()) RKGlobals::rInterface ()->issueCommand (new RCommand ("save.image (\"" + save_url.path () + "\")", RCommand::App, "", this), save_chain);
  				return;
  			} else if (res == KMessageBox::No) {
--- 70,74 ----
  			res = KMessageBox::warningYesNoCancel (0, i18n ("Saving to file '") + save_url.path () + i18n ("' failed. What do you want to do?"), i18n ("Save failed"), KGuiItem (i18n ("Try saving with a different filename")), KGuiItem (i18n ("Saving failed")));
  			if (res == KMessageBox::Yes) {
! 				if (askURL ()) RKGlobals::rInterface ()->issueCommand (new RCommand ("save.image (\"" + save_url.path () + "\")", RCommand::App, QString::null, this), save_chain);
  				return;
  			} else if (res == KMessageBox::No) {
***************
*** 82,86 ****
  		} else {
  			if (KMessageBox::warningYesNo (0, i18n ("Saving to file '") + save_url.path () + i18n ("' failed. Do you want to try saving to a different filename?")) == KMessageBox::Yes) {
! 				if (askURL ()) RKGlobals::rInterface ()->issueCommand (new RCommand ("save.image (\"" + save_url.path () + "\")", RCommand::App, "", this), save_chain);
  				return;
  			} else {
--- 82,86 ----
  		} else {
  			if (KMessageBox::warningYesNo (0, i18n ("Saving to file '") + save_url.path () + i18n ("' failed. Do you want to try saving to a different filename?")) == KMessageBox::Yes) {
! 				if (askURL ()) RKGlobals::rInterface ()->issueCommand (new RCommand ("save.image (\"" + save_url.path () + "\")", RCommand::App, QString::null, this), save_chain);
  				return;
  			} else {





More information about the rkward-tracker mailing list