From 68878dfa38f3b5c099fccf71828207712570fdbf Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Tue, 28 Aug 2018 11:37:31 +0300 Subject: Add changes file for Qt 5.11.2 Change-Id: Ibedebdf477443215478a92b6c0cdb52000cd2c4c Reviewed-by: Eskil Abrahamsen Blomfeldt --- dist/changes-5.11.2 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 dist/changes-5.11.2 diff --git a/dist/changes-5.11.2 b/dist/changes-5.11.2 new file mode 100644 index 0000000..8efdf5e --- /dev/null +++ b/dist/changes-5.11.2 @@ -0,0 +1,24 @@ +Qt 5.11.2 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.11.0 through 5.11.1. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.11 series is binary compatible with the 5.10.x series. +Applications compiled for 5.10 will continue to run with 5.11. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt 5.11.2 Changes * +**************************************************************************** + + - This release contains only minor code improvements. -- cgit v1.2.3 From 34a0f1fd7579a70c9d8916754e8201308a29f21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 12 Sep 2018 13:11:33 +0200 Subject: Deprecate APIs where other alternatives are preferred Some of the APIs in this module now have APIs in other parts of Qt, more closely tied to the classes they convert back and forth from. Other APIs have native equivalents that are just as simple as the Qt wrapper, and we want people to use the native APIs since that scales better, and teaches users that they can mix native and Qt APIs. Change-Id: Id587cefe3ab8bee9f7d3e7dc4cb223882d57d325 Reviewed-by: Timur Pocheptsov --- src/macextras/qmacfunctions.h | 28 +++++++++++++++++++++------- src/macextras/qmacfunctions.mm | 2 ++ src/macextras/qmacfunctions_ios.mm | 2 ++ src/macextras/qmacfunctions_mac.mm | 4 ++++ src/macextras/qmactoolbaritem.mm | 3 ++- 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/macextras/qmacfunctions.h b/src/macextras/qmacfunctions.h index ccdbd6e..88be13c 100644 --- a/src/macextras/qmacfunctions.h +++ b/src/macextras/qmacfunctions.h @@ -65,20 +65,32 @@ class QWindow; namespace QtMac { #if QT_DEPRECATED_SINCE(5,3) -QT_DEPRECATED Q_MACEXTRAS_EXPORT NSData *toNSData(const QByteArray &data); -QT_DEPRECATED Q_MACEXTRAS_EXPORT QByteArray fromNSData(const NSData *data); +QT_DEPRECATED_X("Use QByteArray::toNSData") Q_MACEXTRAS_EXPORT NSData *toNSData(const QByteArray &data); +QT_DEPRECATED_X("Use QByteArray::fromNSData") Q_MACEXTRAS_EXPORT QByteArray fromNSData(const NSData *data); #endif -Q_MACEXTRAS_EXPORT CGImageRef toCGImageRef(const QPixmap &pixmap); +#if QT_DEPRECATED_SINCE(5, 12) +QT_DEPRECATED_X("Use QPixmap::toImage and QImage::toCGImage") Q_MACEXTRAS_EXPORT CGImageRef toCGImageRef(const QPixmap &pixmap); +#endif Q_MACEXTRAS_EXPORT QPixmap fromCGImageRef(CGImageRef image); +#if QT_DEPRECATED_SINCE(5, 12) +# if defined(QT_PLATFORM_UIKIT) +QT_DEPRECATED_X("Use UIGraphicsGetCurrentContext()") +# else +QT_DEPRECATED_X("Use NSGraphicsContext.currentContext.CGContext") +# endif Q_MACEXTRAS_EXPORT CGContextRef currentCGContext(); +#endif #ifdef Q_OS_OSX -Q_MACEXTRAS_EXPORT void setBadgeLabelText(const QString &text); -Q_MACEXTRAS_EXPORT QString badgeLabelText(); +#if QT_DEPRECATED_SINCE(5, 12) +QT_DEPRECATED_X("Use NSApp.dockTile.badgeLabel") Q_MACEXTRAS_EXPORT void setBadgeLabelText(const QString &text); +QT_DEPRECATED_X("Use NSApp.dockTile.badgeLabel") Q_MACEXTRAS_EXPORT QString badgeLabelText(); +QT_DEPRECATED_X("Use QPixmap::toImage, QImage::toCGImage, and -[NSImage initWithCGImage:size:]") Q_MACEXTRAS_EXPORT NSImage *toNSImage(const QPixmap &pixmap); +#endif #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) Q_MACEXTRAS_EXPORT bool isMainWindow(QWindow *window); @@ -86,8 +98,10 @@ Q_MACEXTRAS_EXPORT bool isMainWindow(QWindow *window); #endif // Q_OS_OSX #if defined(QT_PLATFORM_UIKIT) && !defined(Q_OS_WATCHOS) -Q_MACEXTRAS_EXPORT void setApplicationIconBadgeNumber(int number) __attribute__((availability(ios_app_extension,unavailable))); -Q_MACEXTRAS_EXPORT int applicationIconBadgeNumber() __attribute__((availability(ios_app_extension,unavailable))); +#if QT_DEPRECATED_SINCE(5, 12) +QT_DEPRECATED_X("Use UIApplication.sharedApplication.applicationIconBadgeNumber") Q_MACEXTRAS_EXPORT void setApplicationIconBadgeNumber(int number) __attribute__((availability(ios_app_extension,unavailable))); +QT_DEPRECATED_X("Use UIApplication.sharedApplication.applicationIconBadgeNumber") Q_MACEXTRAS_EXPORT int applicationIconBadgeNumber() __attribute__((availability(ios_app_extension,unavailable))); +#endif #endif // defined(QT_PLATFORM_UIKIT) && !defined(Q_OS_WATCHOS) } diff --git a/src/macextras/qmacfunctions.mm b/src/macextras/qmacfunctions.mm index 1171598..60cb733 100644 --- a/src/macextras/qmacfunctions.mm +++ b/src/macextras/qmacfunctions.mm @@ -98,6 +98,7 @@ QByteArray fromNSData(const NSData *data) } #endif // QT_DEPRECATED_SINCE +#if QT_DEPRECATED_SINCE(5, 12) /*! \fn CGImageRef QtMac::toCGImageRef(const QPixmap &pixmap) @@ -124,6 +125,7 @@ CGImageRef toCGImageRef(const QPixmap &pixmap) return pixmap.toCGImageRef(); #endif } +#endif /*! \fn QPixmap QtMac::fromCGImageRef(CGImageRef image) diff --git a/src/macextras/qmacfunctions_ios.mm b/src/macextras/qmacfunctions_ios.mm index f2b8e57..0aaada8 100644 --- a/src/macextras/qmacfunctions_ios.mm +++ b/src/macextras/qmacfunctions_ios.mm @@ -47,6 +47,7 @@ QT_BEGIN_NAMESPACE namespace QtMac { +#if QT_DEPRECATED_SINCE(5, 12) CGContextRef currentCGContext() { return UIGraphicsGetCurrentContext(); @@ -77,6 +78,7 @@ int applicationIconBadgeNumber() { return [[UIApplication sharedApplication] applicationIconBadgeNumber]; } +#endif } // namespace QtMac diff --git a/src/macextras/qmacfunctions_mac.mm b/src/macextras/qmacfunctions_mac.mm index 076f269..2e66e23 100644 --- a/src/macextras/qmacfunctions_mac.mm +++ b/src/macextras/qmacfunctions_mac.mm @@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE namespace QtMac { +#if QT_DEPRECATED_SINCE(5, 12) /*! \fn NSImage* QtMac::toNSImage(const QPixmap &pixmap) @@ -77,6 +78,7 @@ NSImage* toNSImage(const QPixmap &pixmap) CFRelease(cgimage); return image; } +#endif #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) /*! @@ -95,6 +97,7 @@ bool isMainWindow(QWindow *window) } #endif +#if QT_DEPRECATED_SINCE(5, 12) CGContextRef currentCGContext() { return reinterpret_cast([[NSGraphicsContext currentContext] graphicsPort]); @@ -125,6 +128,7 @@ QString badgeLabelText() { return QString::fromNSString([[[NSApplication sharedApplication] dockTile] badgeLabel]); } +#endif } // namespace QtMac diff --git a/src/macextras/qmactoolbaritem.mm b/src/macextras/qmactoolbaritem.mm index b215bd8..3bb3a5a 100644 --- a/src/macextras/qmactoolbaritem.mm +++ b/src/macextras/qmactoolbaritem.mm @@ -169,7 +169,8 @@ void QMacToolBarItem::setIcon(const QIcon &icon) return; if (pixmap.isNull() == false) { - [d->toolbarItem setImage: QtMac::toNSImage(pixmap)]; + NSImage *image = [[NSImage alloc] initWithCGImage:pixmap.toImage().toCGImage() size:NSZeroSize]; + d->toolbarItem.image = [image autorelease]; } } -- cgit v1.2.3 From b8b7809d2a08c190f493393119626c53da13094a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 12 Sep 2018 13:24:14 +0200 Subject: Remove Q_FORWARD_DECLARE_OBJC_CLASS macro It's been in QtCore for a long time now. Change-Id: Ie861cce8b03c759311561f972c01970c5d859839 Reviewed-by: Timur Pocheptsov --- src/macextras/qmacextrasglobal.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/macextras/qmacextrasglobal.h b/src/macextras/qmacextrasglobal.h index 86ad534..af0f0c4 100644 --- a/src/macextras/qmacextrasglobal.h +++ b/src/macextras/qmacextrasglobal.h @@ -50,23 +50,6 @@ QT_BEGIN_NAMESPACE # define Q_MACEXTRAS_EXPORT Q_DECL_IMPORT #endif - -// ### remove when merged to QtCore -/*! - * \macro Q_FORWARD_DECLARE_OBJC_CLASS(classname) - * - * Forward-declares an Objective-C class name in a manner such that it can be - * compiled as either Objective-C or C++. - * - * This is primarily intended for use in header files that may be included by - * both Objective-C and C++ source files. - */ -#ifdef __OBJC__ -#define Q_FORWARD_DECLARE_OBJC_CLASS(classname) @class classname -#else -#define Q_FORWARD_DECLARE_OBJC_CLASS(classname) typedef struct objc_object classname -#endif - QT_END_NAMESPACE #endif // QMACEXTRASGLOBAL_H -- cgit v1.2.3