|
2 | 2 | #include "ui_PatchDialog.h"
|
3 | 3 | #include <QMessageBox>
|
4 | 4 | #include <QIcon>
|
5 |
| -#include <QDesktopServices> |
6 | 5 | #include <QFileDialog>
|
7 | 6 | #include <QTextStream>
|
8 | 7 |
|
@@ -499,11 +498,7 @@ void PatchDialog::on_btnPatchFile_clicked()
|
499 | 498 |
|
500 | 499 | void PatchDialog::on_btnImport_clicked()
|
501 | 500 | {
|
502 |
| -#if QT_VERSION < QT_VERSION_CHECK(5,0,0) |
503 |
| - QString filename = QFileDialog::getOpenFileName(this, tr("Open patch"), QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation), tr("Patch files (*.1337)")); |
504 |
| -#else |
505 |
| - QString filename = QFileDialog::getOpenFileName(this, tr("Open patch"), QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation)[0], tr("Patch files (*.1337)")); |
506 |
| -#endif |
| 501 | + QString filename = QFileDialog::getOpenFileName(this, tr("Open patch"), "", tr("Patch files (*.1337)")); |
507 | 502 | if(!filename.length())
|
508 | 503 | return;
|
509 | 504 | filename = QDir::toNativeSeparators(filename); //convert to native path format (with backlashes)
|
@@ -638,11 +633,7 @@ void PatchDialog::on_btnExport_clicked()
|
638 | 633 | if(!mPatches->size())
|
639 | 634 | return;
|
640 | 635 |
|
641 |
| -#if QT_VERSION < QT_VERSION_CHECK(5,0,0) |
642 |
| - QString filename = QFileDialog::getSaveFileName(this, tr("Save patch"), QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation), tr("Patch files (*.1337)")); |
643 |
| -#else |
644 |
| - QString filename = QFileDialog::getSaveFileName(this, tr("Save patch"), QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation)[0], tr("Patch files (*.1337)")); |
645 |
| -#endif |
| 636 | + QString filename = QFileDialog::getSaveFileName(this, tr("Save patch"), "", tr("Patch files (*.1337)")); |
646 | 637 | if(!filename.length())
|
647 | 638 | return;
|
648 | 639 | filename = QDir::toNativeSeparators(filename); //convert to native path format (with backlashes)
|
|
0 commit comments