summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2011-06-01 14:08:33 +0200
committerkh1 <qt-info@nokia.com>2011-06-01 14:08:33 +0200
commit6978a2469e402c6f59a4639893e37ccea6f11f55 (patch)
treebeb3121ffef10a81a98755b59fcace5322a76dc4 /examples
parente7e57db90a2c35411ee3a75400fd3819a3fc7a00 (diff)
Keep the dialog on the heap to see actual setting changes.
Diffstat (limited to 'examples')
-rw-r--r--examples/testapp/mainwindow.cpp6
-rw-r--r--examples/testapp/mainwindow.h5
2 files changed, 7 insertions, 4 deletions
diff --git a/examples/testapp/mainwindow.cpp b/examples/testapp/mainwindow.cpp
index 6af20bce6..799fbd781 100644
--- a/examples/testapp/mainwindow.cpp
+++ b/examples/testapp/mainwindow.cpp
@@ -54,6 +54,7 @@ using namespace QInstallerCreator;
MainWindow::MainWindow(const QStringList &args, QWidget *parent)
: QMainWindow(parent)
+ , m_dialog(new UpdateSettingsDialog(this))
, m_installer(new Installer(QInstaller::MagicUpdaterMarker))
{
QInstaller::init();
@@ -82,9 +83,8 @@ MainWindow::MainWindow(const QStringList &args, QWidget *parent)
void MainWindow::editUpdateSettings()
{
- UpdateSettingsDialog dialog(this);
- connect(&dialog, SIGNAL(checkForUpdates()), this, SLOT(checkForUpdates()));
- dialog.exec();
+ connect(m_dialog, SIGNAL(checkForUpdates()), this, SLOT(checkForUpdates()));
+ m_dialog->show();
}
void MainWindow::checkForUpdates()
diff --git a/examples/testapp/mainwindow.h b/examples/testapp/mainwindow.h
index 274b4e223..5b7d83461 100644
--- a/examples/testapp/mainwindow.h
+++ b/examples/testapp/mainwindow.h
@@ -31,6 +31,7 @@
#include <QtGui/QMainWindow>
+class UpdateSettingsDialog;
class MainWindow : public QMainWindow
{
@@ -47,7 +48,9 @@ private Q_SLOTS:
void updatesAvailable();
private:
- KDUpdater::Application updaterapp;
+ UpdateSettingsDialog *m_dialog;
QInstaller::Installer *m_installer;
+
+ KDUpdater::Application updaterapp;
QInstaller::InstallerSettings m_settings;
};