diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-02-26 15:25:35 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-27 14:08:30 +0100 |
commit | 5738bb533b97a9e19c18373286b157ee4d443532 (patch) | |
tree | 85cda3a4feeb8c154d60a9deea83abb819adae2e /src | |
parent | 14d472ba5c882aa706c101b428cb6b3b42b30ede (diff) | |
download | qtquickcontrols-5738bb533b97a9e19c18373286b157ee4d443532.tar.gz |
changes to MessageDialog click(StandardButton, ButtonRole) signal/slot
After f212322a6ecb237d5fb53e56c6dafffb87e45f09 there was a warning
about failing to connect QMessageBoxHelper::clicked to this slot.
Also accept() and reject() are not signals so they should not be
called with emit.
Task-number: QTBUG-36988
Change-Id: I1752ec08cbe82cc2bd9ffc9d920c1487bc17fa76
Reviewed-by: Berthold Krevert <berthold.krevert@basyskom.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/dialogs/qquickabstractmessagedialog.cpp | 4 | ||||
-rw-r--r-- | src/dialogs/qquickabstractmessagedialog_p.h | 2 | ||||
-rw-r--r-- | src/widgets/qquickqmessagebox.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/dialogs/qquickabstractmessagedialog.cpp b/src/dialogs/qquickabstractmessagedialog.cpp index ebaed414..b13c5338 100644 --- a/src/dialogs/qquickabstractmessagedialog.cpp +++ b/src/dialogs/qquickabstractmessagedialog.cpp @@ -141,10 +141,10 @@ void QQuickAbstractMessageDialog::click(QPlatformDialogHelper::StandardButton bu emit buttonClicked(); switch (role) { case QPlatformDialogHelper::AcceptRole: - emit accept(); + accept(); break; case QPlatformDialogHelper::RejectRole: - emit reject(); + reject(); break; case QPlatformDialogHelper::DestructiveRole: emit discard(); diff --git a/src/dialogs/qquickabstractmessagedialog_p.h b/src/dialogs/qquickabstractmessagedialog_p.h index 3cf8ee47..6c1d7f2d 100644 --- a/src/dialogs/qquickabstractmessagedialog_p.h +++ b/src/dialogs/qquickabstractmessagedialog_p.h @@ -124,7 +124,7 @@ Q_SIGNALS: void apply(); void reset(); -protected: +protected Q_SLOTS: void click(QPlatformDialogHelper::StandardButton button, QPlatformDialogHelper::ButtonRole); protected: diff --git a/src/widgets/qquickqmessagebox.cpp b/src/widgets/qquickqmessagebox.cpp index 5d734011..5d62bee6 100644 --- a/src/widgets/qquickqmessagebox.cpp +++ b/src/widgets/qquickqmessagebox.cpp @@ -134,8 +134,8 @@ QPlatformDialogHelper *QQuickQMessageBox::helper() // dismissed by closing the window rather than by one of its button widgets. connect(helper, SIGNAL(accept()), this, SLOT(accept())); connect(helper, SIGNAL(reject()), this, SLOT(reject())); - connect(helper, SIGNAL(clicked(QMessageDialogOptions::StandardButton,QMessageDialogOptions::ButtonRole)), - this, SLOT(click(QMessageDialogOptions::StandardButton,QMessageDialogOptions::ButtonRole))); + connect(helper, SIGNAL(clicked(QPlatformDialogHelper::StandardButton,QPlatformDialogHelper::ButtonRole)), + this, SLOT(click(QPlatformDialogHelper::StandardButton,QPlatformDialogHelper::ButtonRole))); } return QQuickAbstractMessageDialog::m_dlgHelper; |