From 3d8b17aeb58d76d8a1d955f56291d7406a97e9c3 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Wed, 17 Feb 2010 17:08:51 +0100
Subject: [PATCH] qml: compile fix with namespaces

---
 .../qmldesigner/components/propertyeditor/basiclayouts.h | 8 ++++----
 .../components/propertyeditor/basicwidgets.cpp           | 4 ++--
 .../qmldesigner/components/propertyeditor/basicwidgets.h | 8 ++++----
 .../components/propertyeditor/behaviordialog.h           | 2 ++
 .../qmldesigner/components/propertyeditor/colorwidget.h  | 2 ++
 .../qmldesigner/components/propertyeditor/fontwidget.h   | 2 ++
 .../components/propertyeditor/propertyeditorvalue.h      | 2 ++
 .../components/propertyeditor/qlayoutobject.h            | 4 ++--
 .../components/propertyeditor/qproxylayoutitem.h         | 9 +++++----
 .../components/propertyeditor/resetwidget.cpp            | 3 ++-
 .../core/instances/qmlpropertychangesnodeinstance.h      | 2 ++
 .../qmlprojectmanager/fileformat/filefilteritems.h       | 2 ++
 .../qmlprojectmanager/fileformat/qmlprojectitem.h        | 4 +++-
 13 files changed, 34 insertions(+), 18 deletions(-)

diff --git a/src/plugins/qmldesigner/components/propertyeditor/basiclayouts.h b/src/plugins/qmldesigner/components/propertyeditor/basiclayouts.h
index 527059dd3a6..8315129c9a8 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/basiclayouts.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/basiclayouts.h
@@ -175,13 +175,13 @@ public:
     QVBoxLayoutObject(QObject *parent=0);
 };
 
-#endif // BASICLAYOUTS_H
-
-
-QT_END_NAMESPACE
 
 QML_DECLARE_TYPE(QBoxLayoutObject);
 QML_DECLARE_TYPE(QHBoxLayoutObject);
 QML_DECLARE_TYPE(QVBoxLayoutObject);
 
+QT_END_NAMESPACE
+
 QT_END_HEADER
+
+#endif // BASICLAYOUTS_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp b/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp
index 3ffdc18a955..910e40be470 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp
@@ -1168,8 +1168,6 @@ public:
     {}
 };
 
-QT_END_NAMESPACE
-
 QML_DEFINE_EXTENDED_TYPE(Bauhaus,1,0,QWidget,QWidget,QWidgetDeclarativeUI);
 
 //display
@@ -1232,4 +1230,6 @@ QML_DEFINE_EXTENDED_TYPE(Bauhaus,1,0,QMenu,QMenu, QMenuDeclarativeUI)
 QML_DECLARE_TYPE(QTabObject);
 QML_DEFINE_TYPE(Qt,4,6,QTabObject,QTabObject); //### with namespacing, this should just be 'Tab'
 
+QT_END_NAMESPACE
+
 #include "basicwidgets.moc"
diff --git a/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.h b/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.h
index b44eac30f58..a59b8fa8ee6 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.h
@@ -57,6 +57,8 @@
 #include "filewidget.h"
 #include "layoutwidget.h"
 
+QT_BEGIN_NAMESPACE
+
 QML_DECLARE_TYPE(QWidget);
 
 //display
@@ -94,16 +96,12 @@ QML_DECLARE_TYPE(QTabWidget);
 QML_DECLARE_TYPE(FileWidget);
 QML_DECLARE_TYPE(LayoutWidget);
 
-QT_BEGIN_NAMESPACE
-
 class Action : public QAction {
     Q_OBJECT
 public:
     Action(QObject *parent = 0) : QAction(parent) {}
 };
 
-QT_END_NAMESPACE
-
 QML_DECLARE_TYPE(QMenu);
 QML_DECLARE_TYPE(Action);
 
@@ -116,4 +114,6 @@ QML_DECLARE_TYPE(Action);
 
 //top-level windows?
 
+QT_END_NAMESPACE
+
 #endif // BASICWIDGETS_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/behaviordialog.h b/src/plugins/qmldesigner/components/propertyeditor/behaviordialog.h
index dfc763b4e39..45b71d6eb6c 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/behaviordialog.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/behaviordialog.h
@@ -93,6 +93,8 @@ private:
 
 };
 
+QT_BEGIN_NAMESPACE
 QML_DECLARE_TYPE(QmlDesigner::BehaviorWidget);
+QT_END_NAMESPACE
 
 #endif// BEHAVIORDIALOG_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/colorwidget.h b/src/plugins/qmldesigner/components/propertyeditor/colorwidget.h
index 3031da969c5..5cb4b6218f8 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/colorwidget.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/colorwidget.h
@@ -301,8 +301,10 @@ private:
 
 } //QmlDesigner
 
+QT_BEGIN_NAMESPACE
 QML_DECLARE_TYPE(QmlDesigner::ColorButton);
 QML_DECLARE_TYPE(QmlDesigner::HueControl);
 QML_DECLARE_TYPE(QmlDesigner::ColorBox);
+QT_END_NAMESPACE
 
 #endif //COLORWIDGET_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/fontwidget.h b/src/plugins/qmldesigner/components/propertyeditor/fontwidget.h
index d04e5e4e332..bb30aa630d9 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/fontwidget.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/fontwidget.h
@@ -96,6 +96,8 @@ private: //variables
 
 } // namespace QmlDesigner
 
