summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorMorten Sørvig <msorvig@trolltech.com>2009-08-28 05:56:42 (GMT)
committerMorten Sørvig <msorvig@trolltech.com>2009-08-28 05:56:42 (GMT)
commit1e982527668ea168f12875fda4ecc56ae017d7b3 (patch)
treeeddcebda5333d54cda0acdaa3f15086b441a5df1 /src/gui
parentbc1b2e0528265841be8c4af912a665a92ce5906d (diff)
downloadQt-1e982527668ea168f12875fda4ecc56ae017d7b3.zip
Qt-1e982527668ea168f12875fda4ecc56ae017d7b3.tar.gz
Qt-1e982527668ea168f12875fda4ecc56ae017d7b3.tar.bz2
Compile with Qt-in-a-namepsace.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/accessible/qaccessible_mac_cocoa.mm13
-rw-r--r--src/gui/kernel/qcocoaview_mac_p.h1
-rw-r--r--src/gui/kernel/qmime_mac.cpp13
-rw-r--r--src/gui/widgets/qcocoatoolbardelegate_mac.mm6
4 files changed, 21 insertions, 12 deletions
diff --git a/src/gui/accessible/qaccessible_mac_cocoa.mm b/src/gui/accessible/qaccessible_mac_cocoa.mm
index 502827c..41a2566 100644
--- a/src/gui/accessible/qaccessible_mac_cocoa.mm
+++ b/src/gui/accessible/qaccessible_mac_cocoa.mm
@@ -59,9 +59,9 @@ QT_BEGIN_NAMESPACE
//#define MAC_ACCESSIBILTY_DEVELOPER_MODE
#ifdef MAC_ACCESSIBILTY_DEVELOPER_MODE
-#define MAC_ACCESSIBILTY_DEBUG qDebug
+#define MAC_ACCESSIBILTY_DEBUG QT_PREPEND_NAMESPACE(qDebug)
#else
-#define MAC_ACCESSIBILTY_DEBUG if (0) qDebug
+#define MAC_ACCESSIBILTY_DEBUG if (0) QT_PREPEND_NAMESPACE(qDebug)
#endif
typedef QMap<QAccessible::Role, NSString *> QMacAccessibiltyRoleMap;
@@ -195,13 +195,13 @@ QT_END_NAMESPACE
- (BOOL)accessibilityIsIgnored
{
- QAInterface interface = interfaceForView(self);
+ QT_PREPEND_NAMESPACE(QAInterface) interface = QT_PREPEND_NAMESPACE(interfaceForView)(self);
return isInterfaceIgnored(interface);
}
- (NSArray *)accessibilityAttributeNames
{
- QAInterface interface = interfaceForView(self);
+ QT_PREPEND_NAMESPACE(QAInterface) interface = QT_PREPEND_NAMESPACE(interfaceForView)(self);
static NSArray *attributes = nil;
if (attributes == nil) {
@@ -213,9 +213,10 @@ QT_END_NAMESPACE
- (id)accessibilityAttributeValue:(NSString *)attribute
{
- MAC_ACCESSIBILTY_DEBUG() << "accessibilityAttributeValue" << self << QCFString::toQString(reinterpret_cast<CFStringRef>(attribute));
+ MAC_ACCESSIBILTY_DEBUG() << "accessibilityAttributeValue" << self <<
+ QT_PREPEND_NAMESPACE(QCFString)::toQString(reinterpret_cast<CFStringRef>(attribute));
- QAInterface interface = interfaceForView(self);
+ QT_PREPEND_NAMESPACE(QAInterface) interface = QT_PREPEND_NAMESPACE(interfaceForView)(self);
// Switch on the attribute name and call the appropriate handler function.
// Pass the call on to the NSView class for attributes we don't handle.
diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h
index d93fa2f..443a118 100644
--- a/src/gui/kernel/qcocoaview_mac_p.h
+++ b/src/gui/kernel/qcocoaview_mac_p.h
@@ -59,6 +59,7 @@ QT_FORWARD_DECLARE_CLASS(QWidgetPrivate);
QT_FORWARD_DECLARE_CLASS(QWidget);
QT_FORWARD_DECLARE_CLASS(QEvent);
QT_FORWARD_DECLARE_CLASS(QCocoaDropData);
+QT_FORWARD_DECLARE_CLASS(QString);
QT_FORWARD_DECLARE_CLASS(QStringList);
QT_BEGIN_NAMESPACE
diff --git a/src/gui/kernel/qmime_mac.cpp b/src/gui/kernel/qmime_mac.cpp
index 9e8de67..2e9514d 100644
--- a/src/gui/kernel/qmime_mac.cpp
+++ b/src/gui/kernel/qmime_mac.cpp
@@ -68,6 +68,12 @@
#include "qmap.h"
#include <private/qt_mac_p.h>
+
+#ifdef Q_WS_MAC32
+#include <QuickTime/QuickTime.h>
+#include <qlibrary.h>
+#endif
+
QT_BEGIN_NAMESPACE
extern CGImageRef qt_mac_createCGImageFromQImage(const QImage &img, const QImage **imagePtr = 0); // qpaintengine_mac.cpp
@@ -503,9 +509,6 @@ QList<QByteArray> QMacPasteboardMimeHTMLText::convertFromMime(const QString &mim
// This can be removed once 10.6 is the minimum (or we have to require 64-bit) whichever comes first.
-#include <QuickTime/QuickTime.h>
-#include <qlibrary.h>
-
typedef ComponentResult (*PtrGraphicsImportSetDataHandle)(GraphicsImportComponent, Handle);
typedef ComponentResult (*PtrGraphicsImportCreateCGImage)(GraphicsImportComponent, CGImageRef*, UInt32);
typedef ComponentResult (*PtrGraphicsExportSetInputCGImage)(GraphicsExportComponent, CGImageRef);
@@ -636,7 +639,9 @@ QList<QByteArray> QMacPasteboardMimePict::convertFromMime(const QString &mime, Q
DisposeHandle(pic);
return ret;
}
-#endif
+
+
+#endif //Q_WS_MAC32
class QMacPasteboardMimeTiff : public QMacPasteboardMime {
public:
diff --git a/src/gui/widgets/qcocoatoolbardelegate_mac.mm b/src/gui/widgets/qcocoatoolbardelegate_mac.mm
index 3b58a4e..2ef0ead 100644
--- a/src/gui/widgets/qcocoatoolbardelegate_mac.mm
+++ b/src/gui/widgets/qcocoatoolbardelegate_mac.mm
@@ -100,7 +100,8 @@ QT_FORWARD_DECLARE_CLASS(QCFString);
{
Q_UNUSED(flag);
Q_UNUSED(nstoolbar);
- QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(qt_mac_NSStringToQString(itemIdentifier));
+ QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(
+ QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString)(itemIdentifier));
NSToolbarItem *item = nil;
if (tb) {
item = [[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier];
@@ -112,7 +113,8 @@ QT_FORWARD_DECLARE_CLASS(QCFString);
- (void)toolbarWillAddItem:(NSNotification *)notification
{
NSToolbarItem *item = [[notification userInfo] valueForKey:@"item"];
- QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(qt_mac_NSStringToQString([item itemIdentifier]));
+ QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(
+ QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString)([item itemIdentifier]));
if (!tb)
return; // I can't really do anything about this.
[item retain];