summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-02-07 14:04:37 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-15 10:43:20 +0100
commit760a771fce3758fe34b1f3ce8a22f283bb24b326 (patch)
treefacfdedcfe17c21c8ae2de061ea79f6ff60f3fe1 /src/platformsupport
parentf8dbed12266c42785c1e4758eed05833ec035f33 (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/platformsupport')
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
index c72815ca1b..4a1d67f4b5 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
@@ -408,7 +408,7 @@ QVariant QKdeTheme::themeHint(QPlatformTheme::ThemeHint hint) const
case QPlatformTheme::DialogButtonBoxButtonsHaveIcons:
return QVariant(true);
case QPlatformTheme::DialogButtonBoxLayout:
- return QVariant(2); // QDialogButtonBox::KdeLayout
+ return QVariant(QPlatformDialogHelper::KdeLayout);
case QPlatformTheme::ToolButtonStyle:
return QVariant(d->toolButtonStyle);
case QPlatformTheme::ToolBarIconSize:
@@ -504,7 +504,7 @@ QVariant QGnomeTheme::themeHint(QPlatformTheme::ThemeHint hint) const
case QPlatformTheme::DialogButtonBoxButtonsHaveIcons:
return QVariant(true);
case QPlatformTheme::DialogButtonBoxLayout:
- return QVariant(3); // QDialogButtonBox::GnomeLayout
+ return QVariant(QPlatformDialogHelper::GnomeLayout);
case QPlatformTheme::SystemIconThemeName:
case QPlatformTheme::SystemIconFallbackThemeName:
return QVariant(QString(QStringLiteral("gnome")));
@@ -541,15 +541,15 @@ const QFont *QGnomeTheme::font(Font type) const
QString QGnomeTheme::standardButtonText(int button) const
{
switch (button) {
- case QMessageDialogOptions::Ok:
+ case QPlatformDialogHelper::Ok:
return QCoreApplication::translate("QGnomeTheme", "&OK");
- case QMessageDialogOptions::Save:
+ case QPlatformDialogHelper::Save:
return QCoreApplication::translate("QGnomeTheme", "&Save");
- case QMessageDialogOptions::Cancel:
+ case QPlatformDialogHelper::Cancel:
return QCoreApplication::translate("QGnomeTheme", "&Cancel");
- case QMessageDialogOptions::QMessageDialogOptions::Close:
+ case QPlatformDialogHelper::Close:
return QCoreApplication::translate("QGnomeTheme", "&Close");
- case QMessageDialogOptions::Discard:
+ case QPlatformDialogHelper::Discard:
return QCoreApplication::translate("QGnomeTheme", "Close without Saving");
default:
break;