Ahmad Samir 1753af3841 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.6 6.5
Fixes: QTBUG-99178
Change-Id: Ia32ea0a26701d593e74fbecced7be8d9e0aa0f52
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 2a8b27bf6c523de6f3f466f8062279c093940a60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-05 23:15:07 +00:00
2020-11-16 10:02:08 +02:00
2024-02-02 09:47:31 +00:00
2024-02-02 08:48:31 +00:00
2015-08-18 19:59:14 +00:00
2024-02-02 15:28:34 +00:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%