File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -239,12 +239,15 @@ QString QAbstractFileIconProvider::type(const QFileInfo &info) const
239
239
if (QFileSystemEntry::isRootPath (info.absoluteFilePath ()))
240
240
return QGuiApplication::translate (" QAbstractFileIconProvider" , " Drive" );
241
241
if (info.isFile ()) {
242
- #if QT_CONFIG(mimetype)
242
+ #if 0 // QT_CONFIG(mimetype)
243
243
const QMimeType mimeType = d->mimeDatabase.mimeTypeForFile(info);
244
244
return mimeType.comment().isEmpty() ? mimeType.name() : mimeType.comment();
245
245
#else
246
- Q_UNUSED (d);
247
- return QGuiApplication::translate (" QAbstractFileIconProvider" , " File" );
246
+ if (!info.suffix ().isEmpty ()) {
247
+ // : %1 is a file name suffix, for example txt
248
+ return QGuiApplication::translate (" QAbstractFileIconProvider" , " %1 File" ).arg (info.suffix ());
249
+ }
250
+ return QGuiApplication::translate (" QAbstractFileIconProvider" , " File" );
248
251
#endif
249
252
}
250
253
You can’t perform that action at this time.
0 commit comments