Commit 3802257ab32f62e2491053428145f3ab578d312a
Committed by
David Graeff
1 parent
8eec0c4a
Make openhantek compile with Qt5 (drop Qt4 support)
Showing
4 changed files
with
4 additions
and
4 deletions
openhantek/OpenHantek.pro
openhantek/src/dsowidget.cpp
| ... | ... | @@ -445,7 +445,6 @@ bool DsoWidget::exportAs() { |
| 445 | 445 | QStringList filters; |
| 446 | 446 | filters |
| 447 | 447 | << tr("Portable Document Format (*.pdf)") |
| 448 | - << tr("PostScript (*.ps)") | |
| 449 | 448 | << tr("Image (*.png *.xpm *.jpg)") |
| 450 | 449 | << tr("Comma-Separated Values (*.csv)"); |
| 451 | 450 | |
| ... | ... | @@ -457,7 +456,7 @@ bool DsoWidget::exportAs() { |
| 457 | 456 | |
| 458 | 457 | Exporter exporter(this->settings, this->dataAnalyzer, static_cast<QWidget *>(this->parent())); |
| 459 | 458 | exporter.setFilename(fileDialog.selectedFiles().first()); |
| 460 | - exporter.setFormat((ExportFormat) (EXPORT_FORMAT_PDF + filters.indexOf(fileDialog.selectedFilter()))); | |
| 459 | + exporter.setFormat((ExportFormat) (EXPORT_FORMAT_PDF + filters.indexOf(fileDialog.selectedNameFilter()))); | |
| 461 | 460 | |
| 462 | 461 | return exporter.doExport(); |
| 463 | 462 | } | ... | ... |
openhantek/src/exporter.cpp
| ... | ... | @@ -99,7 +99,7 @@ bool Exporter::doExport() { |
| 99 | 99 | else { |
| 100 | 100 | // Configure the QPrinter |
| 101 | 101 | static_cast<QPrinter *>(paintDevice)->setOutputFileName(this->filename); |
| 102 | - static_cast<QPrinter *>(paintDevice)->setOutputFormat((this->format == EXPORT_FORMAT_PDF) ? QPrinter::PdfFormat : QPrinter::PostScriptFormat); | |
| 102 | + static_cast<QPrinter *>(paintDevice)->setOutputFormat((this->format == EXPORT_FORMAT_PDF) ? QPrinter::PdfFormat : QPrinter::NativeFormat); | |
| 103 | 103 | } |
| 104 | 104 | } |
| 105 | 105 | else { | ... | ... |
openhantek/src/exporter.h