diff options
author | Ken Moore <ken@pcbsd.org> | 2015-02-18 15:24:31 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-02-18 15:24:31 -0500 |
commit | 0ab15db734b5c45bdefa960c54209d0d7472ec50 (patch) | |
tree | a95a0035307359a883d9979203f34dcbe9df5e90 /lumina-search/Worker.cpp | |
parent | Update the Lumina-default theme file a bit more. (diff) | |
download | lumina-0ab15db734b5c45bdefa960c54209d0d7472ec50.tar.gz lumina-0ab15db734b5c45bdefa960c54209d0d7472ec50.tar.bz2 lumina-0ab15db734b5c45bdefa960c54209d0d7472ec50.zip |
Add a new configuration dialog to lumina-search so that users can specify/save the starting point for file searches, as well as setup any directories to exclude from the search routine.
Diffstat (limited to 'lumina-search/Worker.cpp')
-rw-r--r-- | lumina-search/Worker.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lumina-search/Worker.cpp b/lumina-search/Worker.cpp index 6dc750cb..5d874202 100644 --- a/lumina-search/Worker.cpp +++ b/lumina-search/Worker.cpp @@ -49,6 +49,7 @@ 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( searchDir(dir.absoluteFilePath(tmp[i])) ){ return true; } } return false; @@ -89,12 +90,12 @@ void Worker::beginsearch(){ } } }else{ - emit SearchUpdate( "File Search not implemented yet" ); //Search through the user's home directory and look for a file/dir starting with that term if(!sterm.contains("*")){ sterm.prepend("*"); sterm.append("*"); //make sure it is a search glob pattern } - searchDir(QDir::homePath()); + if(startDir.isEmpty()){ startDir = QDir::homePath(); } + searchDir(startDir); } emit SearchUpdate( tr("Search Finished") ); |