diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-06-04 17:32:31 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-05 10:01:44 +0200 |
commit | 8a71e2bd031230777dcfbb482af40a03b8d91507 (patch) | |
tree | 3a480949822d2bb15b5746decc3147e915397f6a /src/qml/qml/qqmlobjectcreator.cpp | |
parent | 722c06318718f373a581e74913965b5dfa3979fb (diff) |
Cleanup: Get rid of the url and file name members in QQmlCompiledData
This is part of the effor of moving members from QQmlCompiledData into
QV4::CompilationUnit in order to eliminate the former in the long run.
Change-Id: Icce7fe0ee9a49cb3a7677fd7020008fc55ecdcf6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 65e302d3d9..5eaea7d9f4 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -179,8 +179,8 @@ QObject *QQmlObjectCreator::create(int subComponentIndex, QObject *parent, QQmlI context = new QQmlContextData; context->isInternal = true; - context->url = compiledData->url; - context->urlString = compiledData->name; + context->url = compiledData->url(); + context->urlString = compiledData->fileName(); context->imports = compiledData->importCache; context->imports->addref(); context->setParent(parentContext); @@ -384,7 +384,7 @@ void QQmlObjectCreator::setPropertyValue(QQmlPropertyData *property, const QV4:: QString string = binding->valueAsString(&qmlUnit->header); // Encoded dir-separators defeat QUrl processing - decode them first string.replace(QLatin1String("%2f"), QLatin1String("/"), Qt::CaseInsensitive); - QUrl value = string.isEmpty() ? QUrl() : compiledData->url.resolved(QUrl(string)); + QUrl value = string.isEmpty() ? QUrl() : compiledData->url().resolved(QUrl(string)); // Apply URL interceptor if (engine->urlInterceptor()) value = engine->urlInterceptor()->intercept(value, QQmlAbstractUrlInterceptor::UrlString); @@ -579,7 +579,7 @@ void QQmlObjectCreator::setPropertyValue(QQmlPropertyData *property, const QV4:: } else if (property->propType == qMetaTypeId<QList<QUrl> >()) { Q_ASSERT(binding->type == QV4::CompiledData::Binding::Type_String); QString urlString = binding->valueAsString(&qmlUnit->header); - QUrl u = urlString.isEmpty() ? QUrl() : compiledData->url.resolved(QUrl(urlString)); + QUrl u = urlString.isEmpty() ? QUrl() : compiledData->url().resolved(QUrl(urlString)); QList<QUrl> value; value.append(u); argv[0] = reinterpret_cast<void *>(&value); @@ -1006,7 +1006,7 @@ void QQmlObjectCreator::setupFunctions() void QQmlObjectCreator::recordError(const QV4::CompiledData::Location &location, const QString &description) { QQmlError error; - error.setUrl(compiledData->url); + error.setUrl(compiledData->url()); error.setLine(location.line); error.setColumn(location.column); error.setDescription(description); @@ -1063,7 +1063,7 @@ QObject *QQmlObjectCreator::createInstance(int index, QObject *parent, bool isCo sharedState->allCreatedObjects.push(instance); } else { Q_ASSERT(typeRef->component); - Q_QML_OC_PROFILE(sharedState->profiler, profiler.update(typeRef->component->name, + Q_QML_OC_PROFILE(sharedState->profiler, profiler.update(typeRef->component->fileName(), context->url, obj->location.line, obj->location.column)); if (typeRef->component->qmlUnit->isSingleton()) { |