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);
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)));
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);
}
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");
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();