CollectionSetup: modified pruneSelectedDirs() to accept an argument

instead of reading the widget by itself.

It is now possible to call CollectionSetup::pruneSelectedDirs(dirs)
independently from a CollectionSetup object.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/24/head
Mavridis Philippe 4 years ago
parent c9462edae6
commit 9bbac10f3c
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -476,13 +476,12 @@ DeviceItem::mountDevice( const TQString & device)
}
}
TQStringList CollectionSetup::pruneSelectedDirs(){
TQStringList CollectionSetup::pruneSelectedDirs( TQStringList listOfUrls ){
// This gets rid of redundant sub-directories
// from the list of dirs to be scanned.
TQStringList filepattern;
TQStringList listOfUrls = dirs();
listOfUrls.sort();
TQString prev;

@ -48,7 +48,7 @@ public:
TQStringList m_dirs;
TQMap<TQString,int> m_refcount;
TQStringList pruneSelectedDirs();
static TQStringList pruneSelectedDirs( TQStringList listOfUrls = 0 );
void writeConfig( const char* optGroup, const char* optName );
signals:

@ -253,7 +253,7 @@ void Klamscan::slotScan()
prevdir = listOfUrlsToScan.first();
}else{
filepattern = setup->pruneSelectedDirs();
filepattern = setup->pruneSelectedDirs(setup->dirs());
}
scan( filepattern );
@ -302,7 +302,7 @@ void Klamscan::slotAdvOptions(){
void Klamscan::slotSchedule(){
TQStringList filepattern = setup->pruneSelectedDirs();
TQStringList filepattern = setup->pruneSelectedDirs(setup->dirs());
if (filepattern.isEmpty()){

Loading…
Cancel
Save