Verified Commit b1b841a2 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

wallpapers/image: Move openContainingFolder to SlideFilterModel

parent 59188cf1
......@@ -12,6 +12,8 @@
#include <QDir>
#include <QRandomGenerator>
#include <KIO/OpenFileManagerWindowJob>
#include <algorithm>
SlideFilterModel::SlideFilterModel(QObject *parent)
......@@ -168,8 +170,7 @@ int SlideFilterModel::indexOf(const QString &path)
void SlideFilterModel::openContainingFolder(int rowIndex)
{
auto sourceIndex = mapToSource(index(rowIndex, 0));
static_cast<SlideModel *>(sourceModel())->openContainingFolder(sourceIndex.row());
KIO::highlightInFileManager({index(rowIndex, 0).data(ImageRoles::PathRole).toUrl()});
}
void SlideFilterModel::buildRandomOrder()
......
Supports Markdown
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