aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core-utils/lumina-search/Worker.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-11-28 08:07:29 -0500
committerKen Moore <ken@ixsystems.com>2016-11-28 08:07:29 -0500
commit102f7c729e55ae92b1bb4b0928dde030a2766b79 (patch)
treed56786fb79588dadeb3092431cd0ce297196172b /src-qt5/core-utils/lumina-search/Worker.cpp
parentFix up the scaling options in the UI for lumina-screenshot. (diff)
downloadlumina-102f7c729e55ae92b1bb4b0928dde030a2766b79.tar.gz
lumina-102f7c729e55ae92b1bb4b0928dde030a2766b79.tar.bz2
lumina-102f7c729e55ae92b1bb4b0928dde030a2766b79.zip
A few important fixes for lumina-search:
1) Ensure the background search process gets stopped when the app is closed. 2) Add a limit of 100 items to the search results (any more than that and the user should refine their search term) 3) Make sure that any "proc" directory on the system is always excluded from the search. This directory heirarchy is highly recursive in nature and should never really be used for searches anyway. 4) Increase the time delay before starting any live search to 1/2 second (used to be 1/3 second).
Diffstat (limited to 'src-qt5/core-utils/lumina-search/Worker.cpp')
-rw-r--r--src-qt5/core-utils/lumina-search/Worker.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src-qt5/core-utils/lumina-search/Worker.cpp b/src-qt5/core-utils/lumina-search/Worker.cpp
index 677d2b4b..df1a0c3c 100644
--- a/src-qt5/core-utils/lumina-search/Worker.cpp
+++ b/src-qt5/core-utils/lumina-search/Worker.cpp
@@ -52,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;
bgstack15