diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-21 22:00:43 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-21 22:00:43 (GMT) |
commit | f81fcf9b50360d79aa186d5719d480d736ac576f (patch) | |
tree | 70f1608ac1a3c04754f44769b515bd7c95e00f66 /tests/auto/declarative/qdeclarativefolderlistmodel | |
parent | cb23151d3abfdbdf291abe8a1510592db2011927 (diff) | |
parent | 93315950003e14df6a43bea50829d17adef7fe30 (diff) | |
download | Qt-f81fcf9b50360d79aa186d5719d480d736ac576f.zip Qt-f81fcf9b50360d79aa186d5719d480d736ac576f.tar.gz Qt-f81fcf9b50360d79aa186d5719d480d736ac576f.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Fix FolderListModel parentFolder property's file drive handling
Add license headers for .qml files.
Also show file/line numbers on XML query errors.
Print warnings for xml query syntax errors
Clean up
Add XmlListModel::get()
Diffstat (limited to 'tests/auto/declarative/qdeclarativefolderlistmodel')
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) |