-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
4.7.4, 4.8.2, 6.8.0
-
None
-
5eba8693b (dev), 7c97e8d2a (6.8), b28cf44e6 (6.7), 1d524f5a2 (tqtc/lts-6.5)
Currently (even for Qt-5), the code look like that:
inline QString QFileSystemModel::fileName(const QModelIndex &aindex) const
However, the implementation of the data() method uses a different role:
case FileNameRole:
return d->name(index);
So the filename() method fails whenever the column in aindex is not zero.
The corrected method should look like:
inline QString QFileSystemModel::fileName(const QModelIndex &aindex) const