summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativefolderlistmodel
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-05-23 23:08:24 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-05-23 23:08:24 (GMT)
commit4b14fa2e56a0273069f474c3100339d85ab249a7 (patch)
tree9072be92d524875ea549e522f1ab75bdfe23300e /tests/auto/declarative/qdeclarativefolderlistmodel
parent4ef2862b791c210a30586ba140cc6f508e06883f (diff)
parentf81fcf9b50360d79aa186d5719d480d736ac576f (diff)
downloadQt-4b14fa2e56a0273069f474c3100339d85ab249a7.zip
Qt-4b14fa2e56a0273069f474c3100339d85ab249a7.tar.gz
Qt-4b14fa2e56a0273069f474c3100339d85ab249a7.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tests/auto/declarative/qdeclarativefolderlistmodel')
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/data/basic.qml41
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/data/dummy.qml41
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp6
3 files changed, 86 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/data/basic.qml b/tests/auto/declarative/qdeclarativefolderlistmodel/data/basic.qml
index 2c4977d..a9b7962 100644
--- a/tests/auto/declarative/qdeclarativefolderlistmodel/data/basic.qml
+++ b/tests/auto/declarative/qdeclarativefolderlistmodel/data/basic.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt.labs.folderlistmodel 1.0
FolderListModel {
diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/data/dummy.qml b/tests/auto/declarative/qdeclarativefolderlistmodel/data/dummy.qml
index 609638b..0cf2bb1 100644
--- a/tests/auto/declarative/qdeclarativefolderlistmodel/data/dummy.qml
+++ b/tests/auto/declarative/qdeclarativefolderlistmodel/data/dummy.qml
@@ -1 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// This file is not used, it is just content for QDirModel
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)