forked from qt-creator/qt-creator
qmljs: avoid shortened names
libPath -> libraryQualifiedPath vContext -> viewerContext Change-Id: I085f5f3304a6becaa00f715cb3395c8cee5227c6 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
@@ -91,7 +91,7 @@ QmlJS::Snapshot Context::snapshot() const
|
||||
return _snapshot;
|
||||
}
|
||||
|
||||
ViewerContext Context::vContext() const
|
||||
ViewerContext Context::viewerContext() const
|
||||
{
|
||||
return _vContext;
|
||||
}
|
||||
|
@@ -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> _valueOwner;
|
||||
|
@@ -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())
|
||||
|
@@ -108,7 +108,7 @@ public:
|
||||
int minorVersion;
|
||||
|
||||
QString path() const;
|
||||
QString libPath() const;
|
||||
QString libraryQualifiedPath() const;
|
||||
|
||||
void addToHash(QCryptographicHash &hash) const;
|
||||
ImportKey flatKey() const;
|
||||
|
@@ -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<CppComponentValue>(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;
|
||||
|
Reference in New Issue
Block a user