aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/LuminaXDG.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2016-09-16 08:04:27 -0400
committerKen Moore <ken@pcbsd.org>2016-09-16 08:04:27 -0400
commit567e4846ca1c5bfafe7a188744bda11ce046d3a5 (patch)
tree67aec045f53dd41af8654a76eed4fe25dc4ab808 /src-qt5/core/libLumina/LuminaXDG.cpp
parentGet the progress reporting all setup for the git clone. Now it is all set and... (diff)
downloadlumina-567e4846ca1c5bfafe7a188744bda11ce046d3a5.tar.gz
lumina-567e4846ca1c5bfafe7a188744bda11ce046d3a5.tar.bz2
lumina-567e4846ca1c5bfafe7a188744bda11ce046d3a5.zip
Clean up how the system app finder/parser is saved in memory a bit. Trying to track down and fix a reported memory leak on some systems.
Diffstat (limited to 'src-qt5/core/libLumina/LuminaXDG.cpp')
-rw-r--r--src-qt5/core/libLumina/LuminaXDG.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp
index 8ec51530..48185a38 100644
--- a/src-qt5/core/libLumina/LuminaXDG.cpp
+++ b/src-qt5/core/libLumina/LuminaXDG.cpp
@@ -79,7 +79,7 @@ void XDGDesktopList::updateList(){
}
//If this class is automatically managing the lists, update the watched files/dirs and send out notifications
if(watcher!=0){
- qDebug() << "App List Updated:" << lastCheck << appschanged << newfiles << oldkeys;
+ //qDebug() << "App List Updated:" << lastCheck << appschanged << newfiles << oldkeys;
watcher->removePaths(QStringList() << watcher->files() << watcher->directories());
watcher->addPaths(appDirs);
if(appschanged){ emit appsUpdated(); }
@@ -511,14 +511,15 @@ QStringList LXDG::systemApplicationDirs(){
}
XDGDesktopList* LXDG::systemAppsList(){
- static XDGDesktopList sysapps(0,true); // = XDGDesktopList(0,true); //set this to automatically update as needed
- if(sysapps.lastCheck.isNull()){ sysapps.updateList(); } //catch the first time the class was used, and prompt for an update right now
- return &sysapps;
+ static XDGDesktopList *sysapps = new XDGDesktopList(0,true); //set this to automatically update as needed
+ if(sysapps->lastCheck.isNull()){ sysapps->updateList(); } //catch the first time the class was used, and prompt for an update right now
+ return sysapps;
}
QList<XDGDesktop> LXDG::systemDesktopFiles(bool showAll, bool showHidden){
//Quick overload for backwards compatibility which uses the static/global class for managing app entries
- return systemAppsList()->apps(showAll, showHidden);
+ XDGDesktopList list(0, false);
+ return list.apps(showAll, showHidden);
}
QHash<QString,QList<XDGDesktop> > LXDG::sortDesktopCats(QList<XDGDesktop> apps){
bgstack15