diff --git a/src/plugins/qmljsinspector/qmljsdelta.cpp b/src/plugins/qmljsinspector/qmljsdelta.cpp index 22918aa90e3bec576402bb4f724abc6d163837ca..2cc5ac5c01877e55b4063fa4fcdb7196060a4a7a 100644 --- a/src/plugins/qmljsinspector/qmljsdelta.cpp +++ b/src/plugins/qmljsinspector/qmljsdelta.cpp @@ -35,11 +35,10 @@ #include <typeinfo> #include <QtCore/QDebug> -using namespace QmlJS; using namespace QmlJS::AST; -using namespace QmlJSInspector::Internal; namespace { +using namespace QmlJS; /*! Build a hash of the parents @@ -313,6 +312,8 @@ static QHash<QString, UiObjectMember*> extractProperties(UiObjectDefinition *obj } //end namespace +namespace QmlJS { + void Delta::insert(UiObjectMember *member, UiObjectMember *parentMember, const QList<QDeclarativeDebugObjectReference > &debugReferences, const Document::Ptr &doc) { if (!member || !parentMember) @@ -485,18 +486,20 @@ Document::Ptr Delta::previousDocument() const return m_previousDoc; } -void QmlJSInspector::Internal::Delta::createObject(const QString &, const QDeclarativeDebugObjectReference &, - const QStringList &, const QString&) +void Delta::createObject(const QString &, const QDeclarativeDebugObjectReference &, + const QStringList &, const QString&) {} -void QmlJSInspector::Internal::Delta::removeObject(int) +void Delta::removeObject(int) {} -void QmlJSInspector::Internal::Delta::resetBindingForObject(int, const QString &) +void Delta::resetBindingForObject(int, const QString &) {} -void QmlJSInspector::Internal::Delta::updateMethodBody(const QDeclarativeDebugObjectReference &, - UiScriptBinding *, const QString &, const QString &) +void Delta::updateMethodBody(const QDeclarativeDebugObjectReference &, + UiScriptBinding *, const QString &, const QString &) {} -void QmlJSInspector::Internal::Delta::updateScriptBinding(const QDeclarativeDebugObjectReference &, - UiScriptBinding *, const QString &, const QString &) +void Delta::updateScriptBinding(const QDeclarativeDebugObjectReference &, + UiScriptBinding *, const QString &, const QString &) {} +} //namespace QmlJs + diff --git a/src/plugins/qmljsinspector/qmljsdelta.h b/src/plugins/qmljsinspector/qmljsdelta.h index 4354e0da8152633f3f40e4dbaa885fac7aba7728..c5f9b78005e688da08265527574ba752c7243370 100644 --- a/src/plugins/qmljsinspector/qmljsdelta.h +++ b/src/plugins/qmljsinspector/qmljsdelta.h @@ -37,18 +37,14 @@ #include <qmljs/parser/qmljsastfwd_p.h> #include <qmljs/parser/qmljsast_p.h> -using namespace QmlJS; -using namespace QmlJS::AST; - -namespace QmlJSInspector { -namespace Internal { +namespace QmlJS { class Delta { public: - QSet<UiObjectMember *> newObjects; + QSet<AST::UiObjectMember *> newObjects; - typedef QHash< UiObjectMember*, QList<QDeclarativeDebugObjectReference > > DebugIdMap; + typedef QHash<AST::UiObjectMember*, QList<QDeclarativeDebugObjectReference > > DebugIdMap; DebugIdMap operator()(const QmlJS::Document::Ptr &doc1, const QmlJS::Document::Ptr &doc2, const DebugIdMap &debugIds); @@ -56,20 +52,20 @@ public: QmlJS::Document::Ptr previousDocument() const; private: - void insert(UiObjectMember *member, UiObjectMember *parentMember, + void insert(AST::UiObjectMember *member, AST::UiObjectMember *parentMember, const QList<QDeclarativeDebugObjectReference> &debugReferences, const Document::Ptr &doc); - void update(UiObjectDefinition* oldObject, const QmlJS::Document::Ptr& oldDoc, - UiObjectDefinition* newObject, const QmlJS::Document::Ptr& newDoc, + void update(AST::UiObjectDefinition* oldObject, const QmlJS::Document::Ptr& oldDoc, + AST::UiObjectDefinition* newObject, const QmlJS::Document::Ptr& newDoc, const QList<QDeclarativeDebugObjectReference >& debugReferences); void remove(const QList< QDeclarativeDebugObjectReference > &debugReferences); protected: virtual void updateScriptBinding(const QDeclarativeDebugObjectReference &objectReference, - QmlJS::AST::UiScriptBinding *scriptBinding, + AST::UiScriptBinding *scriptBinding, const QString &propertyName, const QString &scriptCode); virtual void updateMethodBody(const QDeclarativeDebugObjectReference &objectReference, - UiScriptBinding *scriptBinding, + AST::UiScriptBinding *scriptBinding, const QString &methodName, const QString &methodBody); virtual void resetBindingForObject(int debugId, const QString &propertyName); @@ -82,8 +78,7 @@ private: QmlJS::Document::Ptr m_previousDoc; }; -} // namespace Internal -} // namespace QmlJSInspector +} // namespace QmlJS #endif // QMLJSDELTA_H diff --git a/src/plugins/qmljsinspector/qmljslivetextpreview.cpp b/src/plugins/qmljsinspector/qmljslivetextpreview.cpp index db71a515f0dec6a7b6efde0b879ebc1a0508742b..e79d7662ed556da3354fc3938067bb1b1ab8a1c2 100644 --- a/src/plugins/qmljsinspector/qmljslivetextpreview.cpp +++ b/src/plugins/qmljsinspector/qmljslivetextpreview.cpp @@ -47,6 +47,7 @@ #include <QDebug> +using namespace QmlJS; using namespace QmlJS::AST; namespace QmlJSInspector {