Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
-
None
-
fb9ec8ad44decba7b2878370f3711b61614f035a (qt/qtbase/dev), 22bde5209 (dev), c014312c2 (6.8), a5f8baeee (tqtc/lts-6.5)
Description
I was wondering why QFileSystemModel wouldn't get noticed by Creator until I checked its doc and saw that it's in widgets for some reason. And that reason is:
#if QT_CONFIG(messagebox) QMessageBox::information(0, QFileSystemModel::tr("Invalid filename"), QFileSystemModel::tr("<b>The name \"%1\" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.") .arg(newName), QMessageBox::Ok); #endif // QT_CONFIG(messagebox)
http://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/dialogs/qfilesystemmodel.cpp#n877
The mind boggles.
This is completely the wrong place for something like this. The error should be reported in some other way, and then client code can do what they want with it.
Another strange thing is that it's in src/widgets/dialogs.
I was planning on using QFileSystemModel to serve as the logic behind a save game dialog, with a QSortFilterProxyModel on top of it to validate the save files to ensure that they're actually save files. Having QFileSystemModel available in Qt GUI so that Qt Quick-only applications can use it would be really helpful.
Attachments
Issue Links
- relates to
-
PYSIDE-1500 QFileIconProvider contains a bug where by the icons do not convert to pixmap correctly.
-
- Closed
-
-
PYSIDE-1560 QFileSystemModel doesn't provide icons anymore
-
- Closed
-
-
QTBUG-91104 REG->6.0/Windows : QFileSystemModel no longer displays file icons
-
- Closed
-
- resulted in
-
QTBUG-117861 Very slow QFileIconProvider since Qt6
-
- Reported
-