qt6-bb10/tests/manual/dialogs
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
..
CMakeLists.txt Mark all of Qt as free of Q_FOREACH, except where it isn't 2023-08-19 05:19:42 +00:00
colordialogpanel.cpp tests/manual: fix compiler warnings about missing override keyword 2023-11-28 16:11:59 +02:00
colordialogpanel.h Add window-modal show option to dialogs manual test 2022-09-13 18:13:00 +02:00
dialogs.pro
filedialogpanel.cpp QFileSystemModel: don't crash with setIconProvider(nullptr) 2024-02-01 22:06:12 +00:00
filedialogpanel.h QFileSystemModel: don't crash with setIconProvider(nullptr) 2024-02-01 22:06:12 +00:00
fontdialogpanel.cpp Add window-modal show option to dialogs manual test 2022-09-13 18:13:00 +02:00
fontdialogpanel.h Add window-modal show option to dialogs manual test 2022-09-13 18:13:00 +02:00
main.cpp
messageboxpanel.cpp
messageboxpanel.h
printdialogpanel.cpp Mark all of Qt as free of Q_FOREACH, except where it isn't 2023-08-19 05:19:42 +00:00
printdialogpanel.h
printdialogpanel.ui
utils.cpp Mark all of Qt as free of Q_FOREACH, except where it isn't 2023-08-19 05:19:42 +00:00
utils.h Add window-modal show option to dialogs manual test 2022-09-13 18:13:00 +02:00
wizardpanel.cpp tests/manual: fix compiler warnings about missing override keyword 2023-11-28 16:11:59 +02:00
wizardpanel.h Add window-modal show option to dialogs manual test 2022-09-13 18:13:00 +02:00