diff options
author | Weblate <noreply@weblate.org> | 2016-12-14 21:52:08 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2016-12-14 21:52:08 +0000 |
commit | f274dd0526568b50e113baa85fcb26a87575eed9 (patch) | |
tree | cabcdb147e5dbf2cbe4c321c5ad59963c40c3e89 /src-qt5/core-utils/lumina-search/Worker.cpp | |
parent | Translated using Weblate (lumina_CONFIG@sl (generated)) (diff) | |
parent | Merge branch 'master' of github.com:trueos/lumina (diff) | |
download | lumina-f274dd0526568b50e113baa85fcb26a87575eed9.tar.gz lumina-f274dd0526568b50e113baa85fcb26a87575eed9.tar.bz2 lumina-f274dd0526568b50e113baa85fcb26a87575eed9.zip |
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/core-utils/lumina-search/Worker.cpp')
-rw-r--r-- | src-qt5/core-utils/lumina-search/Worker.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src-qt5/core-utils/lumina-search/Worker.cpp b/src-qt5/core-utils/lumina-search/Worker.cpp index b414a72f..df1a0c3c 100644 --- a/src-qt5/core-utils/lumina-search/Worker.cpp +++ b/src-qt5/core-utils/lumina-search/Worker.cpp @@ -2,13 +2,15 @@ #include <QTimer> #include <LuminaXDG.h> -#include <LuminaUtils.h> +#include <LUtils.h> Worker::Worker(QObject *parent) : QObject(parent){ //Get the list of all applications and save them in an easily-searchable form - QList<XDGDesktop> apps = LXDG::systemDesktopFiles(); + XDGDesktopList APPS; + APPS.updateList(); + QList<XDGDesktop*> apps = APPS.apps(false,false); for(int i=0; i<apps.length(); i++){ - applist << ":::1:::"+apps[i].name+":::2:::"+apps[i].genericName+":::3:::"+apps[i].comment+":::4:::"+apps[i].filePath; + applist << ":::1:::"+apps[i]->name+":::2:::"+apps[i]->genericName+":::3:::"+apps[i]->comment+":::4:::"+apps[i]->filePath; } stopsearch = false; } @@ -50,7 +52,8 @@ bool Worker::searchDir(QString dirpath){ tmp = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot , QDir::Name); for(int i=0; i<tmp.length(); i++){ if(stopsearch){ return true; } - if( skipDirs.contains(dir.absoluteFilePath(tmp[i])) ){ continue; } //this dir is skipped + if( skipDirs.contains(dir.absoluteFilePath(tmp[i])) || tmp[i]=="proc" ){ continue; } //this dir is skipped + //Special case - skip the "proc" directory heirarchy (highly-recursive layout for *every* process which is running) if( searchDir(dir.absoluteFilePath(tmp[i])) ){ return true; } } return false; @@ -108,4 +111,4 @@ void Worker::beginsearch(){ } emit SearchUpdate( tr("Search Finished") ); emit SearchDone(); -}
\ No newline at end of file +} |