diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-02-07 14:04:37 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-15 10:43:20 +0100 |
commit | 760a771fce3758fe34b1f3ce8a22f283bb24b326 (patch) | |
tree | facfdedcfe17c21c8ae2de061ea79f6ff60f3fe1 /src/gui/kernel/qplatformtheme.cpp | |
parent | f8dbed12266c42785c1e4758eed05833ec035f33 (diff) |
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 <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/gui/kernel/qplatformtheme.cpp')
-rw-r--r-- | src/gui/kernel/qplatformtheme.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp index 90edf4c49f..e12eb318dc 100644 --- a/src/gui/kernel/qplatformtheme.cpp +++ b/src/gui/kernel/qplatformtheme.cpp @@ -632,7 +632,7 @@ QList<QKeySequence> QPlatformTheme::keyBindings(QKeySequence::StandardKey key) c Returns the text of a standard \a button. \since 5.3 - \sa QMessageDialogOptions::StandardButton + \sa QPlatformDialogHelper::StandardButton */ QString QPlatformTheme::standardButtonText(int button) const @@ -643,41 +643,41 @@ QString QPlatformTheme::standardButtonText(int button) const QString QPlatformTheme::defaultStandardButtonText(int button) { switch (button) { - case QMessageDialogOptions::Ok: + case QPlatformDialogHelper::Ok: return QCoreApplication::translate("QPlatformTheme", "OK"); - case QMessageDialogOptions::Save: + case QPlatformDialogHelper::Save: return QCoreApplication::translate("QPlatformTheme", "Save"); - case QMessageDialogOptions::SaveAll: + case QPlatformDialogHelper::SaveAll: return QCoreApplication::translate("QPlatformTheme", "Save All"); - case QMessageDialogOptions::Open: + case QPlatformDialogHelper::Open: return QCoreApplication::translate("QPlatformTheme", "Open"); - case QMessageDialogOptions::Yes: + case QPlatformDialogHelper::Yes: return QCoreApplication::translate("QPlatformTheme", "&Yes"); - case QMessageDialogOptions::YesToAll: + case QPlatformDialogHelper::YesToAll: return QCoreApplication::translate("QPlatformTheme", "Yes to &All"); - case QMessageDialogOptions::No: + case QPlatformDialogHelper::No: return QCoreApplication::translate("QPlatformTheme", "&No"); - case QMessageDialogOptions::NoToAll: + case QPlatformDialogHelper::NoToAll: return QCoreApplication::translate("QPlatformTheme", "N&o to All"); - case QMessageDialogOptions::Abort: + case QPlatformDialogHelper::Abort: return QCoreApplication::translate("QPlatformTheme", "Abort"); - case QMessageDialogOptions::Retry: + case QPlatformDialogHelper::Retry: return QCoreApplication::translate("QPlatformTheme", "Retry"); - case QMessageDialogOptions::Ignore: + case QPlatformDialogHelper::Ignore: return QCoreApplication::translate("QPlatformTheme", "Ignore"); - case QMessageDialogOptions::Close: + case QPlatformDialogHelper::Close: return QCoreApplication::translate("QPlatformTheme", "Close"); - case QMessageDialogOptions::Cancel: + case QPlatformDialogHelper::Cancel: return QCoreApplication::translate("QPlatformTheme", "Cancel"); - case QMessageDialogOptions::Discard: + case QPlatformDialogHelper::Discard: return QCoreApplication::translate("QPlatformTheme", "Discard"); - case QMessageDialogOptions::Help: + case QPlatformDialogHelper::Help: return QCoreApplication::translate("QPlatformTheme", "Help"); - case QMessageDialogOptions::Apply: + case QPlatformDialogHelper::Apply: return QCoreApplication::translate("QPlatformTheme", "Apply"); - case QMessageDialogOptions::Reset: + case QPlatformDialogHelper::Reset: return QCoreApplication::translate("QPlatformTheme", "Reset"); - case QMessageDialogOptions::RestoreDefaults: + case QPlatformDialogHelper::RestoreDefaults: return QCoreApplication::translate("QPlatformTheme", "Restore Defaults"); default: break; |