From 760a771fce3758fe34b1f3ce8a22f283bb24b326 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 7 Feb 2014 14:04:37 +0100 Subject: Consolidate StandardButton, ButtonRole and related static functions Moving them into QPlatformDialogHelper for the convenience of both widgets and QtQuick.Dialogs. The main reason is to ensure that QtQuick.Dialogs does not need to depend on the widgets module, in order to re-implement the button box concept in a generic dialog. Change-Id: If400d215338d7cb6dade39d9de60e50b5e7515ef Reviewed-by: Friedemann Kleint --- src/widgets/dialogs/qmessagebox.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/widgets/dialogs/qmessagebox.cpp') diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 1b64b0ba67..3080d5f1e8 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -209,7 +209,7 @@ public: void init(const QString &title = QString(), const QString &text = QString()); void setupLayout(); void _q_buttonClicked(QAbstractButton *); - void _q_clicked(QMessageDialogOptions::StandardButton button, QMessageDialogOptions::ButtonRole role); + void _q_clicked(QPlatformDialogHelper::StandardButton button, QPlatformDialogHelper::ButtonRole role); QAbstractButton *findButton(int button0, int button1, int button2, int flags); void addOldButtons(int button0, int button1, int button2); @@ -524,7 +524,7 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button) } } -void QMessageBoxPrivate::_q_clicked(QMessageDialogOptions::StandardButton button, QMessageDialogOptions::ButtonRole role) +void QMessageBoxPrivate::_q_clicked(QPlatformDialogHelper::StandardButton button, QPlatformDialogHelper::ButtonRole role) { Q_UNUSED(role); Q_Q(QMessageBox); @@ -2697,8 +2697,8 @@ QPixmap QMessageBoxPrivate::standardIcon(QMessageBox::Icon icon, QMessageBox *mb void QMessageBoxPrivate::initHelper(QPlatformDialogHelper *h) { Q_Q(QMessageBox); - QObject::connect(h, SIGNAL(clicked(QMessageDialogOptions::StandardButton, QMessageDialogOptions::ButtonRole)), - q, SLOT(_q_clicked(QMessageDialogOptions::StandardButton, QMessageDialogOptions::ButtonRole))); + QObject::connect(h, SIGNAL(clicked(QPlatformDialogHelper::StandardButton, QPlatformDialogHelper::ButtonRole)), + q, SLOT(_q_clicked(QPlatformDialogHelper::StandardButton, QPlatformDialogHelper::ButtonRole))); static_cast(h)->setOptions(options); } @@ -2719,9 +2719,9 @@ static QMessageDialogOptions::Icon helperIcon(QMessageBox::Icon i) return QMessageDialogOptions::NoIcon; } -static QMessageDialogOptions::StandardButtons helperStandardButtons(QMessageBox * q) +static QPlatformDialogHelper::StandardButtons helperStandardButtons(QMessageBox * q) { - QMessageDialogOptions::StandardButtons buttons(int(q->standardButtons())); + QPlatformDialogHelper::StandardButtons buttons(int(q->standardButtons())); return buttons; } -- cgit v1.2.3