Namespace a few missing Objective-C categories and their methods
Fixes: QTBUG-100059 Pick-to: 6.2 6.3 Change-Id: I7579c9ee027de6a133a8b5d95d8e56829e089dab Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
7c9c195235
commit
7ccc333d77
|
|
@ -113,6 +113,9 @@ kern_return_t IOObjectRelease(io_object_t object);
|
|||
Q_FORWARD_DECLARE_OBJC_CLASS(NSObject);
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(NSString);
|
||||
|
||||
// @compatibility_alias doesn't work with categories or their methods
|
||||
#define QtExtras QT_MANGLE_NAMESPACE(QtExtras)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
template <typename T, typename U, auto RetainFunction, auto ReleaseFunction>
|
||||
class QAppleRefCounted
|
||||
|
|
|
|||
|
|
@ -72,6 +72,11 @@ Q_GUI_EXPORT CGBitmapInfo qt_mac_bitmapInfoForImage(const QImage &image);
|
|||
Q_GUI_EXPORT QPixmap qt_mac_toQPixmap(const NSImage *image, const QSizeF &size);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
// @compatibility_alias doesn't work with categories or their methods
|
||||
#define imageFromQImage QT_MANGLE_NAMESPACE(imageFromQImage)
|
||||
#define imageFromQIcon QT_MANGLE_NAMESPACE(imageFromQIcon)
|
||||
|
||||
@interface NSImage (QtExtras)
|
||||
+ (instancetype)imageFromQImage:(const QT_PREPEND_NAMESPACE(QImage) &)image;
|
||||
+ (instancetype)imageFromQIcon:(const QT_PREPEND_NAMESPACE(QIcon) &)icon;
|
||||
|
|
|
|||
|
|
@ -143,6 +143,10 @@ QDebug operator<<(QDebug debug, const QCocoaScreen *screen);
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#if defined(__OBJC__)
|
||||
|
||||
// @compatibility_alias doesn't work with categories or their methods
|
||||
#define qt_displayId QT_MANGLE_NAMESPACE(qt_displayId)
|
||||
|
||||
@interface NSScreen (QtExtras)
|
||||
@property(readonly) CGDirectDisplayID qt_displayId;
|
||||
@end
|
||||
|
|
|
|||
Loading…
Reference in New Issue