r19350 by craig - Make PDF Export use QFileDialog like image export, under the Change button
scribus-commit
scribus-commit at lists.scribus.net
Wed Jul 16 22:30:14 UTC 2014
Author: craig
Date: Wed Jul 16 22:30:14 2014
New Revision: 19350
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19350
Log:
Make PDF Export use QFileDialog like image export, under the Change button
Modified:
trunk/Scribus/scribus/ui/pdfopts.cpp
Modified: trunk/Scribus/scribus/ui/pdfopts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19350&path=/trunk/Scribus/scribus/ui/pdfopts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pdfopts.cpp (original)
+++ trunk/Scribus/scribus/ui/pdfopts.cpp Wed Jul 16 22:30:14 2014
@@ -18,6 +18,7 @@
#include <QByteArray>
#include <QCheckBox>
+#include <QFileDialog>
#include <QGridLayout>
#include <QGroupBox>
#include <QHBoxLayout>
@@ -212,18 +213,12 @@
QString fn;
PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
QString wdir = dirs->get("pdf", ".");
- CustomFDialog dia(this, wdir, tr("Save As"), tr("PDF Files (*.pdf);;All Files (*)"), fdNone);
- if (!fileNameLineEdit->text().isEmpty())
- {
- QString fileName = QDir::fromNativeSeparators(fileNameLineEdit->text());
- dia.setSelection(fileName);
- }
- if (dia.exec() == QDialog::Accepted)
- {
- // selectedFile() may return path with native separators
- fn = QDir::fromNativeSeparators(dia.selectedFile());
+ QString d = QFileDialog::getSaveFileName(this, tr("Save As"), wdir, tr("PDF Files (*.pdf);;All Files (*)"), 0, QFileDialog::DontConfirmOverwrite);
+ if (d.length()>0)
+ {
+ fn = QDir::fromNativeSeparators(d);
dirs->set("pdf", fn.left(fn.lastIndexOf("/")));
- fileNameLineEdit->setText( QDir::toNativeSeparators(fn) );
+ fileNameLineEdit->setText( d );
}
}
More information about the scribus-commit
mailing list