aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core')
-rw-r--r--src-qt5/core/lumina-desktop-unified/lumina-desktop.pro2
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp7
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h5
3 files changed, 9 insertions, 5 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro
index ebc13b6f..bb987e25 100644
--- a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro
+++ b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro
@@ -24,7 +24,7 @@ include(../libLumina/ExternalProcess.pri)
include(../../src-cpp/NativeWindow.pri)
include(../libLumina/XDGMime.pri)
-include(../../src-cpp/plugins-screensaver.pri)
+include(../../src-cpp/plugins-base.pri)
#include all the main individual source groups
include(src-screensaver/screensaver.pri)
diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp
index 7c098887..aa3214a2 100644
--- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp
@@ -7,6 +7,9 @@
#include "SSBaseWidget.h"
+//Relative directory to search along the XDG paths for screensavers
+#define REL_DIR QString("/lumina-desktop/screensavers")
+
#define DEBUG 0
// ========
@@ -39,10 +42,10 @@ void SSBaseWidget::startPainting(){
stopPainting();
//If a random plugin - grab one of the known plugins
if(plugType=="random"){
- QList<SSPlugin> valid = SSPluginSystem::findAllPlugins();
+ QList<SSPlugin> valid = PluginSystem::findAllPlugins<SSPlugin>(REL_DIR);
if(!valid.isEmpty()){ cplug = valid[ qrand()%valid.length() ]; } //grab a random plugin
}else if(plugType!="none"){
- cplug = SSPluginSystem::findPlugin(plugType);
+ cplug = PluginSystem::findPlugin<SSPlugin>(plugType, REL_DIR);
}
if(DEBUG){ qDebug() << " - Screen Saver:" << plugType << cplug.scriptURL() << cplug.isValid(); }
if(cplug.isValid()){
diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h
index 72e02702..e0a03d17 100644
--- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h
@@ -10,6 +10,7 @@
#define _LUMINA_DESKTOP_SCREEN_SAVER_BASE_WIDGET_H
#include "global-includes.h"
+#include <plugins-base.h>
#include <plugins-screensaver.h>
class SSBaseWidget : public QQuickView{
@@ -25,8 +26,8 @@ public slots:
void stopPainting();
private:
- QString plugType;
- SSPlugin cplug;
+ QString plugType;
+ SSPlugin cplug;
QTimer *restartTimer;
private slots:
bgstack15