aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2013-04-12 21:32:16 -0400
committerJake Petroules <jake.petroules@petroules.com>2013-04-15 14:51:21 +0200
commit89a235e53a70174d9d9493be5891df9df3ce742d (patch)
treee41a614642df0345f0a566b9f66d9fafca65001d /src
parenta42a41d9049d660c26a76d5433e26d01b8e41911 (diff)
Remove the now-unnecessary "Mac" infixes from namespaced functions.
Change-Id: I9dc0730a837ed091de6285f1b6f8b014f762a921 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/macextras/qmacfunctions.h7
-rw-r--r--src/macextras/qmacfunctions.mm16
-rw-r--r--src/macextras/qmactoolbardelegate.mm2
3 files changed, 12 insertions, 13 deletions
diff --git a/src/macextras/qmacfunctions.h b/src/macextras/qmacfunctions.h
index e2dc048..76a09e9 100644
--- a/src/macextras/qmacfunctions.h
+++ b/src/macextras/qmacfunctions.h
@@ -76,14 +76,13 @@ namespace QtMacExtras
{
Q_MACEXTRAS_EXPORT NSString* toNSString(const QString &string);
Q_MACEXTRAS_EXPORT QString fromNSString(const NSString *string);
-Q_MACEXTRAS_EXPORT CGImageRef toMacCGImageRef(const QPixmap &pixmap);
-Q_MACEXTRAS_EXPORT QPixmap fromMacCGImageRef(CGImageRef image);
+Q_MACEXTRAS_EXPORT CGImageRef toCGImageRef(const QPixmap &pixmap);
+Q_MACEXTRAS_EXPORT QPixmap fromCGImageRef(CGImageRef image);
#ifndef Q_OS_IOS
Q_MACEXTRAS_EXPORT NSMenu* toNSMenu(QMenu *menu);
Q_MACEXTRAS_EXPORT NSMenu *toNSMenu(QMenuBar *menubar);
-Q_MACEXTRAS_EXPORT NSImage* toMacNSImage(const QPixmap &pixmap);
-Q_MACEXTRAS_EXPORT NSImage* toMacNSImage(const QPixmap &pixmap);
+Q_MACEXTRAS_EXPORT NSImage* toNSImage(const QPixmap &pixmap);
#endif
}
diff --git a/src/macextras/qmacfunctions.mm b/src/macextras/qmacfunctions.mm
index 3065b6f..c3a5bb5 100644
--- a/src/macextras/qmacfunctions.mm
+++ b/src/macextras/qmacfunctions.mm
@@ -141,9 +141,9 @@ QString fromNSString(const NSString *string)
This function is not available in Qt 5.x until 5.0.2 and will return NULL in earlier versions.
- \sa fromMacCGImageRef()
+ \sa fromCGImageRef()
*/
-CGImageRef toMacCGImageRef(const QPixmap &pixmap)
+CGImageRef toCGImageRef(const QPixmap &pixmap)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QPlatformNativeInterface::NativeResourceForIntegrationFunction function = resolvePlatformFunction("qimagetocgimage");
@@ -154,14 +154,14 @@ CGImageRef toMacCGImageRef(const QPixmap &pixmap)
return NULL;
#else
- return pixmap.toMacCGImageRef();
+ return pixmap.toCGImageRef();
#endif
}
#ifndef Q_OS_IOS
-NSImage* toMacNSImage(const QPixmap &pixmap)
+NSImage* toNSImage(const QPixmap &pixmap)
{
- NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage:toMacCGImageRef(pixmap)];
+ NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage:toCGImageRef(pixmap)];
NSImage *image = [[NSImage alloc] init];
[image addRepresentation:bitmapRep];
[bitmapRep release];
@@ -174,9 +174,9 @@ NSImage* toMacNSImage(const QPixmap &pixmap)
This function is not available in Qt 5.x until 5.0.2 and will return a null pixmap in earlier versions.
- \sa toMacCGImageRef(), {QPixmap#Pixmap Conversion}{Pixmap Conversion}
+ \sa toCGImageRef(), {QPixmap#Pixmap Conversion}{Pixmap Conversion}
*/
-QPixmap fromMacCGImageRef(CGImageRef image)
+QPixmap fromCGImageRef(CGImageRef image)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QPlatformNativeInterface::NativeResourceForIntegrationFunction function = resolvePlatformFunction("cgimagetoqimage");
@@ -187,7 +187,7 @@ QPixmap fromMacCGImageRef(CGImageRef image)
return QPixmap();
#else
- return QPixmap::fromMacCGImageRef(image);
+ return QPixmap::fromCGImageRef(image);
#endif
}
diff --git a/src/macextras/qmactoolbardelegate.mm b/src/macextras/qmactoolbardelegate.mm
index 6b3c3d5..535bc52 100644
--- a/src/macextras/qmactoolbardelegate.mm
+++ b/src/macextras/qmactoolbardelegate.mm
@@ -134,7 +134,7 @@ QString qt_strippedText(QString s)
QPixmap icon = toolButton->m_action->icon().pixmap(64, 64);
if (icon.isNull() == false) {
- [toolbarItem setImage : QtMacExtras::toMacNSImage(icon)];
+ [toolbarItem setImage : QtMacExtras::toNSImage(icon)];
}
[toolbarItem setTarget : self];