diff options
author | Ken Moore <ken@pcbsd.org> | 2016-09-21 17:08:34 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2016-09-21 17:08:34 -0400 |
commit | e24b7b3f822a55aa8210ed21d50349147426f7a3 (patch) | |
tree | 329737f6f06f89d2337f2f15f089985dc11303e0 /src-qt5/core/libLumina/LuminaXDG.h | |
parent | Add an "==" operator to the XDGDesktop class. Found a note in the QHash docs ... (diff) | |
download | lumina-e24b7b3f822a55aa8210ed21d50349147426f7a3.tar.gz lumina-e24b7b3f822a55aa8210ed21d50349147426f7a3.tar.bz2 lumina-e24b7b3f822a55aa8210ed21d50349147426f7a3.zip |
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.
Diffstat (limited to 'src-qt5/core/libLumina/LuminaXDG.h')
-rw-r--r-- | src-qt5/core/libLumina/LuminaXDG.h | 22 |
1 files changed, 12 insertions, 10 deletions
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<XDGDesktopAction> 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(); + } }; // ======================== |