diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-05-21 08:00:43 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-05-21 08:04:56 (GMT) |
commit | 25e2e372e43374c4f161c06e48f62e738b968370 (patch) | |
tree | 911133fa7768696afa2014f398cde9d1e31abfb4 /tests/auto/declarative | |
parent | d5a86d924bfe331aeba6465b0f249cd27ef83ad4 (diff) | |
download | Qt-25e2e372e43374c4f161c06e48f62e738b968370.zip Qt-25e2e372e43374c4f161c06e48f62e738b968370.tar.gz Qt-25e2e372e43374c4f161c06e48f62e738b968370.tar.bz2 |
Fix FolderListModel parentFolder property's file drive handling
Task-number: QT-3315
Reviewed-by: Martin Jones
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r-- | tests/auto/declarative/declarative.pro | 1 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index 4bb3518..484fbef 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -24,6 +24,7 @@ SUBDIRS += \ qdeclarativeecmascript \ qdeclarativeengine \ qdeclarativeerror \ + qdeclarativefolderlistmodel \ qdeclarativefontloader \ qdeclarativeflickable \ qdeclarativeflipable \ diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp b/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp index 8a8bfe7..3cf9613 100644 --- a/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp +++ b/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp @@ -93,7 +93,6 @@ void tst_qdeclarativefolderlistmodel::basicProperties() QAbstractListModel *flm = qobject_cast<QAbstractListModel*>(component.create()); QVERIFY(flm != 0); - flm->setProperty("folder",QUrl::fromLocalFile(SRCDIR "/data")); QTRY_COMPARE(flm->property("count").toInt(),2); // wait for refresh QCOMPARE(flm->property("folder").toUrl(), QUrl::fromLocalFile(SRCDIR "/data")); @@ -105,7 +104,10 @@ void tst_qdeclarativefolderlistmodel::basicProperties() QCOMPARE(flm->property("showDotAndDotDot").toBool(), false); QCOMPARE(flm->property("showOnlyReadable").toBool(), false); QCOMPARE(flm->data(flm->index(0),FileNameRole).toString(), QLatin1String("basic.qml")); - QCOMPARE(flm->data(flm->index(1),FileNameRole).toString(), QLatin1String("dummy.qml")); + QCOMPARE(flm->data(flm->index(1),FileNameRole).toString(), QLatin1String("dummy.qml")); + + flm->setProperty("folder",QUrl::fromLocalFile("")); + QCOMPARE(flm->property("folder").toUrl(), QUrl::fromLocalFile("")); } QTEST_MAIN(tst_qdeclarativefolderlistmodel) |