qt6-bb10/tests/auto/gui/itemmodels
Ahmad Samir 2a8b27bf6c QFileSystemModel: don't crash with setIconProvider(nullptr)
The method takes a pointer, so the code shouldn't crash when passed a
nullptr.

QFileInfoGatherer::getInfo() still needs to generate a descriptive
string for the file, so we refactor QAbstractFileIconProvider::type()
to put the implementation into a reusable static function
QAbstractFileIconProviderPrivate::getFileType(const QFileInfo &info).
This unfortunately involves constructing a QMimeDatabase on the fly,
but the docs say that is fine.

Drive-by change: use nullptr instead of `0` for pointers.

Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-99178
Change-Id: Ia32ea0a26701d593e74fbecced7be8d9e0aa0f52
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2024-02-01 22:06:12 +00:00
..
qfilesystemmodel QFileSystemModel: don't crash with setIconProvider(nullptr) 2024-02-01 22:06:12 +00:00
qstandarditem QStandardItem: add note about reimplementing data/setData() wrt. flags 2023-11-14 21:23:45 +02:00
qstandarditemmodel Silence -Wbraced-scalar-init warning 2023-12-13 18:09:31 +01:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00