diff options
author | David Faure <david.faure@kdab.com> | 2014-07-25 18:29:19 +0200 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2014-07-26 00:46:13 +0200 |
commit | 8c80dd6a9893c6e323ae69b651efd7b629b2714c (patch) | |
tree | 843aa76e5125aa082419140d19e121bbb019ebf3 /tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp | |
parent | 302687f21c99643a2dd1930a19fde66ba725661e (diff) |
QDeclarativeError::toString: improve handling of empty urls.
"file::2:23: ..." is strange to read. Show "<Unknown File>:2:23: ..." instead,
by treating empty urls (including "file:") as unknown, and by still showing
line and column numbers in such a case.
This change makes it possible for QUrl::fromLocalFile("") to return an
empty url rather than "file:", which this module was relying upon in the tests.
Change-Id: Id6d8aaa73673283cb65cbd1316dca77f859a3f8f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp index bc46a2df..bed4efa5 100644 --- a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp +++ b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp @@ -337,7 +337,7 @@ void tst_qdeclarativecontext::setContextProperty() QDeclarativeContext ctxt(engine.rootContext()); ctxt.setContextProperty("ctxtProp", QVariant()); - QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: TypeError: Result of expression 'ctxtProp' [undefined] is not an object."); + QTest::ignoreMessage(QtWarningMsg, "<Unknown File>:1: TypeError: Result of expression 'ctxtProp' [undefined] is not an object."); QObject *obj = component.create(&ctxt); QVariant v = obj->property("obj"); |