diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-01-16 15:12:29 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-16 17:06:12 +0100 |
commit | 34572dadc6a4efce87a639f38a989a3117c8ca9f (patch) | |
tree | 05bd2e18bc4919b7b7b45afe10c8a89415f4cec9 /tests/manual/dialogs/filedialogpanel.h | |
parent | 5d2bb24cc90194a3458f8741e30ae7afe0b45f5c (diff) |
Dialog testing tool: Control life cycle of non-modal file dialogs.
Keep the non-modal file dialog around and delete only on request,
such that one can simulate repeated invocations of show() on
the same dialog for testing native dialogs.
Change-Id: I80d0f1dfafbc02a31be192098121654a01025174
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'tests/manual/dialogs/filedialogpanel.h')
-rw-r--r-- | tests/manual/dialogs/filedialogpanel.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/manual/dialogs/filedialogpanel.h b/tests/manual/dialogs/filedialogpanel.h index bc8b66535b..a0f746e6d0 100644 --- a/tests/manual/dialogs/filedialogpanel.h +++ b/tests/manual/dialogs/filedialogpanel.h @@ -44,7 +44,9 @@ #include <QGroupBox> #include <QFileDialog> +#include <QPointer> +class QPushButton; class QCheckBox; class QComboBox; class QLineEdit; @@ -60,6 +62,7 @@ public: public slots: void showModal(); void showNonModal(); + void deleteNonModalDialog(); void getOpenFileNames(); void getOpenFileName(); void getSaveFileName(); @@ -68,6 +71,9 @@ public slots: void showAcceptedResult(); void restoreDefaults(); +private slots: + void enableDeleteNonModalDialogButton(); + private: QString filterString() const; QFileDialog::Options options() const; @@ -87,7 +93,9 @@ private: QList<LabelLineEdit *> m_labelLineEdits; QPlainTextEdit *m_nameFilters; QLineEdit *m_selectedNameFilter; + QPushButton *m_deleteNonModalDialogButton; QString m_result; + QPointer<QFileDialog> m_nonModalDialog; }; #endif // FILEDIALOGPANEL_H |