diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-09-17 11:04:54 (GMT) |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-09-17 11:04:54 (GMT) |
commit | 5ffcc17140bfb65c1a8ce81c08c60ee882d9bcbf (patch) | |
tree | c59cb58160657dbccc7fda56a704881f81ae5255 | |
parent | 875c342b9f861c914e399f01142d70d65a6b39af (diff) | |
download | Qt-5ffcc17140bfb65c1a8ce81c08c60ee882d9bcbf.zip Qt-5ffcc17140bfb65c1a8ce81c08c60ee882d9bcbf.tar.gz Qt-5ffcc17140bfb65c1a8ce81c08c60ee882d9bcbf.tar.bz2 |
Fixed the QML parser files to play nice when included in Creator,
when Creator is compiled against Qt with namespaces.
-rw-r--r-- | src/declarative/qml/parser/qmljsast.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/parser/qmljsglobal_p.h | 8 | ||||
-rw-r--r-- | src/declarative/qml/rewriter/rewriter.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/rewriter/rewriter_p.h | 4 | ||||
-rw-r--r-- | src/declarative/qml/rewriter/textwriter.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/rewriter/textwriter_p.h | 6 |
6 files changed, 16 insertions, 14 deletions
diff --git a/src/declarative/qml/parser/qmljsast.cpp b/src/declarative/qml/parser/qmljsast.cpp index 11a98b6..64fe99c 100644 --- a/src/declarative/qml/parser/qmljsast.cpp +++ b/src/declarative/qml/parser/qmljsast.cpp @@ -42,7 +42,7 @@ #include "qmljsast_p.h" #include "qmljsastvisitor_p.h" -QT_BEGIN_NAMESPACE +QT_QML_BEGIN_NAMESPACE namespace QmlJS { namespace AST { @@ -940,6 +940,6 @@ void UiSourceElement::accept0(Visitor *visitor) } } // namespace QmlJS::AST -QT_END_NAMESPACE +QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/parser/qmljsglobal_p.h b/src/declarative/qml/parser/qmljsglobal_p.h index 675c67b..99bb19f 100644 --- a/src/declarative/qml/parser/qmljsglobal_p.h +++ b/src/declarative/qml/parser/qmljsglobal_p.h @@ -3,12 +3,12 @@ #include <QtCore/qglobal.h> -#ifndef QT_CREATOR -#define QT_QML_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE -#define QT_QML_END_NAMESPACE QT_END_NAMESPACE -#else // !QT_CREATOR +#ifdef QT_CREATOR #define QT_QML_BEGIN_NAMESPACE #define QT_QML_END_NAMESPACE +#else // !QT_CREATOR +#define QT_QML_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE +#define QT_QML_END_NAMESPACE QT_END_NAMESPACE #endif // QT_CREATOR #endif // QMLJSGLOBAL_P_H diff --git a/src/declarative/qml/rewriter/rewriter.cpp b/src/declarative/qml/rewriter/rewriter.cpp index ed45f16..1248a1c 100644 --- a/src/declarative/qml/rewriter/rewriter.cpp +++ b/src/declarative/qml/rewriter/rewriter.cpp @@ -42,7 +42,7 @@ #include "rewriter_p.h" #include "qmljsast_p.h" -QT_BEGIN_NAMESPACE +QT_QML_BEGIN_NAMESPACE using namespace QmlJS; @@ -98,4 +98,4 @@ void Rewriter::move(int pos, int length, int to) textWriter.move(pos, length, to); } -QT_END_NAMESPACE +QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/rewriter/rewriter_p.h b/src/declarative/qml/rewriter/rewriter_p.h index 44f3cce..ae59226 100644 --- a/src/declarative/qml/rewriter/rewriter_p.h +++ b/src/declarative/qml/rewriter/rewriter_p.h @@ -49,7 +49,7 @@ #include "qmljsastvisitor_p.h" QT_BEGIN_HEADER -QT_BEGIN_NAMESPACE +QT_QML_BEGIN_NAMESPACE namespace QmlJS { @@ -146,7 +146,7 @@ private: } // end of namespace QmlJS -QT_END_NAMESPACE +QT_QML_END_NAMESPACE QT_END_HEADER #endif // REWRITER_H diff --git a/src/declarative/qml/rewriter/textwriter.cpp b/src/declarative/qml/rewriter/textwriter.cpp index fbbdb2bbab..1ec0675 100644 --- a/src/declarative/qml/rewriter/textwriter.cpp +++ b/src/declarative/qml/rewriter/textwriter.cpp @@ -41,7 +41,7 @@ #include "textwriter_p.h" -QT_BEGIN_NAMESPACE +QT_QML_BEGIN_NAMESPACE using namespace QmlJS; @@ -214,4 +214,4 @@ void TextWriter::write_helper() cursor->endEditBlock(); } -QT_END_NAMESPACE +QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/rewriter/textwriter_p.h b/src/declarative/qml/rewriter/textwriter_p.h index 3041e04..6ab7323 100644 --- a/src/declarative/qml/rewriter/textwriter_p.h +++ b/src/declarative/qml/rewriter/textwriter_p.h @@ -46,8 +46,10 @@ #include <QtCore/QList> #include <QtGui/QTextCursor> +#include "qml/parser/qmljsglobal_p.h" + QT_BEGIN_HEADER -QT_BEGIN_NAMESPACE +QT_QML_BEGIN_NAMESPACE namespace QmlJS { @@ -93,7 +95,7 @@ public: } // end of namespace QmlJS -QT_END_NAMESPACE +QT_QML_END_NAMESPACE QT_END_HEADER #endif // TEXTWRITER_H |