diff options
author | Berthold Krevert <berthold.krevert@basyskom.com> | 2014-01-16 19:13:16 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-14 16:57:00 +0200 |
commit | f60911ca0d492c3868f7feb71d1de63f111d6cd6 (patch) | |
tree | aac538ec56b26a20b04274987001a2dda70e1daf | |
parent | 723cd96c92955fb90a02625d323ac18c62fda6be (diff) | |
download | qtquickcontrols-f60911ca0d492c3868f7feb71d1de63f111d6cd6.tar.gz qtquickcontrols-f60911ca0d492c3868f7feb71d1de63f111d6cd6.tar.bz2 qtquickcontrols-f60911ca0d492c3868f7feb71d1de63f111d6cd6.zip |
Remove redundant button clicked handler in QQuickMessageBox
Change c286b4fccb2d83fcc01b21913b95c5e4f21f2982 added the
QQuickAbstractMessageDialog::click() handler, which made the
QQuickMessageDialog::clicked() handler redundant.
(cherry-picked from qtdeclarative/a5669568904b37b1d6b297e7190d18306e198604)
Change-Id: Ifd770a3c67b35fd9a4929fc55b9e5298c36fb960
Task-number: QTBUG-35933
Reviewed-by: Liang Qi <liang.qi@digia.com>
-rw-r--r-- | src/dialogs/qquickmessagedialog.cpp | 48 | ||||
-rw-r--r-- | src/dialogs/qquickmessagedialog_p.h | 1 |
2 files changed, 0 insertions, 49 deletions
diff --git a/src/dialogs/qquickmessagedialog.cpp b/src/dialogs/qquickmessagedialog.cpp index f5ff79af..4732a706 100644 --- a/src/dialogs/qquickmessagedialog.cpp +++ b/src/dialogs/qquickmessagedialog.cpp @@ -97,7 +97,6 @@ QT_BEGIN_NAMESPACE QQuickMessageDialog::QQuickMessageDialog(QObject *parent) : QQuickAbstractMessageDialog(parent) { - connect(this, SIGNAL(buttonClicked()), this, SLOT(clicked())); } @@ -121,53 +120,6 @@ QQuickMessageDialog::~QQuickMessageDialog() \l Window or an \l Item. */ - -void QQuickMessageDialog::clicked() { - switch (m_clickedButton) { - // This mapping from buttons to roles is the same as - // documented for enum QMessageBox::StandardButton - case Ok: - case Open: - case Save: - case SaveAll: - case Retry: - case Ignore: - accept(); - break; - case Cancel: - case Close: - case Abort: - reject(); - break; - case Discard: - emit discard(); - close(); - break; - case Help: - emit help(); - break; - case Yes: - case YesToAll: - emit yes(); - close(); - break; - case No: - case NoToAll: - emit no(); - close(); - break; - case Apply: - emit apply(); - break; - case Reset: - case RestoreDefaults: - emit reset(); - break; - default: - qWarning("StandardButton %d has no role", m_clickedButton); - } -} - void QQuickMessageDialog::accept() { // enter key is treated like OK if (m_clickedButton == NoButton) diff --git a/src/dialogs/qquickmessagedialog_p.h b/src/dialogs/qquickmessagedialog_p.h index 80a0b04d..a20b8677 100644 --- a/src/dialogs/qquickmessagedialog_p.h +++ b/src/dialogs/qquickmessagedialog_p.h @@ -73,7 +73,6 @@ protected: protected Q_SLOTS: virtual void accept(); virtual void reject(); - void clicked(); private: Q_DISABLE_COPY(QQuickMessageDialog) |