From 883545a03dea750207d70f71c2e2736e409342e2 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Thu, 17 Jul 2014 12:29:37 +0200 Subject: [PATCH] qmljs: avoid shortened names libPath -> libraryQualifiedPath vContext -> viewerContext Change-Id: I085f5f3304a6becaa00f715cb3395c8cee5227c6 Reviewed-by: Tim Jenssen --- src/libs/qmljs/qmljscontext.cpp | 2 +- src/libs/qmljs/qmljscontext.h | 6 +++--- src/libs/qmljs/qmljsimportdependencies.cpp | 2 +- src/libs/qmljs/qmljsimportdependencies.h | 2 +- .../qmldesigner/designercore/metainfo/nodemetainfo.cpp | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/libs/qmljs/qmljscontext.cpp b/src/libs/qmljs/qmljscontext.cpp index 7c60dcc03a1..b2da89f1a99 100644 --- a/src/libs/qmljs/qmljscontext.cpp +++ b/src/libs/qmljs/qmljscontext.cpp @@ -91,7 +91,7 @@ QmlJS::Snapshot Context::snapshot() const return _snapshot; } -ViewerContext Context::vContext() const +ViewerContext Context::viewerContext() const { return _vContext; } diff --git a/src/libs/qmljs/qmljscontext.h b/src/libs/qmljs/qmljscontext.h index ac0b23d61f5..5cd184ed877 100644 --- a/src/libs/qmljs/qmljscontext.h +++ b/src/libs/qmljs/qmljscontext.h @@ -52,14 +52,14 @@ public: // Context takes ownership of valueOwner static ContextPtr create(const Snapshot &snapshot, ValueOwner *valueOwner, - const ImportsPerDocument &imports, const ViewerContext &vContext); + const ImportsPerDocument &imports, const ViewerContext &viewerContext); ~Context(); ContextPtr ptr() const; ValueOwner *valueOwner() const; Snapshot snapshot() const; - ViewerContext vContext() const; + ViewerContext viewerContext() const; const Imports *imports(const Document *doc) const; @@ -73,7 +73,7 @@ public: private: // Context takes ownership of valueOwner Context(const Snapshot &snapshot, ValueOwner *valueOwner, const ImportsPerDocument &imports, - const ViewerContext &vContext); + const ViewerContext &viewerContext); Snapshot _snapshot; QSharedPointer _valueOwner; diff --git a/src/libs/qmljs/qmljsimportdependencies.cpp b/src/libs/qmljs/qmljsimportdependencies.cpp index cfe16ae7d3f..dd3e2e70b8e 100644 --- a/src/libs/qmljs/qmljsimportdependencies.cpp +++ b/src/libs/qmljs/qmljsimportdependencies.cpp @@ -198,7 +198,7 @@ ImportKey ImportKey::flatKey() const { return res; } -QString ImportKey::libPath() const +QString ImportKey::libraryQualifiedPath() const { QString res = splitPath.join(QString::fromLatin1(".")); if (res.isEmpty() && !splitPath.isEmpty()) diff --git a/src/libs/qmljs/qmljsimportdependencies.h b/src/libs/qmljs/qmljsimportdependencies.h index 0ec88cc1e74..8a412b754ea 100644 --- a/src/libs/qmljs/qmljsimportdependencies.h +++ b/src/libs/qmljs/qmljsimportdependencies.h @@ -108,7 +108,7 @@ public: int minorVersion; QString path() const; - QString libPath() const; + QString libraryQualifiedPath() const; void addToHash(QCryptographicHash &hash) const; ImportKey flatKey() const; diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp index 0f48b1a2c28..3eee5fe7c08 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp @@ -163,10 +163,10 @@ static QString qualifiedTypeNameForContext(const ObjectValue *objectValue, << " vs " << typeName << " for " << e.exportName.toString(); } - if (packages.isEmpty() || packages.contains(e.exportName.libPath())) { + if (packages.isEmpty() || packages.contains(e.exportName.libraryQualifiedPath())) { if (e.exportName.splitPath.value(0) == QLatin1String("QtQuick")) hasQtQuick = true; - possibleLibraries.append(e.exportName.libPath() + '.' + typeName); + possibleLibraries.append(e.exportName.libraryQualifiedPath() + '.' + typeName); } break; } @@ -298,7 +298,7 @@ public: if (const CppComponentValue * cppComponentValue = value_cast(value)) { TypeName qualifiedTypeName = qualifiedTypeNameForContext(cppComponentValue, - m_context->vContext(), *m_context->snapshot().importDependencies()).toUtf8(); + m_context->viewerContext(), *m_context->snapshot().importDependencies()).toUtf8(); m_properties.append(qMakePair(propertyName, qualifiedTypeName)); } else { TypeId typeId;