summaryrefslogtreecommitdiff
path: root/src/dialogs/qquickdialog_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-08-21 20:11:55 +0200
committerShawn Rutledge <shawn.rutledge@digia.com>2014-08-24 17:10:42 +0200
commitbb844065944049d836736192505ea28973f39444 (patch)
tree0949dc0ca90346e08543ad96ae49bee9d32db2be /src/dialogs/qquickdialog_p.h
parent737b7bec8513c23d1ea6bbbc88dbe6f357efb2fa (diff)
downloadqtquickcontrols-bb844065944049d836736192505ea28973f39444.tar.gz
Dialog: initialize enabled and clicked buttons
When the dialog becomes visible, no button has been clicked yet: we are waiting for the user to do that. Failure to initialize m_clickedButton made the logic in accept() and reject() unreliable: accept() does not imply OK unless we are sure the user did not click any other button, and the same with reject() implying Cancel. Change-Id: I340c18bd0fca6cc9a7274c1063882de425444326 Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'src/dialogs/qquickdialog_p.h')
-rw-r--r--src/dialogs/qquickdialog_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dialogs/qquickdialog_p.h b/src/dialogs/qquickdialog_p.h
index 5a04a83e..565859f3 100644
--- a/src/dialogs/qquickdialog_p.h
+++ b/src/dialogs/qquickdialog_p.h
@@ -81,6 +81,7 @@ public:
Q_INVOKABLE QJSValue __standardButtonsRightModel();
QString title() const { return m_title; }
+ virtual void setVisible(bool v);
public Q_SLOTS:
virtual void setTitle(const QString &arg);