+QT_BEGIN_NAMESPACE
 QML_DECLARE_TYPE(QmlDesigner::FontWidget);
+QT_END_NAMESPACE
 
 #endif // FONTWIDGET_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h
index ae9256a05e0..3b5b7fbd091 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h
@@ -146,9 +146,11 @@ private: //variables
     QmlDesigner::RewriterTransaction m_rewriterTransaction;
 };
 
+QT_BEGIN_NAMESPACE
 QML_DECLARE_TYPE(PropertyEditorValue);
 QML_DECLARE_TYPE(PropertyEditorNodeWrapper);
 QML_DECLARE_TYPE(QmlPropertyMap);
+QT_END_NAMESPACE
 
 
 #endif // PROPERTYEDITORVALUE_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/qlayoutobject.h b/src/plugins/qmldesigner/components/propertyeditor/qlayoutobject.h
index 13b79862b46..be4ea3dd91a 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/qlayoutobject.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/qlayoutobject.h
@@ -49,10 +49,10 @@ public:
     virtual QLayout *layout() const;
 };
 
-QT_END_NAMESPACE
-
 QML_DECLARE_TYPE(QLayoutObject);
 
+QT_END_NAMESPACE
+
 QT_END_HEADER
 
 #endif // QLAYOUTOBJECT_H
diff --git a/src/plugins/qmldesigner/components/propertyeditor/qproxylayoutitem.h b/src/plugins/qmldesigner/components/propertyeditor/qproxylayoutitem.h
index f511489e804..1e296e5658e 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/qproxylayoutitem.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/qproxylayoutitem.h
@@ -87,11 +87,12 @@ private:
     QGraphicsLayoutItem *other;
 };
 
-#endif // QPROXYLAYOUTITEM_H
-
-QT_END_NAMESPACE
-
 QML_DECLARE_TYPE(QProxyLayout);
 QML_DECLARE_TYPE(QProxyLayoutItem);
 
+QT_END_NAMESPACE
+
 QT_END_HEADER
+
+#endif // QPROXYLAYOUTITEM_H
+
diff --git a/src/plugins/qmldesigner/components/propertyeditor/resetwidget.cpp b/src/plugins/qmldesigner/components/propertyeditor/resetwidget.cpp
index 3d74b2815e9..c1fdccdab1a 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/resetwidget.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/resetwidget.cpp
@@ -40,9 +40,10 @@
 #include <QDebug>
 #include <QApplication>
 
+QT_BEGIN_NAMESPACE
 QML_DECLARE_TYPE(QmlDesigner::ResetWidget);
 QML_DEFINE_TYPE(Bauhaus, 1, 0, ResetWidget, QmlDesigner::ResetWidget);
-
+QT_END_NAMESPACE
 
 namespace QmlDesigner {
 
diff --git a/src/plugins/qmldesigner/core/instances/qmlpropertychangesnodeinstance.h b/src/plugins/qmldesigner/core/instances/qmlpropertychangesnodeinstance.h
index a928621ce68..ec70d21c7aa 100644
--- a/src/plugins/qmldesigner/core/instances/qmlpropertychangesnodeinstance.h
+++ b/src/plugins/qmldesigner/core/instances/qmlpropertychangesnodeinstance.h
@@ -98,6 +98,8 @@ protected:
 } // namespace Internal
 } // namespace QmlDesigner
 
+QT_BEGIN_NAMESPACE
 QML_DECLARE_TYPE(QmlDesigner::Internal::QmlPropertyChangesObject)
+QT_END_NAMESPACE
 
 #endif // QMLPROPERTYCHANGESNODEINSTANCE_H
diff --git a/src/plugins/qmlprojectmanager/fileformat/filefilteritems.h b/src/plugins/qmlprojectmanager/fileformat/filefilteritems.h
index 575fd89e12d..0a1e53ef5ee 100644
--- a/src/plugins/qmlprojectmanager/fileformat/filefilteritems.h
+++ b/src/plugins/qmlprojectmanager/fileformat/filefilteritems.h
@@ -104,9 +104,11 @@ public:
 
 } // namespace QmlProjectManager
 
+QT_BEGIN_NAMESPACE
 QML_DECLARE_TYPE(QmlProjectManager::QmlFileFilterItem)
 QML_DECLARE_TYPE(QmlProjectManager::JsFileFilterItem)
 QML_DECLARE_TYPE(QmlProjectManager::ImageFileFilterItem)
 QML_DECLARE_TYPE(QmlProjectManager::CssFileFilterItem)
+QT_END_NAMESPACE
 
 #endif // FILEFILTERITEMS_HPROJECTITEM_H
diff --git a/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h b/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h
index 99e2c5c31ab..6fc8f5cbab2 100644
--- a/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h
+++ b/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h
@@ -53,9 +53,11 @@ protected:
 
 } // namespace QmlProjectManager
 
+QT_BEGIN_NAMESPACE
 QML_DECLARE_TYPE(QmlProjectManager::QmlProjectItem);
 QML_DECLARE_TYPE(QmlProjectManager::QmlProjectContentItem);
-Q_DECLARE_METATYPE(QList<QmlProjectManager::QmlProjectContentItem *>);
+QT_DECLARE_METATYPE(QList<QmlProjectManager::QmlProjectContentItem *>);
+QT_END_NAMESPACE
 
 
 #endif // PROJECTITEM_H
-- 
GitLab