diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-08-09 15:27:08 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-08-09 15:27:08 +0200 |
commit | 5530d609962ef71de97f4ba6165e724fe5c2bbe4 (patch) | |
tree | 1779625729698e827f2c223ccd5eb6d55a84de83 | |
parent | 0be11fe84b46dc189cfa642eece3b06dc1eb215d (diff) | |
parent | c128aac34295dd57bb1d20ff9fe4b08881982c61 (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: I74a3560d17364ac8bab4716b9df85a4d96ab5244
-rw-r--r-- | src/macextras/qmacfunctions.h | 2 | ||||
-rw-r--r-- | src/macextras/qmacfunctions.mm | 17 | ||||
-rw-r--r-- | src/macextras/qmacfunctions_ios.mm | 9 | ||||
-rw-r--r-- | src/macextras/qmacfunctions_mac.mm | 19 | ||||
-rw-r--r-- | src/macextras/qmacpasteboardmime.h | 9 | ||||
-rw-r--r-- | src/macextras/qmactoolbar.h | 4 | ||||
-rw-r--r-- | src/macextras/qmactoolbar.mm | 2 | ||||
-rw-r--r-- | src/macextras/qmactoolbaritem.h | 2 |
8 files changed, 44 insertions, 20 deletions
diff --git a/src/macextras/qmacfunctions.h b/src/macextras/qmacfunctions.h index 7faf36c..c29f67a 100644 --- a/src/macextras/qmacfunctions.h +++ b/src/macextras/qmacfunctions.h @@ -38,7 +38,7 @@ #pragma qt_class(QtMac) #endif -#include "QtMacExtras/qmacextrasglobal.h" +#include <QtMacExtras/qmacextrasglobal.h> typedef struct CGImage *CGImageRef; typedef struct CGContext *CGContextRef; diff --git a/src/macextras/qmacfunctions.mm b/src/macextras/qmacfunctions.mm index 8305ecc..5758cbb 100644 --- a/src/macextras/qmacfunctions.mm +++ b/src/macextras/qmacfunctions.mm @@ -52,15 +52,23 @@ QT_BEGIN_NAMESPACE \namespace QtMac \inmodule QtMacExtras \since 5.2 - \brief The QtMac namespace contains miscellaneous functionality specific to the OS X operating system. + \brief The QtMac namespace contains miscellaneous functionality specific to the OS X and iOS operating systems. \inheaderfile QtMac */ + +/*! + \fn CGContextRef QtMac::currentCGContext() + + Returns the current CoreGraphics context. +*/ + namespace QtMac { #if QT_DEPRECATED_SINCE(5,3) /*! \obsolete + \fn NSData* QtMac::toNSData(const QByteArray &data) Use QByteArray::toNSData() instead. */ @@ -71,6 +79,7 @@ NSData* toNSData(const QByteArray &data) /*! \obsolete + \fn QByteArray QtMac::fromNSData(const NSData *data) Use QByteArray::fromNSData() instead. */ @@ -84,7 +93,9 @@ QByteArray fromNSData(const NSData *data) #endif // QT_DEPRECATED_SINCE /*! - Creates a \c CGImageRef equivalent to the QPixmap. Returns the \c CGImageRef handle. + \fn CGImageRef QtMac::toCGImageRef(const QPixmap &pixmap) + + Creates a \c CGImageRef equivalent to the QPixmap \a pixmap. Returns the \c CGImageRef handle. It is the caller's responsibility to release the \c CGImageRef data after use. @@ -109,6 +120,8 @@ CGImageRef toCGImageRef(const QPixmap &pixmap) } /*! + \fn QPixmap QtMac::fromCGImageRef(CGImageRef image) + Returns a QPixmap that is equivalent to the given \a image. This function is not available in Qt 5.x until 5.0.2 and will return a null pixmap in earlier versions. diff --git a/src/macextras/qmacfunctions_ios.mm b/src/macextras/qmacfunctions_ios.mm index 14b1cba..fe376a1 100644 --- a/src/macextras/qmacfunctions_ios.mm +++ b/src/macextras/qmacfunctions_ios.mm @@ -41,16 +41,15 @@ QT_BEGIN_NAMESPACE namespace QtMac { -/*! - Returns the current CoreGraphics context. -*/ CGContextRef currentCGContext() { return UIGraphicsGetCurrentContext(); } /*! - Sets the value shown on the application icon a.k.a badge. + \fn void QtMac::setApplicationIconBadgeNumber(int number) + + Sets the value shown on the application icon a.k.a badge to \a number. Unlike its OS X counterpart, only numbers can be used. @@ -62,6 +61,8 @@ void setApplicationIconBadgeNumber(int number) } /*! + \fn int QtMac::applicationIconBadgeNumber() + Returns the value of the application icon a.k.a badge. \sa setApplicationIconBadgeNumber(), badgeLabelText() diff --git a/src/macextras/qmacfunctions_mac.mm b/src/macextras/qmacfunctions_mac.mm index 99515c1..6f471ad 100644 --- a/src/macextras/qmacfunctions_mac.mm +++ b/src/macextras/qmacfunctions_mac.mm @@ -52,7 +52,9 @@ namespace QtMac { /*! - Creates an \c NSImage equivalent to the QPixmap. Returns the \c NSImage handle. + \fn NSImage* QtMac::toNSImage(const QPixmap &pixmap) + + Creates an \c NSImage equivalent to the QPixmap \a pixmap. Returns the \c NSImage handle. It is the caller's responsibility to release the \c NSImage data after use. @@ -72,7 +74,9 @@ NSImage* toNSImage(const QPixmap &pixmap) #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) /*! - Returns whether the given QWindow is the application's main window + \fn bool QtMac::isMainWindow(QWindow *window) + + Returns whether the given QWindow \a window is the application's main window */ bool isMainWindow(QWindow *window) { @@ -85,16 +89,15 @@ bool isMainWindow(QWindow *window) } #endif -/*! - Returns the current CoreGraphics context. -*/ CGContextRef currentCGContext() { return reinterpret_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]); } /*! - Sets the text shown on the application icon a.k.a badge. + \fn void QtMac::setBadgeLabelText(const QString &text) + + Sets the \a text shown on the application icon a.k.a badge. This is generally used with numbers (e.g. number of unread emails); it can also show a string. @@ -106,9 +109,11 @@ void setBadgeLabelText(const QString &text) } /*! + \fn QString QtMac::badgeLabelText() + Returns the text of the application icon a.k.a badge. - \sa setBadgeText() + \sa setBadgeLabelText() */ QString badgeLabelText() { diff --git a/src/macextras/qmacpasteboardmime.h b/src/macextras/qmacpasteboardmime.h index dcf4dbd..2702b38 100644 --- a/src/macextras/qmacpasteboardmime.h +++ b/src/macextras/qmacpasteboardmime.h @@ -34,9 +34,14 @@ #if !defined(QMACMIME_H) && !defined(QMIME_H) #define QMACMIME_H -#include "QtMacExtras/qmacextrasglobal.h" +#include <QtMacExtras/qmacextrasglobal.h> -#include <QtCore> +#include <QtCore/QString> +#include <QtCore/QStringList> +#include <QtCore/QByteArray> +#include <QtCore/QList> +#include <QtCore/QVariant> +#include <QtCore/QMimeData> #include <CoreFoundation/CoreFoundation.h> diff --git a/src/macextras/qmactoolbar.h b/src/macextras/qmactoolbar.h index 7389e52..9f5b52a 100644 --- a/src/macextras/qmactoolbar.h +++ b/src/macextras/qmactoolbar.h @@ -34,8 +34,8 @@ #ifndef QMACTOOLBAR_H #define QMACTOOLBAR_H -#include "qmacextrasglobal.h" -#include "qmactoolbaritem.h" +#include <QtMacExtras/qmacextrasglobal.h> +#include <QtMacExtras/qmactoolbaritem.h> #include <QtCore/QString> #include <QtCore/QObject> diff --git a/src/macextras/qmactoolbar.mm b/src/macextras/qmactoolbar.mm index 7e11c62..5c05876 100644 --- a/src/macextras/qmactoolbar.mm +++ b/src/macextras/qmactoolbar.mm @@ -196,7 +196,7 @@ QList<QMacToolBarItem *> QMacToolBar::items() } /*! - Sets the list of toolbar items shown on the the toolbar customization menu. + Sets the list of toolbar items shown on the toolbar customization menu to \a allowedItems. */ void QMacToolBar::setAllowedItems(QList<QMacToolBarItem *> &allowedItems) { diff --git a/src/macextras/qmactoolbaritem.h b/src/macextras/qmactoolbaritem.h index e2d3c84..6b73ced 100644 --- a/src/macextras/qmactoolbaritem.h +++ b/src/macextras/qmactoolbaritem.h @@ -38,7 +38,7 @@ #include <QtCore/QString> #include <QtGui/QIcon> -#include "qmacextrasglobal.h" +#include <QtMacExtras/qmacextrasglobal.h> Q_FORWARD_DECLARE_OBJC_CLASS(NSToolbarItem); |