From d4e90780226e6e910561654cc3a574623ddfa5cc Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 21 Sep 2016 12:07:45 -0400 Subject: Commit a small cleanup for the auto-loading of the apps list on the system. Going to check if this fixes the memory leak issue on some systems (have one I can test on now). --- src-qt5/core/libLumina/LuminaXDG.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src-qt5/core/libLumina/LuminaXDG.h') diff --git a/src-qt5/core/libLumina/LuminaXDG.h b/src-qt5/core/libLumina/LuminaXDG.h index 996e5a20..0397ce71 100644 --- a/src-qt5/core/libLumina/LuminaXDG.h +++ b/src-qt5/core/libLumina/LuminaXDG.h @@ -93,6 +93,7 @@ public slots: private: QFileSystemWatcher *watcher; QTimer *synctimer; + bool keepsynced; private slots: void watcherChanged(); -- cgit From de4b5c26801cc19956d0eb1e1d109b7024c8e368 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 21 Sep 2016 14:20:15 -0400 Subject: Add an "==" operator to the XDGDesktop class. Found a note in the QHash docs that any class type need this defined. --- src-qt5/core/libLumina/LuminaXDG.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src-qt5/core/libLumina/LuminaXDG.h') diff --git a/src-qt5/core/libLumina/LuminaXDG.h b/src-qt5/core/libLumina/LuminaXDG.h index 0397ce71..1720ebc5 100644 --- a/src-qt5/core/libLumina/LuminaXDG.h +++ b/src-qt5/core/libLumina/LuminaXDG.h @@ -68,6 +68,10 @@ public: //Constructor/destructor XDGDesktop(){} ~XDGDesktop(){} + + friend bool operator==(const XDGDesktop lhs, const XDGDesktop rhs){ + return lhs.filePath == rhs.filePath && lhs.lastRead == rhs.lastRead; + } }; // ======================== -- cgit From e24b7b3f822a55aa8210ed21d50349147426f7a3 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 21 Sep 2016 17:08:34 -0400 Subject: Fix the memory usage issue with Lumina and the application list on the system. It no longer grows with time that I can tell, but I am sure there is some additional cleanup and optimizations which can still be done later. --- src-qt5/core/libLumina/LuminaXDG.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src-qt5/core/libLumina/LuminaXDG.h') diff --git a/src-qt5/core/libLumina/LuminaXDG.h b/src-qt5/core/libLumina/LuminaXDG.h index 1720ebc5..5c012b9a 100644 --- a/src-qt5/core/libLumina/LuminaXDG.h +++ b/src-qt5/core/libLumina/LuminaXDG.h @@ -35,8 +35,8 @@ // ====================== // FreeDesktop Desktop Actions Framework (data structure) // ====================== -class XDGDesktopAction{ -public: +struct XDGDesktopAction{ +//public: //Admin variables QString ID; //The ID name for this action (should correspond to an entry in the "actionList" for the XDGDesktop below) //General Variables @@ -46,9 +46,10 @@ public: // ====================== // FreeDesktop Desktop Entry Framework (data structure) // ====================== -class XDGDesktop{ -public: +struct XDGDesktop{ +//public: enum XDGDesktopType { BAD, APP, LINK, DIR }; + //Admin variables QString filePath; //which file this structure contains the information for (absolute path) QDateTime lastRead; //when this structure was created from the file @@ -64,14 +65,15 @@ public: QList actions; //Type 2 (LINK) variables QString url; - + //Constructor/destructor XDGDesktop(){} - ~XDGDesktop(){} - - friend bool operator==(const XDGDesktop lhs, const XDGDesktop rhs){ - return lhs.filePath == rhs.filePath && lhs.lastRead == rhs.lastRead; - } + ~XDGDesktop(){ + actions.clear(); + showInList.clear(); notShowInList.clear(); actionList.clear(); mimeList.clear(); catList.clear(); keyList.clear(); + name.clear(); genericName.clear(); comment.clear(); icon.clear(); + exec.clear(); tryexec.clear(); path.clear(); startupWM.clear(); url.clear(); + } }; // ======================== -- cgit