]> git.lyx.org Git - features.git/commitdiff
* qt4/FileDialog.cpp (save): disable overwrite confirmation with
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 6 Jun 2007 12:19:48 +0000 (12:19 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 6 Jun 2007 12:19:48 +0000 (12:19 +0000)
native file dialogs (bug 3818)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18689 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/FileDialog.cpp

index aa47cd41ba92e4116e432cdc50588e29f73ef57a..92ed6d349a83a2834c0bb8f322c1f7529b797b84 100644 (file)
@@ -84,9 +84,14 @@ FileDialog::Result const FileDialog::save(docstring const & path,
 #ifdef USE_NATIVE_FILEDIALOG
        docstring const startsWith = from_utf8(
                makeAbsPath(to_utf8(suggested), to_utf8(path)).absFilename());
-       result.second = from_utf8(internal_path(fromqstr(
+       QString const name = 
                QFileDialog::getSaveFileName(qApp->focusWidget(),
-               toqstr(title_), toqstr(startsWith), toqstr(filters.as_string()) ))));
+                                            toqstr(title_), 
+                                            toqstr(startsWith), 
+                                            toqstr(filters.as_string()),
+                                            0, 
+                                            QFileDialog::DontConfirmOverwrite);
+       result.second = from_utf8(internal_path(fromqstr(name)));
 #else
        LyXFileDialog dlg(title_, path, filters, private_->b1, private_->b2);
 #if QT_VERSION != 0x040203