forked from qt-creator/qt-creator
QmlDesigner: Remove using namespace QmlJS::AST from ASTObjectTextExtractor
Change-Id: Iff1234a61abbd1b323ce1fa46854d95de252f2a8 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
committed by
Thomas Hartmann
parent
056c4db900
commit
717a5a13c2
@@ -32,12 +32,10 @@
|
||||
|
||||
#include <qmljs/parser/qmljsast_p.h>
|
||||
|
||||
using namespace QmlJS;
|
||||
using namespace QmlDesigner;
|
||||
using namespace QmlJS::AST;
|
||||
|
||||
ASTObjectTextExtractor::ASTObjectTextExtractor(const QString &text):
|
||||
m_document(Document::create("<ASTObjectTextExtractor>", Dialect::Qml))
|
||||
m_document(QmlJS::Document::create(QLatin1String("<ASTObjectTextExtractor>"), QmlJS::Dialect::Qml))
|
||||
{
|
||||
m_document->setSource(text);
|
||||
m_document->parseQml();
|
||||
@@ -50,12 +48,12 @@ QString ASTObjectTextExtractor::operator ()(int location)
|
||||
m_location = location;
|
||||
m_text.clear();
|
||||
|
||||
Node::accept(m_document->qmlProgram(), this);
|
||||
QmlJS::AST::Node::accept(m_document->qmlProgram(), this);
|
||||
|
||||
return m_text;
|
||||
}
|
||||
|
||||
bool ASTObjectTextExtractor::visit(UiObjectBinding *ast)
|
||||
bool ASTObjectTextExtractor::visit(QmlJS::AST::UiObjectBinding *ast)
|
||||
{
|
||||
if (!m_text.isEmpty())
|
||||
return false;
|
||||
@@ -66,7 +64,7 @@ bool ASTObjectTextExtractor::visit(UiObjectBinding *ast)
|
||||
return m_text.isEmpty();
|
||||
}
|
||||
|
||||
bool ASTObjectTextExtractor::visit(UiObjectDefinition *ast)
|
||||
bool ASTObjectTextExtractor::visit(QmlJS::AST::UiObjectDefinition *ast)
|
||||
{
|
||||
if (!m_text.isEmpty())
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user