[rkward-cvs] SF.net SVN: rkward:[3003] trunk/rkward/rkward/windows/rkcommandeditorwindow .cpp

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue Sep 7 10:10:54 UTC 2010


Revision: 3003
          http://rkward.svn.sourceforge.net/rkward/?rev=3003&view=rev
Author:   tfry
Date:     2010-09-07 10:10:53 +0000 (Tue, 07 Sep 2010)

Log Message:
-----------
Fix add addition to rev 3002

Revision Links:
--------------
    http://rkward.svn.sourceforge.net/rkward/?rev=3002&view=rev

Modified Paths:
--------------
    trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp

Modified: trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp	2010-09-06 16:43:50 UTC (rev 3002)
+++ trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp	2010-09-07 10:10:53 UTC (rev 3003)
@@ -357,10 +357,14 @@
 
 		if (RKSettingsModuleCommandEditor::autosaveKeep ()) return;
 		if (!previous_autosave_url.isValid ()) return;
-		RKJobSequence* dummy = new RKJobSequence ();
-		dummy->addJob (KIO::del (previous_autosave_url));
-		connect (dummy, SIGNAL (finished(RKJobSequence*)), this, SLOT (autoSaveHandlerJobFinished(RKJobSequence*)));
-		dummy->start ();
+		if (previous_autosave_url.isLocalFile ()) {
+			QFile::remove (previous_autosave_url.toLocalFile ());
+		} else {
+			RKJobSequence* dummy = new RKJobSequence ();
+			dummy->addJob (KIO::del (previous_autosave_url));
+			connect (dummy, SIGNAL (finished(RKJobSequence*)), this, SLOT (autoSaveHandlerJobFinished(RKJobSequence*)));
+			dummy->start ();
+		}
 		previous_autosave_url.clear ();
 	}
 }
@@ -410,8 +414,8 @@
 		KUrl autosave_url = url ();
 		autosave_url.setFileName (autosave_url.fileName () + RKSettingsModuleCommandEditor::autosaveSuffix ());
 		if (autosave_url.isLocalFile ()) {
-			QFile::remove (backup_autosave_url.toLocalFile ());
-			save.copy (backup_autosave_url.toLocalFile ());
+			QFile::remove (autosave_url.toLocalFile ());
+			save.copy (autosave_url.toLocalFile ());
 			save.remove ();
 		} else {
 			alljobs->addJob (KIO::file_move (KUrl::fromLocalFile (save.fileName ()), autosave_url, -1, KIO::HideProgressInfo | KIO::Overwrite));


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