@ -53,6 +53,7 @@
#include <QProcess>
#include <QSettings>
#include <QDesktopServices>
#include <QPixmapCache>
// Qt Quick
#include <QQuickItem>
@ -1199,6 +1200,11 @@ void FolderModel::keyboardSearch(const QString &text)
}
void FolderModel::clearPixmapCache()
{
QPixmapCache::clear();
void FolderModel::restoreFromTrash()
if (!m_selectionModel->hasSelection())
@ -209,6 +209,8 @@ public:
Q_INVOKABLE void updateSelectedItemsSize();
Q_INVOKABLE void keyboardSearch(const QString &text);
Q_INVOKABLE void clearPixmapCache();
void restoreFromTrash();
bool isDesktop() const;
@ -41,6 +41,9 @@ Item {
clip: true
cache: false
// Clear cache
onSourceChanged: dirModel.clearPixmapCache()
ColorOverlay {
id: dimsWallpaper
anchors.fill: parent
@ -21,6 +21,7 @@
#include <QEvent>
#include <QDebug>
#include <QQuickWindow>
Window::Window(QObject *parent)
: QQmlApplicationEngine(parent)
@ -40,6 +41,7 @@ void Window::load(const QUrl &url)
bool Window::eventFilter(QObject *obj, QEvent *e)
if (e->type() == QEvent::Close) {
clearComponentCache();
deleteLater();
e->accept();