From 41afd00317922946ca2539d0be565bd8f917d239 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 29 Oct 2010 16:00:41 +0200 Subject: Fix compilation in namespace Reviewed-by: Joao --- src/corelib/global/qglobal.h | 2 +- src/corelib/tools/qscopedpointer.h | 2 +- src/corelib/tools/qshareddata.h | 4 ++-- src/corelib/tools/qsharedpointer_impl.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 4e78ab1..50f1538 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -2092,7 +2092,7 @@ inline void qSwap(T &value1, T &value2) #define Q_DECLARE_SHARED_STL(TYPE) \ QT_END_NAMESPACE \ namespace std { \ - template<> inline void swap(TYPE &value1, TYPE &value2) \ + template<> inline void swap(QT_PREPEND_NAMESPACE(TYPE) &value1, QT_PREPEND_NAMESPACE(TYPE) &value2) \ { swap(value1.data_ptr(), value2.data_ptr()); } \ } \ QT_BEGIN_NAMESPACE diff --git a/src/corelib/tools/qscopedpointer.h b/src/corelib/tools/qscopedpointer.h index a24cc71..b3a6db6 100644 --- a/src/corelib/tools/qscopedpointer.h +++ b/src/corelib/tools/qscopedpointer.h @@ -190,7 +190,7 @@ Q_INLINE_TEMPLATE void qSwap(QScopedPointer &p1, QScopedPointer - Q_INLINE_TEMPLATE void swap(QScopedPointer &p1, QScopedPointer &p2) + Q_INLINE_TEMPLATE void swap(QT_PREPEND_NAMESPACE(QScopedPointer) &p1, QT_PREPEND_NAMESPACE(QScopedPointer) &p2) { p1.swap(p2); } } QT_BEGIN_NAMESPACE diff --git a/src/corelib/tools/qshareddata.h b/src/corelib/tools/qshareddata.h index 1079595..45456fe 100644 --- a/src/corelib/tools/qshareddata.h +++ b/src/corelib/tools/qshareddata.h @@ -267,11 +267,11 @@ Q_INLINE_TEMPLATE void qSwap(QExplicitlySharedDataPointer &p1, QExplicitlySha QT_END_NAMESPACE namespace std { template - Q_INLINE_TEMPLATE void swap(QSharedDataPointer &p1, QSharedDataPointer &p2) + Q_INLINE_TEMPLATE void swap(QT_PREPEND_NAMESPACE(QSharedDataPointer) &p1, QT_PREPEND_NAMESPACE(QSharedDataPointer) &p2) { p1.swap(p2); } template - Q_INLINE_TEMPLATE void swap(QExplicitlySharedDataPointer &p1, QExplicitlySharedDataPointer &p2) + Q_INLINE_TEMPLATE void swap(QT_PREPEND_NAMESPACE(QExplicitlySharedDataPointer) &p1, QT_PREPEND_NAMESPACE(QExplicitlySharedDataPointer) &p2) { p1.swap(p2); } } QT_BEGIN_NAMESPACE diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h index 965ac14..ef8c454 100644 --- a/src/corelib/tools/qsharedpointer_impl.h +++ b/src/corelib/tools/qsharedpointer_impl.h @@ -788,7 +788,7 @@ inline void qSwap(QSharedPointer &p1, QSharedPointer &p2) QT_END_NAMESPACE namespace std { template - inline void swap(QSharedPointer &p1, QSharedPointer &p2) + inline void swap(QT_PREPEND_NAMESPACE(QSharedPointer) &p1, QT_PREPEND_NAMESPACE(QSharedPointer) &p2) { p1.swap(p2); } } QT_BEGIN_NAMESPACE -- cgit v0.12