-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.0
-
None
-
Windows 7 64bit.
-
9b671727010ccc45cc51840630b159cd34dd983d
On Windows system the folder of qquickfolderlistmodel couldn't be changed to an existing folder on different drive other than the current working dir of application using qquickfolderlistmodel.
For example, I have installed qt in d:\qt5, and of course I have a folder called c:\Windows.
Add one test case in tst_qquickfolderlistmodel:
void tst_qquickfolderlistmodel::changeFolder()
{
QQmlComponent component(&engine, testFileUrl("basic.qml"));
QAbstractListModel *flm = qobject_cast<QAbstractListModel*>(component.create());
QVERIFY(flm != 0);
QSignalSpy folderChangeSpy(flm, SIGNAL(folderChanged()));
flm->setProperty("folder",QUrl::fromLocalFile("d:/qt5/"));
QCOMPARE(flm->property("folder").toUrl(), QUrl::fromLocalFile("d:/qt5/"));
QTRY_COMPARE(folderChangeSpy.count(), 1); // pass!
flm->setProperty("folder",QUrl::fromLocalFile("c:/Windows/"));
QCOMPARE(flm->property("folder").toUrl(), QUrl::fromLocalFile("c:/Windows/"));
QTRY_COMPARE(folderChangeSpy.count(), 2); // fail!
}
Then run the tst_qquickfolderlistmodel in its corresponding directory located in d: drive. The second QTRY_COMPARE would fail. This issue is now affecting a number of examples for qtmultimedia which uses qquickfolderlistmodel in file browser.