diff options
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/PanelObject.cpp | 10 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/PanelObject.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/PanelObject.cpp index 94079bf7..035dd29c 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/PanelObject.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/PanelObject.cpp @@ -10,6 +10,10 @@ #include <QQmlEngine> #include <QDebug> +#ifdef USE_WIDGETS +#include <Plugin.h> +#endif + PanelObject::PanelObject(QString id, QObject *parent) : QObject(parent){ panel_id = id; } @@ -56,8 +60,12 @@ void PanelObject::setGeometry( QRect newgeom ){ void PanelObject::setPlugins( QStringList plist){ //Iterate through the list and find the URL's for the files QStringList dirs; dirs << ":/qml/plugins/"; //add local directories here + static QStringList built_in; +#ifdef USE_WIDGETS + if(built_in.isEmpty()){ built_in = Plugin::built_in_plugins(); } +#endif for(int i=0; i<plist.length(); i++){ - bool found = false; + bool found = built_in.contains(plist[i].toLower()); for(int j=0; j<dirs.length() && !found; j++){ if(QFile::exists(dirs[j]+plist[i]+".qml")){ plist[i] = QUrl::fromLocalFile(dirs[j]+plist[i]+".qml").url(); diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp index 9d48c28d..8e559819 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp @@ -14,7 +14,7 @@ // === PUBLIC === RootDesktopObject::RootDesktopObject(QObject *parent) : QObject(parent){ last_window_up = 0; - updateScreens(); //make sure the internal list is updated right away + //updateScreens(); //make sure the internal list is updated right away connect(this, SIGNAL(changePanels(QStringList)), this, SLOT(setPanels(QStringList)) ); currentTimeTimer = new QTimer(this); connect(currentTimeTimer, SIGNAL(timeout()), this, SLOT(updateCurrentTime()) ); @@ -46,6 +46,7 @@ RootDesktopObject* RootDesktopObject::instance(){ //QML Read Functions QStringList RootDesktopObject::screens(){ + if(s_objects.length()<1){ updateScreens(); } //qDebug() << "Request Screens:" << s_objects.length(); QStringList names; for(int i=0; i<s_objects.length(); i++){ names << s_objects[i]->name(); } @@ -53,6 +54,7 @@ QStringList RootDesktopObject::screens(){ } ScreenObject* RootDesktopObject::screen(QString id){ + if(s_objects.length()<1){ updateScreens(); } //qDebug() << "Got Screen Request:" << id; for(int i=0; i<s_objects.length(); i++){ if(s_objects[i]->name()==id){ return s_objects[i]; } @@ -315,6 +317,7 @@ void RootDesktopObject::updateCurrentTime(){ currentDateTimeStruct = DT; currentTimeString = tmp; emit currentTimeChanged(); + //qDebug() << "Current Time Changed:" << currentTimeString; } } |