diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 4dadcf7ac..a6a1d4c29 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -350,8 +350,8 @@ QStringList MainWindow::SelectFilesToCheck(QFileDialog::FileMode mode) // QFileDialog::getExistingDirectory() because they show native Windows // selection dialog which is a lot more usable than QT:s own dialog. if (mode == QFileDialog::ExistingFiles) { - SelectFilesDialog *dialog = new SelectFilesDialog; - dialog->exec(); + SelectFilesDialog dialog(this); + dialog.exec(); /* selected = QFileDialog::getOpenFileNames(this, tr("Select files to check"), diff --git a/gui/selectfilesdialog.cpp b/gui/selectfilesdialog.cpp index 11d78c91d..192526e2e 100644 --- a/gui/selectfilesdialog.cpp +++ b/gui/selectfilesdialog.cpp @@ -103,7 +103,7 @@ public: -SelectFilesDialog::SelectFilesDialog() : QDialog() +SelectFilesDialog::SelectFilesDialog(QWidget *w) : QDialog(w) { setModal(true); diff --git a/gui/selectfilesdialog.h b/gui/selectfilesdialog.h index 23f83be78..4fe925efb 100644 --- a/gui/selectfilesdialog.h +++ b/gui/selectfilesdialog.h @@ -6,7 +6,7 @@ class SelectFilesDialog : public QDialog { public: - SelectFilesDialog(); + SelectFilesDialog(QWidget *w); }; #endif