diff options
author | Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> | 2012-01-31 16:15:51 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-14 02:48:35 +0100 |
commit | 2907fbd8982203053a16a0cf8a6c4b72b2c61984 (patch) | |
tree | da0645311d547afe921a053616aa1bf42b7478d7 /src/plugins/platforms/cocoa/qcocoatheme.mm | |
parent | 647aa53d72ad15f39dea676b97f6b4b21f8c9143 (diff) |
Add QCocoaColor- and FontDialogHelper
Change-Id: Ie6e648e9e1f4ffbb34d73f9afdd6cc77e86bc3d1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoatheme.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoatheme.mm | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm index f0e58abebd..a23faf438d 100644 --- a/src/plugins/platforms/cocoa/qcocoatheme.mm +++ b/src/plugins/platforms/cocoa/qcocoatheme.mm @@ -42,8 +42,9 @@ #include "qcocoatheme.h" #include "qmenu_mac.h" +#include "qcocoacolordialoghelper.h" #include "qcocoafiledialoghelper.h" -#include <QtWidgets/QFileDialog> +#include "qcocoafontdialoghelper.h" QT_BEGIN_NAMESPACE @@ -72,15 +73,33 @@ bool QCocoaTheme::usePlatformNativeDialog(DialogType dialogType) const { if (dialogType == QPlatformTheme::FileDialog) return true; +#ifndef QT_NO_COLORDIALOG + if (dialogType == QPlatformTheme::ColorDialog) + return true; +#endif +#ifndef QT_NO_FONTDIALOG + if (dialogType == QPlatformTheme::FontDialog) + return true; +#endif return false; } QPlatformDialogHelper * QCocoaTheme::createPlatformDialogHelper(DialogType dialogType) const { - if (dialogType == QPlatformTheme::FileDialog) { + switch (dialogType) { + case QPlatformTheme::FileDialog: return new QCocoaFileDialogHelper(); +#ifndef QT_NO_COLORDIALOG + case QPlatformTheme::ColorDialog: + return new QCocoaColorDialogHelper(); +#endif +#ifndef QT_NO_FONTDIALOG + case QPlatformTheme::FontDialog: + return new QCocoaFontDialogHelper(); +#endif + default: + return 0; } - return 0; } QT_END_NAMESPACE |