+ split file extension from descriptive text of file format to avoid that invalid translation breaks file dialog

This commit is contained in:
wmayer
2015-10-06 18:45:06 +02:00
parent d19ada810f
commit b374fcb6ef
8 changed files with 53 additions and 50 deletions

View File

@@ -391,7 +391,8 @@ void EditorView::print(QPrinter* printer)
*/
void EditorView::printPdf()
{
QString filename = FileDialog::getSaveFileName(this, tr("Export PDF"), QString(), tr("PDF file (*.pdf)"));
QString filename = FileDialog::getSaveFileName(this, tr("Export PDF"), QString(),
QString::fromLatin1("%1 (*.pdf)").arg(tr("PDF file")));
if (!filename.isEmpty()) {
QPrinter printer(QPrinter::ScreenResolution);
printer.setOutputFormat(QPrinter::PdfFormat);