[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 90446] kdevelop's new file dialog overwrites existing files
From:       kdevelop-bugs-admin () barney ! cs ! uni-potsdam ! de
Date:       2004-10-17 14:46:21
Message-ID: 20041017144621.8405.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
        
http://bugs.kde.org/show_bug.cgi?id=90446        
jens.dagerbo swipnet se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From jens.dagerbo swipnet se  2004-10-17 16:46 -------
CVS commit by dagerbo: 

Don't overwrite existing files

CCMAIL: 90446-done bugs kde org


  M +14 -0     filecreate_newfile.cpp   1.14.2.1
  M +1 -0      filecreate_newfile.h   1.4.2.1


--- kdevelop/parts/filecreate/filecreate_newfile.cpp  #1.14:1.14.2.1
 @ -25,4 +25,6  @
 #include <klocale.h>
 #include <kdebug.h>
+#include <kmessagebox.h>
+
 
 namespace FileCreate {
 @ -144,3 +146,15  @ namespace FileCreate {
   }
 
+        void NewFileChooser::accept()
+        {
+                QFileInfo file( url().path() );
+                if ( file.exists() )
+                {
+                        KMessageBox::sorry( 0, i18n("A file with this name already \
exists."), i18n("File Exists") ); +                        return;
+                }
+                KDialogBase::accept();
+        }
+
 }
+

--- kdevelop/parts/filecreate/filecreate_newfile.h  #1.4:1.4.2.1
 @ -43,4 +43,5  @ namespace FileCreate {
   protected:
     void addType(const FileType * filetype);
+        void accept();
 
     QGridLayout *m_grid;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic