From 3240c84db845e6ab50e059234910bf6e9006d382 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Fri, 3 Sep 2021 13:02:29 +0200 Subject: [PATCH] Fix missing clearComponentCache for macos --- ScreenPlayWallpaper/src/basewindow.h | 1 + ScreenPlayWallpaper/src/macwindow.cpp | 5 +++++ ScreenPlayWallpaper/src/macwindow.h | 1 + ScreenPlayWallpaper/src/winwindow.h | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ScreenPlayWallpaper/src/basewindow.h b/ScreenPlayWallpaper/src/basewindow.h index a96b57fd..8c1534cf 100644 --- a/ScreenPlayWallpaper/src/basewindow.h +++ b/ScreenPlayWallpaper/src/basewindow.h @@ -150,6 +150,7 @@ public slots: virtual void destroyThis() { } virtual void setVisible(bool show) { Q_UNUSED(show) } virtual void messageReceived(QString key, QString value) final; + virtual void clearComponentCache() {} virtual void replaceWallpaper( const QString absolutePath, const QString file, diff --git a/ScreenPlayWallpaper/src/macwindow.cpp b/ScreenPlayWallpaper/src/macwindow.cpp index 6f2d9873..08f621e8 100644 --- a/ScreenPlayWallpaper/src/macwindow.cpp +++ b/ScreenPlayWallpaper/src/macwindow.cpp @@ -63,3 +63,8 @@ void MacWindow::destroyThis() { QCoreApplication::quit(); } + +void MacWindow::clearComponentCache() +{ + m_window.engine()->clearComponentCache(); +} diff --git a/ScreenPlayWallpaper/src/macwindow.h b/ScreenPlayWallpaper/src/macwindow.h index d47591fe..56470d25 100644 --- a/ScreenPlayWallpaper/src/macwindow.h +++ b/ScreenPlayWallpaper/src/macwindow.h @@ -65,6 +65,7 @@ signals: public slots: void setVisible(bool show) override; void destroyThis() override; + void clearComponentCache() override; private: QQuickView m_window; diff --git a/ScreenPlayWallpaper/src/winwindow.h b/ScreenPlayWallpaper/src/winwindow.h index abb808f2..32454c1e 100644 --- a/ScreenPlayWallpaper/src/winwindow.h +++ b/ScreenPlayWallpaper/src/winwindow.h @@ -73,7 +73,7 @@ public slots: void setVisible(bool show) override; void destroyThis() override; void terminate(); - void clearComponentCache(); + void clearComponentCache() override; void setWindowsDesktopProperties(WindowsDesktopProperties* windowsDesktopProperties) {