From 48f4fe4897ba6b98434993179b47d6d9491ae173 Mon Sep 17 00:00:00 2001
From: Rohan McGovern <rohan.mcgovern@nokia.com>
Date: Tue, 16 Feb 2010 10:25:03 +1000
Subject: Fixed tests using Q_DECLARE_* when Qt is configured with -qtnamespace

---
 tests/auto/qlocalsocket/lackey/main.cpp              | 2 ++
 tests/auto/qpluginloader/theplugin/plugininterface.h | 3 +++
 tests/auto/qsharedmemory/lackey/main.cpp             | 2 ++
 tests/auto/qvariant/tst_qvariant.cpp                 | 5 +++++
 4 files changed, 12 insertions(+)

diff --git a/tests/auto/qlocalsocket/lackey/main.cpp b/tests/auto/qlocalsocket/lackey/main.cpp
index 0f1930c..1bba4f8 100644
--- a/tests/auto/qlocalsocket/lackey/main.cpp
+++ b/tests/auto/qlocalsocket/lackey/main.cpp
@@ -172,8 +172,10 @@ static int _q_ScriptRegisterQObjectMetaType(QScriptEngine *engine, const QScript
     return qScriptRegisterMetaType<T*>(engine, _q_ScriptValueFromQObject<T>, _q_ScriptValueToQObject<T>, prototype);
 }
 
+QT_BEGIN_NAMESPACE
 Q_SCRIPT_DECLARE_QMETAOBJECT(QScriptLocalSocket, QObject*);
 Q_SCRIPT_DECLARE_QMETAOBJECT(QScriptLocalServer, QObject*);
+QT_END_NAMESPACE
 
 static void interactive(QScriptEngine &eng)
 {
diff --git a/tests/auto/qpluginloader/theplugin/plugininterface.h b/tests/auto/qpluginloader/theplugin/plugininterface.h
index 0b093db..9b69429 100644
--- a/tests/auto/qpluginloader/theplugin/plugininterface.h
+++ b/tests/auto/qpluginloader/theplugin/plugininterface.h
@@ -45,7 +45,10 @@ struct PluginInterface {
     virtual ~PluginInterface() {}
     virtual QString pluginName() const = 0;
 };
+
+QT_BEGIN_NAMESPACE
 Q_DECLARE_INTERFACE(PluginInterface, "com.trolltect.autotests.plugininterface/1.0")
+QT_END_NAMESPACE
 
 #endif // PLUGININTERFACE_H
 
diff --git a/tests/auto/qsharedmemory/lackey/main.cpp b/tests/auto/qsharedmemory/lackey/main.cpp
index 5a5bf5e..fef8d22 100644
--- a/tests/auto/qsharedmemory/lackey/main.cpp
+++ b/tests/auto/qsharedmemory/lackey/main.cpp
@@ -242,9 +242,11 @@ private:
     QSharedMemory sm;
 };
 
+QT_BEGIN_NAMESPACE
 Q_SCRIPT_DECLARE_QMETAOBJECT(ScriptSharedMemory, QObject*);
 Q_SCRIPT_DECLARE_QMETAOBJECT(ScriptSystemLock, QObject*);
 Q_SCRIPT_DECLARE_QMETAOBJECT(ScriptSystemSemaphore, QObject*);
+QT_END_NAMESPACE
 
 static void interactive(QScriptEngine &eng)
 {
diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp
index 21b2fe3..a316dda 100644
--- a/tests/auto/qvariant/tst_qvariant.cpp
+++ b/tests/auto/qvariant/tst_qvariant.cpp
@@ -3200,7 +3200,10 @@ struct MyPrimitive
         return x == o.x && y == o.y;
     }
 };
+
+QT_BEGIN_NAMESPACE
 Q_DECLARE_TYPEINFO(MyPrimitive, Q_PRIMITIVE_TYPE);
+QT_END_NAMESPACE
 
 struct MyData
 {
@@ -3239,7 +3242,9 @@ struct MyMovable
 int MyMovable::count  = 0;
 
 
+QT_BEGIN_NAMESPACE
 Q_DECLARE_TYPEINFO(MyMovable, Q_MOVABLE_TYPE);
+QT_END_NAMESPACE
 
 Q_DECLARE_METATYPE(QList<QSize>)
 Q_DECLARE_METATYPE(MyPrimitive)
-- 
cgit v0.12