Commit 75a003fd authored by hjk's avatar hjk
Browse files

duieditor: make it compile with and without namespaced Qt

parent 10a6829a
......@@ -4,7 +4,7 @@ include(../../qtcreatorplugin.pri)
include(duieditor_dependencies.pri)
include(parser/parser.pri)
include(rewriter/rewriter.pri)
DEFINES += DUIEDITOR_LIBRARY
DEFINES += DUIEDITOR_LIBRARY QT_CREATOR
INCLUDEPATH += parser \
rewriter
HEADERS += duieditor.h \
......
......@@ -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
......@@ -42,7 +42,7 @@
#include "rewriter_p.h"
#include "qmljsast_p.h"
QT_BEGIN_NAMESPACE
QT_QML_BEGIN_NAMESPACE
using namespace QmlJS;
......@@ -93,4 +93,4 @@ void Rewriter::moveTextAfter(const AST::SourceLocation &firstLoc,
textWriter.move(firstLoc.offset, lastLoc.offset + lastLoc.length - firstLoc.offset, loc.offset + loc.length);
}
QT_END_NAMESPACE
QT_QML_END_NAMESPACE
......@@ -49,7 +49,7 @@
#include "qmljsastvisitor_p.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_QML_BEGIN_NAMESPACE
namespace QmlJS {
......@@ -145,7 +145,7 @@ private:
} // end of namespace QmlJS
QT_END_NAMESPACE
QT_QML_END_NAMESPACE
QT_END_HEADER
#endif // REWRITER_H
......@@ -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
......@@ -46,8 +46,10 @@
#include <QtCore/QList>
#include <QtGui/QTextCursor>
#include "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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment