summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-06-11 23:46:39 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-06-11 23:46:39 (GMT)
commit74c18979b927ba3dd82ed3f5ca362428c61c2675 (patch)
tree9d3588bf393535034b6af21d6ba9c7201bc22ac5 /src/declarative/qml
parentf10791eb1c45b090f60a2c2ecca3cc5fd237278e (diff)
downloadQt-74c18979b927ba3dd82ed3f5ca362428c61c2675.zip
Qt-74c18979b927ba3dd82ed3f5ca362428c61c2675.tar.gz
Qt-74c18979b927ba3dd82ed3f5ca362428c61c2675.tar.bz2
More explicit QUrl <-> QString conversion.
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qmlbindablevalue.cpp2
-rw-r--r--src/declarative/qml/qmlcompiler.cpp2
-rw-r--r--src/declarative/qml/qmlcompositetypemanager.cpp4
-rw-r--r--src/declarative/qml/qmlengine.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/declarative/qml/qmlbindablevalue.cpp b/src/declarative/qml/qmlbindablevalue.cpp
index e1b6961..f2cfcf8 100644
--- a/src/declarative/qml/qmlbindablevalue.cpp
+++ b/src/declarative/qml/qmlbindablevalue.cpp
@@ -136,7 +136,7 @@ void QmlBindableValue::update()
QVariant value = this->value();
if (d->property.propertyType() == QVariant::Url &&
value.canConvert(QVariant::String) && !value.isNull())
- value.setValue(context()->resolvedUrl(value.toString()));
+ value.setValue(context()->resolvedUrl(QUrl(value.toString())));
d->property.write(value);
}
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 3123254..41cbc19 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -281,7 +281,7 @@ bool QmlCompiler::compileStoreInstruction(QmlInstruction &instr,
case QVariant::Url:
{
instr.type = QmlInstruction::StoreUrl;
- QUrl u = output->url.resolved(string);
+ QUrl u = output->url.resolved(QUrl(string));
instr.storeUrl.propertyIndex = prop.propertyIndex();
instr.storeUrl.value = output->indexForString(u.toString());
}
diff --git a/src/declarative/qml/qmlcompositetypemanager.cpp b/src/declarative/qml/qmlcompositetypemanager.cpp
index a5e302c..9950b48 100644
--- a/src/declarative/qml/qmlcompositetypemanager.cpp
+++ b/src/declarative/qml/qmlcompositetypemanager.cpp
@@ -109,7 +109,7 @@ QmlCompositeTypeData::toCompiledComponent(QmlEngine *engine)
status = Error;
errors = compiler.errors();
for(int ii = 0; ii < errors.count(); ++ii)
- errors[ii].setUrl(url);
+ errors[ii].setUrl(compiledComponent->url);
compiledComponent->release();
compiledComponent = 0;
}
@@ -336,7 +336,7 @@ void QmlCompositeTypeManager::compile(QmlCompositeTypeData *unit)
unit->status = QmlCompositeTypeData::Error;
{
QmlError error;
- error.setUrl(unit->url);
+ error.setUrl(QUrl(unit->url));
error.setDescription(tr("Type %1 unavailable").arg(QLatin1String(type)));
unit->errors << error;
}
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index 2c1d324..23ab744 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -1128,7 +1128,7 @@ QVariant QmlExpression::value()
for (int i = context()->d_func()->scopeChain.size() - 1; i > -1; --i) {
scriptEngine->currentContext()->pushScope(context()->d_func()->scopeChain.at(i));
}
- QScriptValue svalue = scriptEngine->evaluate(expression(), d->fileName, d->line);
+ QScriptValue svalue = scriptEngine->evaluate(expression(), d->fileName.toString(), d->line);
if (scriptEngine->hasUncaughtException()) {
if (scriptEngine->uncaughtException().isError()){
QScriptValue exception = scriptEngine->uncaughtException();