aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/qml/qqmlbinding.cpp2
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp2
-rw-r--r--src/qml/qml/v8/qv8bindings.cpp5
-rw-r--r--tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp2
-rw-r--r--tests/auto/qml/qqmlengine/tst_qqmlengine.cpp2
5 files changed, 4 insertions, 9 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index c4f48ef63d..d2a02dc712 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -230,8 +230,6 @@ void QQmlBinding::update(QQmlPropertyPrivate::WriteFlags flags)
if (needsErrorData) {
QUrl url = QUrl(m_url);
- if (url.isEmpty()) url = QUrl(QLatin1String("<Unknown File>"));
-
delayedError()->error.setUrl(url);
delayedError()->error.setLine(m_lineNumber);
delayedError()->error.setColumn(m_columnNumber);
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index aad6a04714..569a292a8b 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -263,7 +263,7 @@ void QQmlJavaScriptExpression::exceptionToError(v8::Handle<v8::Message> message,
v8::Local<v8::String> file = name->IsString()?name->ToString():v8::Local<v8::String>();
if (file.IsEmpty() || file->Length() == 0)
- error.setUrl(QUrl(QLatin1String("<Unknown File>")));
+ error.setUrl(QUrl());
else
error.setUrl(QUrl(QV8Engine::toStringStatic(file)));
diff --git a/src/qml/qml/v8/qv8bindings.cpp b/src/qml/qml/v8/qv8bindings.cpp
index 025854f1ac..65c395e013 100644
--- a/src/qml/qml/v8/qv8bindings.cpp
+++ b/src/qml/qml/v8/qv8bindings.cpp
@@ -144,10 +144,7 @@ void QV8Bindings::Binding::update(QQmlPropertyPrivate::WriteFlags flags)
if (!watcher.wasDeleted() && !destroyedFlag()) {
if (needsErrorData) {
- QUrl url = parent->url();
- if (url.isEmpty()) url = QUrl(QLatin1String("<Unknown File>"));
-
- delayedError()->error.setUrl(url);
+ delayedError()->error.setUrl(parent->url());
delayedError()->error.setLine(instruction->line);
delayedError()->error.setColumn(-1);
}
diff --git a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp
index 6525bde9b8..16365eeaa8 100644
--- a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp
+++ b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp
@@ -345,7 +345,7 @@ void tst_qqmlcontext::setContextProperty()
QQmlContext ctxt(engine.rootContext());
ctxt.setContextProperty("ctxtProp", QVariant());
- QTest::ignoreMessage(QtWarningMsg, "<Unknown File>:1: TypeError: Cannot read property 'a' of undefined");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: TypeError: Cannot read property 'a' of undefined");
QObject *obj = component.create(&ctxt);
QVariant v = obj->property("obj");
diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
index af2c897d7a..89fc8e05d9 100644
--- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
+++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
@@ -268,7 +268,7 @@ void tst_qqmlengine::outputWarningsToStandardError()
delete o;
QCOMPARE(warnings.count(), 1);
- QCOMPARE(warnings.at(0), QLatin1String("<Unknown File>:1: Unable to assign [undefined] to int"));
+ QCOMPARE(warnings.at(0), QLatin1String("<Unknown File>: Unable to assign [undefined] to int"));
warnings.clear();