Bug 129712 - Should not prompt for overwriting of file when saving
Summary: Should not prompt for overwriting of file when saving
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-23 18:37 UTC by Andrew Walker
Modified: 2006-06-26 20:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Walker 2006-06-23 18:37:35 UTC
Version:           1.2.1 (using KDE KDE 3.5.0)
Installed from:    Compiled From Sources
OS:                Linux

PROBLEM:
When loading a Kst session from an existing file the user should not be prompted when saving

STEPS TO REPRODUCE:
Start kst
Open an existing session from an already existing Kst file
Hit the Save button

RESULTS:
The user is prompted "File ... exists. Overwrite?"

EXPECTED RESULTS:
The file is quietly saved
Comment 1 Andrew Walker 2006-06-26 20:02:42 UTC
SVN commit 555217 by arwalker:

BUG:129712 Do not prompt the user to overwrite a file when not necessary. Correctly set the value of prompt parameter in KstDoc::saveDocument()

 M  +3 -3      kst.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kst.cpp #555216:555217
@@ -1111,7 +1111,7 @@
     do {
       name = sl + QString("unsaved%1.kst").arg(i);
     } while(QFile::exists(name));
-    doc->saveDocument(name);
+    doc->saveDocument(name, false, false);
     config->writePathEntry("Document", name);
     config->writeEntry("NamedDocument", false);
   }
@@ -1205,7 +1205,7 @@
     slotFileSaveAs();
   } else {
     slotUpdateStatusMsg(i18n("Saving file..."));
-    doc->saveDocument(doc->absFilePath());
+    doc->saveDocument(doc->absFilePath(), false, false);
     slotUpdateStatusMsg(i18n("Ready"));
   }
 }
@@ -1233,7 +1233,7 @@
       if (!extension.exactMatch(newName)) {
         longName = newName + QString(".kst");
       }
-      if (doc->saveDocument(longName)) {
+      if (doc->saveDocument(longName, false, true)) {
         QFileInfo saveAsInfo(longName);
 
         addRecentFile(longName);