summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaservices.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-12-01 10:01:10 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-12-02 11:21:59 +0100
commit9590ed6ba6dfc565832acddb69c69a3c8bf5e2e6 (patch)
tree379595cde265c14fcbc57cb7bf055b65c0699d93 /src/plugins/platforms/cocoa/qcocoaservices.h
parent1202594db6b8b5ec801989d06004c39b725a67a0 (diff)
macOS: Implement QPlatformServiceColorPicker via NSColorSampler
The default behavior for QColorDialog is to use the native dialog, but for clients that implement their own color dialog we should provide the plumbing to do the actual color picking. The fallback path for this on macOS involves grabbing the screen, which brings up the permission dialog. The NSColorSampler API does not have this issue. [ChangeLog][macOS] Non native color dialogs now use native color picking when picking colors from the screen. Pick-to: 6.6 Change-Id: Idd08a90a3747546fd9825431ab7a4f5b5fa40784 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaservices.h')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaservices.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaservices.h b/src/plugins/platforms/cocoa/qcocoaservices.h
index 20d9b67760..a0aec6f16b 100644
--- a/src/plugins/platforms/cocoa/qcocoaservices.h
+++ b/src/plugins/platforms/cocoa/qcocoaservices.h
@@ -11,8 +11,12 @@ QT_BEGIN_NAMESPACE
class QCocoaServices : public QPlatformServices
{
public:
+ bool hasCapability(Capability capability) const override;
+
bool openUrl(const QUrl &url) override;
bool openDocument(const QUrl &url) override;
+
+ QPlatformServiceColorPicker *colorPicker(QWindow *parent) override;
};
QT_END_NAMESPACE