Commit c7ccb617 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Enable fetching mime type from KIO slaves for thumbnail grids

parent ec4009b8
......@@ -80,6 +80,11 @@ if (KF5ConfigWidgets_VERSION VERSION_GREATER "5.56.0" AND ${Phonon4Qt5_VERSION}
MESSAGE(STATUS "compile without foreach")
endif()
message(STATUS ${KF5KIO_VERSION})
if (KF5KIO_VERSION VERSION_GREATER_EQUAL "5.82.0")
add_definitions(-DKIO_REQUEST_MIMETYPE)
endif()
## Dependencies
find_package(JPEG)
set_package_properties(JPEG PROPERTIES URL "http://libjpeg.sourceforge.net/" DESCRIPTION "JPEG image manipulation support" TYPE REQUIRED)
......
......@@ -80,6 +80,11 @@ SortedDirModel::SortedDirModel(QObject* parent)
d->mSourceModel = new SemanticInfoDirModel(this);
#endif
setSourceModel(d->mSourceModel);
#ifdef KIO_REQUEST_MIMETYPE
d->mSourceModel->dirLister()->setRequestMimeTypeWhileListing(true);
#endif
d->mDelayedApplyFiltersTimer.setInterval(0);
d->mDelayedApplyFiltersTimer.setSingleShot(true);
connect(&d->mDelayedApplyFiltersTimer, &QTimer::timeout, this, &SortedDirModel::doApplyFilters);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment