QmlJsDelta: move to the QmlJs namspace

This commit is contained in:
Olivier Goffart
2010-07-21 13:11:45 +02:00
parent 3c7528d572
commit 31949f1890
3 changed files with 23 additions and 24 deletions

View File

@@ -35,11 +35,10 @@
#include <typeinfo> #include <typeinfo>
#include <QtCore/QDebug> #include <QtCore/QDebug>
using namespace QmlJS;
using namespace QmlJS::AST; using namespace QmlJS::AST;
using namespace QmlJSInspector::Internal;
namespace { namespace {
using namespace QmlJS;
/*! /*!
Build a hash of the parents Build a hash of the parents
@@ -313,6 +312,8 @@ static QHash<QString, UiObjectMember*> extractProperties(UiObjectDefinition *obj
} //end namespace } //end namespace
namespace QmlJS {
void Delta::insert(UiObjectMember *member, UiObjectMember *parentMember, const QList<QDeclarativeDebugObjectReference > &debugReferences, const Document::Ptr &doc) void Delta::insert(UiObjectMember *member, UiObjectMember *parentMember, const QList<QDeclarativeDebugObjectReference > &debugReferences, const Document::Ptr &doc)
{ {
if (!member || !parentMember) if (!member || !parentMember)
@@ -485,18 +486,20 @@ Document::Ptr Delta::previousDocument() const
return m_previousDoc; return m_previousDoc;
} }
void QmlJSInspector::Internal::Delta::createObject(const QString &, const QDeclarativeDebugObjectReference &, void Delta::createObject(const QString &, const QDeclarativeDebugObjectReference &,
const QStringList &, const QString&) 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 &, void Delta::updateMethodBody(const QDeclarativeDebugObjectReference &,
UiScriptBinding *, const QString &, const QString &) UiScriptBinding *, const QString &, const QString &)
{} {}
void QmlJSInspector::Internal::Delta::updateScriptBinding(const QDeclarativeDebugObjectReference &, void Delta::updateScriptBinding(const QDeclarativeDebugObjectReference &,
UiScriptBinding *, const QString &, const QString &) UiScriptBinding *, const QString &, const QString &)
{} {}
} //namespace QmlJs

View File

@@ -37,18 +37,14 @@
#include <qmljs/parser/qmljsastfwd_p.h> #include <qmljs/parser/qmljsastfwd_p.h>
#include <qmljs/parser/qmljsast_p.h> #include <qmljs/parser/qmljsast_p.h>
using namespace QmlJS; namespace QmlJS {
using namespace QmlJS::AST;
namespace QmlJSInspector {
namespace Internal {
class Delta class Delta
{ {
public: 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); 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; QmlJS::Document::Ptr previousDocument() const;
private: private:
void insert(UiObjectMember *member, UiObjectMember *parentMember, void insert(AST::UiObjectMember *member, AST::UiObjectMember *parentMember,
const QList<QDeclarativeDebugObjectReference> &debugReferences, const Document::Ptr &doc); const QList<QDeclarativeDebugObjectReference> &debugReferences, const Document::Ptr &doc);
void update(UiObjectDefinition* oldObject, const QmlJS::Document::Ptr& oldDoc, void update(AST::UiObjectDefinition* oldObject, const QmlJS::Document::Ptr& oldDoc,
UiObjectDefinition* newObject, const QmlJS::Document::Ptr& newDoc, AST::UiObjectDefinition* newObject, const QmlJS::Document::Ptr& newDoc,
const QList<QDeclarativeDebugObjectReference >& debugReferences); const QList<QDeclarativeDebugObjectReference >& debugReferences);
void remove(const QList< QDeclarativeDebugObjectReference > &debugReferences); void remove(const QList< QDeclarativeDebugObjectReference > &debugReferences);
protected: protected:
virtual void updateScriptBinding(const QDeclarativeDebugObjectReference &objectReference, virtual void updateScriptBinding(const QDeclarativeDebugObjectReference &objectReference,
QmlJS::AST::UiScriptBinding *scriptBinding, AST::UiScriptBinding *scriptBinding,
const QString &propertyName, const QString &propertyName,
const QString &scriptCode); const QString &scriptCode);
virtual void updateMethodBody(const QDeclarativeDebugObjectReference &objectReference, virtual void updateMethodBody(const QDeclarativeDebugObjectReference &objectReference,
UiScriptBinding *scriptBinding, AST::UiScriptBinding *scriptBinding,
const QString &methodName, const QString &methodName,
const QString &methodBody); const QString &methodBody);
virtual void resetBindingForObject(int debugId, const QString &propertyName); virtual void resetBindingForObject(int debugId, const QString &propertyName);
@@ -82,8 +78,7 @@ private:
QmlJS::Document::Ptr m_previousDoc; QmlJS::Document::Ptr m_previousDoc;
}; };
} // namespace Internal } // namespace QmlJS
} // namespace QmlJSInspector
#endif // QMLJSDELTA_H #endif // QMLJSDELTA_H

View File

@@ -47,6 +47,7 @@
#include <QDebug> #include <QDebug>
using namespace QmlJS;
using namespace QmlJS::AST; using namespace QmlJS::AST;
namespace QmlJSInspector { namespace QmlJSInspector {