aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-09-12 12:45:04 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-13 10:10:11 +0200
commit1ef71fcdb15ac0b93751142629b4a2d1ab1e73c8 (patch)
treeb72643001c9df648219f86e1ae01ed15c5baa18f /src
parent17294c00272651e926d516f2891b5b2a5af6285f (diff)
Rename the QtMacExtras namespace to QtMac
Change-Id: If6a01685a9fc5ff59dd02dbeeef7e8682cefae39 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
Diffstat (limited to 'src')
-rw-r--r--src/macextras/qmacfunctions.h4
-rw-r--r--src/macextras/qmacfunctions.mm4
-rw-r--r--src/macextras/qmacfunctions_ios.mm4
-rw-r--r--src/macextras/qmacfunctions_mac.mm4
-rw-r--r--src/macextras/qmacnativetoolbar.h2
-rw-r--r--src/macextras/qmacnativetoolbar.mm12
-rw-r--r--src/macextras/qmactoolbardelegate.mm14
7 files changed, 22 insertions, 22 deletions
diff --git a/src/macextras/qmacfunctions.h b/src/macextras/qmacfunctions.h
index d5972d1..2f794a9 100644
--- a/src/macextras/qmacfunctions.h
+++ b/src/macextras/qmacfunctions.h
@@ -68,7 +68,7 @@ class QUrl;
class QWidget;
class QWindow;
-namespace QtMacExtras
+namespace QtMac
{
Q_MACEXTRAS_EXPORT NSString* toNSString(const QString &string);
Q_MACEXTRAS_EXPORT QString fromNSString(const NSString *string);
@@ -102,7 +102,7 @@ Q_MACEXTRAS_EXPORT bool isMainWindow(QWidget *widget);
#ifndef Q_OS_IOS
// ### Qt 4 compatibility; remove in Qt 6
-inline void qt_mac_set_dock_menu(QMenu *menu) { QtMacExtras::setDockMenu(menu); }
+inline void qt_mac_set_dock_menu(QMenu *menu) { QtMac::setDockMenu(menu); }
#endif
QT_END_NAMESPACE
diff --git a/src/macextras/qmacfunctions.mm b/src/macextras/qmacfunctions.mm
index 3d36c0f..d5a6dd8 100644
--- a/src/macextras/qmacfunctions.mm
+++ b/src/macextras/qmacfunctions.mm
@@ -51,7 +51,7 @@
QT_BEGIN_NAMESPACE
-namespace QtMacExtras
+namespace QtMac
{
NSString *toNSString(const QString &string)
@@ -141,6 +141,6 @@ QPixmap fromCGImageRef(CGImageRef image)
#endif
}
-} // namespace QtMacExtras
+} // namespace QtMac
QT_END_NAMESPACE
diff --git a/src/macextras/qmacfunctions_ios.mm b/src/macextras/qmacfunctions_ios.mm
index ae09e1f..2ea718f 100644
--- a/src/macextras/qmacfunctions_ios.mm
+++ b/src/macextras/qmacfunctions_ios.mm
@@ -45,7 +45,7 @@
QT_BEGIN_NAMESPACE
-namespace QtMacExtras
+namespace QtMac
{
CGContextRef currentCGContext()
@@ -53,6 +53,6 @@ CGContextRef currentCGContext()
return UIGraphicsGetCurrentContext();
}
-} // namespace QtMacExtras
+} // namespace QtMac
QT_END_NAMESPACE
diff --git a/src/macextras/qmacfunctions_mac.mm b/src/macextras/qmacfunctions_mac.mm
index 62949d3..bdb1cae 100644
--- a/src/macextras/qmacfunctions_mac.mm
+++ b/src/macextras/qmacfunctions_mac.mm
@@ -52,7 +52,7 @@
QT_BEGIN_NAMESPACE
-namespace QtMacExtras
+namespace QtMac
{
NSImage* toNSImage(const QPixmap &pixmap)
@@ -142,6 +142,6 @@ CGContextRef currentCGContext()
return reinterpret_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]);
}
-} // namespace QtMacExtras
+} // namespace QtMac
QT_END_NAMESPACE
diff --git a/src/macextras/qmacnativetoolbar.h b/src/macextras/qmacnativetoolbar.h
index 1ad9980..4c903cf 100644
--- a/src/macextras/qmacnativetoolbar.h
+++ b/src/macextras/qmacnativetoolbar.h
@@ -59,7 +59,7 @@ class QWidget;
class QMacNativeToolBar;
-namespace QtMacExtras
+namespace QtMac
{
Q_MACEXTRAS_EXPORT QMacNativeToolBar* setNativeToolBar(QToolBar *toolbar, bool on = true);
Q_MACEXTRAS_EXPORT QMacNativeToolBar* setNativeToolBar(QToolBar *toolbar, const QString &identifier, bool on = true);
diff --git a/src/macextras/qmacnativetoolbar.mm b/src/macextras/qmacnativetoolbar.mm
index 69fe7fe..f6b9020 100644
--- a/src/macextras/qmacnativetoolbar.mm
+++ b/src/macextras/qmacnativetoolbar.mm
@@ -142,7 +142,7 @@ public:
QMacNativeToolBarPrivate(QMacNativeToolBar *parent, const QString &identifier = QString())
{
qtToolbar = parent;
- toolbar = [[QtNSToolbar alloc] initWithIdentifier:QtMacExtras::toNSString(identifier.isEmpty() ? QUuid::createUuid().toString() : identifier)];
+ toolbar = [[QtNSToolbar alloc] initWithIdentifier:QtMac::toNSString(identifier.isEmpty() ? QUuid::createUuid().toString() : identifier)];
[toolbar setAutosavesConfiguration:NO];
delegate = [[QMacToolbarDelegate alloc] init];
@@ -190,12 +190,12 @@ public:
}
};
-QMacNativeToolBar* QtMacExtras::setNativeToolBar(QToolBar *toolbar, bool on)
+QMacNativeToolBar* QtMac::setNativeToolBar(QToolBar *toolbar, bool on)
{
- return QtMacExtras::setNativeToolBar(toolbar, QString(), on);
+ return QtMac::setNativeToolBar(toolbar, QString(), on);
}
-QMacNativeToolBar* QtMacExtras::setNativeToolBar(QToolBar *toolbar, const QString &identifier, bool on)
+QMacNativeToolBar* QtMac::setNativeToolBar(QToolBar *toolbar, const QString &identifier, bool on)
{
if (!toolbar)
{
@@ -271,7 +271,7 @@ QMacNativeToolBar *QMacNativeToolBar::fromQToolBar(const QToolBar *toolBar, cons
QString QMacNativeToolBar::identifier() const
{
- return QtMacExtras::fromNSString([d->toolbar identifier]);
+ return QtMac::fromNSString([d->toolbar identifier]);
}
bool QMacNativeToolBar::isVisible() const
@@ -479,7 +479,7 @@ QAction *QMacNativeToolBar::setSelectedItem(QAction *action)
{
if (toolButton->m_action && toolButton->m_action->isChecked())
{
- [d->toolbar setSelectedItemIdentifier:QtMacExtras::toNSString(QString::number(qulonglong(toolButton)))];
+ [d->toolbar setSelectedItemIdentifier:QtMac::toNSString(QString::number(qulonglong(toolButton)))];
break;
}
else
diff --git a/src/macextras/qmactoolbardelegate.mm b/src/macextras/qmactoolbardelegate.mm
index 43fcfe8..2a76e00 100644
--- a/src/macextras/qmactoolbardelegate.mm
+++ b/src/macextras/qmactoolbardelegate.mm
@@ -51,7 +51,7 @@ NSArray *toNSArray(const QList<QString> &stringList)
{
NSMutableArray *array = [[NSMutableArray alloc] init];
foreach (const QString &string, stringList) {
- [array addObject : QtMacExtras::toNSString(string)];
+ [array addObject : QtMac::toNSString(string)];
}
return array;
}
@@ -65,7 +65,7 @@ NSMutableArray *itemIdentifiers(const QList<QMacToolButton *> &items, bool cullU
if (cullUnselectable && item->selectable() == false)
continue;
if (item->standardItem() == QMacToolButton::NoItem) {
- [array addObject : QtMacExtras::toNSString(QString::number(qulonglong(item)))];
+ [array addObject : QtMac::toNSString(QString::number(qulonglong(item)))];
} else {
[array addObject : toNSStandardItem(item->standardItem())];
}
@@ -114,7 +114,7 @@ QString qt_strippedText(QString s)
- (IBAction)itemClicked:(id)sender
{
NSToolbarItem *item = reinterpret_cast<NSToolbarItem *>(sender);
- QString identifier = QtMacExtras::fromNSString([item itemIdentifier]);
+ QString identifier = QtMac::fromNSString([item itemIdentifier]);
QMacToolButton *toolButton = reinterpret_cast<QMacToolButton *>(identifier.toULongLong());
if (toolButton->m_action) {
toolButton->m_action->trigger();
@@ -126,17 +126,17 @@ QString qt_strippedText(QString s)
{
Q_UNUSED(toolbar);
Q_UNUSED(willBeInserted);
- const QString identifier = QtMacExtras::fromNSString(itemIdentifier);
+ const QString identifier = QtMac::fromNSString(itemIdentifier);
QMacToolButton *toolButton = reinterpret_cast<QMacToolButton *>(identifier.toULongLong()); // string -> unisgned long long -> pointer
NSToolbarItem *toolbarItem= [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdentifier] autorelease];
- [toolbarItem setLabel: QtMacExtras::toNSString(qt_strippedText(toolButton->m_action->iconText()))];
+ [toolbarItem setLabel: QtMac::toNSString(qt_strippedText(toolButton->m_action->iconText()))];
[toolbarItem setPaletteLabel:[toolbarItem label]];
- [toolbarItem setToolTip: QtMacExtras::toNSString(toolButton->m_action->toolTip())];
+ [toolbarItem setToolTip: QtMac::toNSString(toolButton->m_action->toolTip())];
QPixmap icon = toolButton->m_action->icon().pixmap(64, 64);
if (icon.isNull() == false) {
- [toolbarItem setImage : QtMacExtras::toNSImage(icon)];
+ [toolbarItem setImage : QtMac::toNSImage(icon)];
}
[toolbarItem setTarget : self];