From db17236000131b0145a8a1d41bf07c7adbf8113b Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Sat, 6 Jun 2009 12:57:16 +0300 Subject: [PATCH] GUI: Make Settings-dialog a parent of Add Application-dialog. --- gui/applicationdialog.cpp | 4 +++- gui/applicationdialog.h | 4 +++- gui/settingsdialog.cpp | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gui/applicationdialog.cpp b/gui/applicationdialog.cpp index 7c8425611..1a3ea16e6 100644 --- a/gui/applicationdialog.cpp +++ b/gui/applicationdialog.cpp @@ -28,7 +28,9 @@ ApplicationDialog::ApplicationDialog(const QString &name, const QString &path, - const QString &title) + const QString &title, + QWidget *parent) : + QDialog(parent) { QVBoxLayout *layout = new QVBoxLayout(); mName = new QLineEdit(name); diff --git a/gui/applicationdialog.h b/gui/applicationdialog.h index bb4ef4d38..878e4b40a 100644 --- a/gui/applicationdialog.h +++ b/gui/applicationdialog.h @@ -38,10 +38,12 @@ public: * @param name Default name for the application to start * @param path Path for the application * @param title Title for the dialog + * @param parent Parent widget */ ApplicationDialog(const QString &name, const QString &path, - const QString &title); + const QString &title, + QWidget *parent = 0); virtual ~ApplicationDialog(); /** diff --git a/gui/settingsdialog.cpp b/gui/settingsdialog.cpp index d707e0b17..c7abd7b1d 100644 --- a/gui/settingsdialog.cpp +++ b/gui/settingsdialog.cpp @@ -214,7 +214,7 @@ void SettingsDialog::SaveCheckboxValue(QCheckBox *box, const QString &name) void SettingsDialog::AddApplication() { - ApplicationDialog dialog("", "", tr("Add a new application")); + ApplicationDialog dialog("", "", tr("Add a new application"), this); if (dialog.exec() == QDialog::Accepted) {