Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.3.2
-
None
-
Windows 7, x64
Description
One of our clients have broken 3rd party software installed, which fails (crashes) when tries to provide filesystem icons when queried by SHGetFileInfo(). Large icons are OK, while small icons requested by Qt apps ends with crash in this 3rd-party DLL.
Replacing the problematic software is not an option in our case, so we tried to do not use system-provided icons at al. In most cases it is easy (just provide own QFileIconProvider to all filesystem models), but with one exclusion, the QFIleDialog:
1) If we use QFileDialog::setIconProvider before
QFileDialog::setOptions(QFileDialog::ShowDirsOnly | QFileDialog::DontUseCustomDirectoryIcons | QFileDialog::DontUseNativeDialog)
Our icon provider is silently ignored.
2) If we call setOptions first, this results in QFileDialogPrivate::createWidgets(), which calls QTreeView::setModel(), which calls model's sort() call, which, in turn, populates QFileSystemModel 1'st level nodes and fetches default system-provided icons, which results in crash.
The thing we need is to setIconProvider() works before setOptions()
Attachments
Issue Links
- relates to
-
QTBUG-99178 QFileSystemModel should have an option to disable icon loading; crashes if the icon provider is null
- Closed
-
QTBUG-33039 get{Open|Save}FileName hangs for about 10 seconds in a loaded folder
- Closed
-
QTBUG-63872 QFileDialog: no way to set icon provider before creating widget
- Closed