diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qplatformdialoghelper.cpp | 17 | ||||
-rw-r--r-- | src/gui/kernel/qplatformdialoghelper.h | 1 | ||||
-rw-r--r-- | src/gui/kernel/qplatformtheme.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qplatformtheme.h | 3 |
4 files changed, 8 insertions, 18 deletions
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp index 74442736c3..d9e9c4b17c 100644 --- a/src/gui/kernel/qplatformdialoghelper.cpp +++ b/src/gui/kernel/qplatformdialoghelper.cpp @@ -60,18 +60,6 @@ QT_BEGIN_NAMESPACE */ -/*! - \enum QPlatformDialogHelper::StyleHint - - This enum type specifies platform-specific style hints. - - \value SnapToDefaultButton Snap the mouse to the center of the default - button. There is corresponding system - setting on Windows. - - \sa styleHint() -*/ - QPlatformDialogHelper::QPlatformDialogHelper() { } @@ -87,10 +75,7 @@ QVariant QPlatformDialogHelper::styleHint(StyleHint hint) const QVariant QPlatformDialogHelper::defaultStyleHint(QPlatformDialogHelper::StyleHint hint) { - switch (hint) { - case QPlatformDialogHelper::SnapToDefaultButton: - return QVariant(false); - } + Q_UNUSED(hint); return QVariant(); } diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h index 092839aaed..6d7d52ccb1 100644 --- a/src/gui/kernel/qplatformdialoghelper.h +++ b/src/gui/kernel/qplatformdialoghelper.h @@ -78,7 +78,6 @@ class Q_GUI_EXPORT QPlatformDialogHelper : public QObject Q_OBJECT public: enum StyleHint { - SnapToDefaultButton }; enum DialogCode { Rejected, Accepted }; diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp index 5c3673890a..18ac9dc088 100644 --- a/src/gui/kernel/qplatformtheme.cpp +++ b/src/gui/kernel/qplatformtheme.cpp @@ -138,6 +138,9 @@ QT_BEGIN_NAMESPACE \value TabAllWidgets (bool) Whether tab navigation should go through all the widgets or components, or just through text boxes and list views. This is mostly a Mac feature. + \value DialogSnapToDefaultButton (bool) Whether the mouse should snap to the default button when a dialog + becomes visible. + \sa themeHint(), QStyle::pixelMetric() */ @@ -455,6 +458,8 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint) return QVariant(true); case IconPixmapSizes: return QVariant::fromValue(QList<int>()); + case DialogSnapToDefaultButton: + return QVariant(false); } return QVariant(); } diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h index fd2bb19f2a..3eb103b7e0 100644 --- a/src/gui/kernel/qplatformtheme.h +++ b/src/gui/kernel/qplatformtheme.h @@ -105,7 +105,8 @@ public: SpellCheckUnderlineStyle, TabAllWidgets, IconPixmapSizes, - PasswordMaskCharacter + PasswordMaskCharacter, + DialogSnapToDefaultButton }; enum DialogType { |