Summary: | kdevelop's new file dialog overwrites existing files | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Robert Johansson <robjo442> |
Component: | file create | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.1 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Robert Johansson
2004-09-29 09:45:43 UTC
Oh I forgot, this concerns kdevelop version 3.1 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; |