qt5base-lts/tests/auto/widgets/dialogs/qfilesystemmodel
Alexander Volkov acf43c17b6 QFileSystemModel: create nodes with correct QFileInfos
Create parent nodes with the corresponding paths, not with
the absolute path of the child node. Otherwise we will get
incorrect QFileInfo at least in the following case:

    QFileSystemModel model;
    model.setRootPath("/usr/bin");
    QModelIndex idx = model.setRootPath("/usr");
    qDebug() << model.fileInfo(idx).absoluteFilePath();

Without the fix it prints "/usr/bin".

It's a regression triggered by 61cefb2f7a
(De-inline QFileSystemModel::fileInfo() and implement it efficiently).

Change-Id: I3b4e5f5b256711e27ad50824eaa8492dbc096808
Task-number: QTBUG-51586
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-05-10 20:51:15 +00:00
..
.gitignore Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
qfilesystemmodel.pro tests: Remove superfluous gui additions to QT 2014-02-28 17:59:29 +01:00
tst_qfilesystemmodel.cpp QFileSystemModel: create nodes with correct QFileInfos 2016-05-10 20:51:15 +00:00