From 26877d990b5f0c242448690ca957e98d64ae40e3 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Mon, 20 Jun 2011 11:50:18 +0200 Subject: Support -qtnamespace and -qtlibinfix again This fix is for qtbase libraries with -qtnamespace and -qtlibinfix options in configure. Task-number: QTBUG-19964 Change-Id: I2f2ff1748f2c1c2b20d5f73b6be36f68a7a26cef Reviewed-on: http://codereview.qt.nokia.com/505 Reviewed-by: Qt Sanity Bot Reviewed-by: Rohan McGovern Reviewed-by: Gunnar Sletta --- src/gui/kernel/qwidget_mac.mm | 2 +- src/gui/text/qfontdatabase.cpp | 2 +- src/gui/text/qfontengine_coretext_p.h | 8 ++++++++ src/gui/text/qharfbuzz_copy_p.h | 8 ++++---- src/gui/util/qscroller_mac.mm | 4 ++++ 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 3a025e9237..4adaa6b288 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -5018,7 +5018,7 @@ void QWidgetPrivate::registerTouchWindow(bool enable) if (enable == touchEventsEnabled) return; - QCocoaView *view = static_cast(qt_mac_effectiveview_for(q)); + QT_MANGLE_NAMESPACE(QCocoaView) *view = static_cast(qt_mac_effectiveview_for(q)); if (!view) return; diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 98186dfd9b..1d07b567f8 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -1123,13 +1123,13 @@ QT_BEGIN_INCLUDE_NAMESPACE #elif defined(Q_OS_SYMBIAN) # include "qfontdatabase_s60.cpp" #endif +QT_END_INCLUDE_NAMESPACE #if !defined(Q_WS_X11) QString QFontDatabase::resolveFontFamilyAlias(const QString &family) { return family; } #endif -QT_END_INCLUDE_NAMESPACE static QtFontStyle *bestStyle(QtFontFoundry *foundry, const QtFontStyle::Key &styleKey) { diff --git a/src/gui/text/qfontengine_coretext_p.h b/src/gui/text/qfontengine_coretext_p.h index 3ca8a0ad60..b531856a27 100644 --- a/src/gui/text/qfontengine_coretext_p.h +++ b/src/gui/text/qfontengine_coretext_p.h @@ -46,6 +46,10 @@ #if !defined(Q_WS_MAC) || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + class QRawFontPrivate; class QCoreTextFontEngineMulti; class QCoreTextFontEngine : public QFontEngine @@ -143,6 +147,10 @@ private: CGAffineTransform qt_transform_from_fontdef(const QFontDef &fontDef); +QT_END_NAMESPACE + +QT_END_HEADER + #endif// !defined(Q_WS_MAC) || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) #endif // QFONTENGINE_CORETEXT_P_H diff --git a/src/gui/text/qharfbuzz_copy_p.h b/src/gui/text/qharfbuzz_copy_p.h index 74b824ab35..835d8fb1a6 100644 --- a/src/gui/text/qharfbuzz_copy_p.h +++ b/src/gui/text/qharfbuzz_copy_p.h @@ -43,7 +43,7 @@ extern "C" { #ifdef __xlC__ typedef unsigned hb_bitfield; #else -typedef quint8 hb_bitfield; +typedef QT_PREPEND_NAMESPACE(quint8) hb_bitfield; #endif typedef enum { @@ -66,12 +66,12 @@ typedef enum { HB_Err_Out_Of_Memory = 0xDEAD } HB_Error; -typedef quint32 HB_Glyph; +typedef QT_PREPEND_NAMESPACE(quint32) HB_Glyph; typedef void * HB_Font; typedef void * HB_Face; typedef void * HB_FontRec; -typedef quint32 hb_uint32; -typedef qint32 HB_Fixed; +typedef QT_PREPEND_NAMESPACE(quint32) hb_uint32; +typedef QT_PREPEND_NAMESPACE(qint32) HB_Fixed; typedef struct { HB_Fixed x; diff --git a/src/gui/util/qscroller_mac.mm b/src/gui/util/qscroller_mac.mm index c0ef4a1665..81d18aaf6b 100644 --- a/src/gui/util/qscroller_mac.mm +++ b/src/gui/util/qscroller_mac.mm @@ -47,6 +47,8 @@ #include "qscroller_p.h" +QT_BEGIN_NAMESPACE + QPointF QScrollerPrivate::realDpi(int screen) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; @@ -68,4 +70,6 @@ QPointF QScrollerPrivate::realDpi(int screen) [pool release]; } +QT_END_NAMESPACE + #endif -- cgit v1.2.3