diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-01-26 11:29:24 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-27 21:17:14 +0100 |
commit | 692a1babe53c342e9f5435517a1265765f77f676 (patch) | |
tree | 5383327f93a82fa8b183c1c27ec7efef2df2db99 /src/gui | |
parent | b3dda7c5bfcc22ebbd443c667dad58112ecddb4b (diff) |
Decouple QPlatformTheme from QDialog.
- Use an enumeration for the dialog type.
- Implemented on Windows and Mac
Reviewed-by: Morten Johan Sorvig <morten.sorvig@nokia.com>
Change-Id: I213748a08168efbabc2ac0106308e97ff19d19c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qplatformtheme_qpa.cpp | 8 | ||||
-rw-r--r-- | src/gui/kernel/qplatformtheme_qpa.h | 11 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/gui/kernel/qplatformtheme_qpa.cpp b/src/gui/kernel/qplatformtheme_qpa.cpp index 2f681e5cd4..e3cf637694 100644 --- a/src/gui/kernel/qplatformtheme_qpa.cpp +++ b/src/gui/kernel/qplatformtheme_qpa.cpp @@ -83,15 +83,15 @@ QPlatformMenuBar *QPlatformTheme::createPlatformMenuBar(QMenuBar *menuBar) const return 0; } -bool QPlatformTheme::usePlatformNativeDialog(const QDialog *dialog) const +bool QPlatformTheme::usePlatformNativeDialog(DialogType type) const { - Q_UNUSED(dialog); + Q_UNUSED(type); return false; } -QPlatformDialogHelper *QPlatformTheme::createPlatformDialogHelper(QDialog *dialog) const +QPlatformDialogHelper *QPlatformTheme::createPlatformDialogHelper(DialogType type) const { - Q_UNUSED(dialog); + Q_UNUSED(type); return 0; } diff --git a/src/gui/kernel/qplatformtheme_qpa.h b/src/gui/kernel/qplatformtheme_qpa.h index 42151a1270..215aa319fe 100644 --- a/src/gui/kernel/qplatformtheme_qpa.h +++ b/src/gui/kernel/qplatformtheme_qpa.h @@ -54,7 +54,6 @@ class QMenuBar; class QPlatformMenu; class QPlatformMenuBar; class QPlatformDialogHelper; -class QDialog; class QVariant; class Q_GUI_EXPORT QPlatformTheme @@ -66,11 +65,17 @@ public: MaximumScrollBarDragDistance }; + enum DialogType { + FileDialog, + ColorDialog, + FontDialog + }; + virtual QPlatformMenu *createPlatformMenu(QMenu *menu = 0) const; virtual QPlatformMenuBar *createPlatformMenuBar(QMenuBar *menuBar = 0) const; - virtual bool usePlatformNativeDialog(const QDialog *dialog = 0) const; - virtual QPlatformDialogHelper *createPlatformDialogHelper(QDialog *dialog = 0) const; + virtual bool usePlatformNativeDialog(DialogType type) const; + virtual QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const; virtual QVariant themeHint(ThemeHint hint) const; }; |