diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-05-13 16:40:19 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-06-05 00:03:51 +0200 |
commit | df2e029a06f065c82dacc28ec885b4307260b6fb (patch) | |
tree | 7c1c8f334c9036c0b5438c944fce1b205b962293 /src/plugins/platforms/cocoa/qcocoahelpers.h | |
parent | c7d80486dee44c096ba993cbda8f69612441a264 (diff) |
macOS: Clean up headers
The headers are now C++ clean and can be used outside of Objective-C
code. All includes of Objective-C frameworks have been moved to the
implementation files.
Header guards have been added in the few places they were missing.
All includes are now done via #include, instead of sometimes using
the #import variant.
Change-Id: Ibb0a9c0bcfefbda4347737212e40e300a3184982
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoahelpers.h')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoahelpers.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.h b/src/plugins/platforms/cocoa/qcocoahelpers.h index 71e72dca4f..2e84abd739 100644 --- a/src/plugins/platforms/cocoa/qcocoahelpers.h +++ b/src/plugins/platforms/cocoa/qcocoahelpers.h @@ -51,8 +51,6 @@ // We mean it. // -#include <AppKit/AppKit.h> - #include <private/qguiapplication_p.h> #include <QtCore/qoperatingsystemversion.h> #include <QtCore/qloggingcategory.h> @@ -62,6 +60,8 @@ #include <objc/runtime.h> #include <objc/message.h> +#if defined(__OBJC__) + Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSView)); struct mach_header; @@ -377,5 +377,7 @@ QSendSuperHelper<Args...> qt_objcDynamicSuperHelper(id receiver, SEL selector, A // Same as calling super, but the super_class field resolved at runtime instead of compile time #define qt_objcDynamicSuper(...) qt_objcDynamicSuperHelper(self, _cmd, ##__VA_ARGS__) +#endif // __OBJC__ + #endif //QCOCOAHELPERS_H |