summaryrefslogtreecommitdiffstats
path: root/src/directorylist.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-03-16 10:20:22 +0200
committerMavridis Philippe <mavridisf@gmail.com>2021-03-18 12:39:47 +0200
commit69817f0eae3ed0e420a7d0e58c29953dd65dda97 (patch)
tree259197fc7776e217f655aaacf62e25ea0dbcd7fe /src/directorylist.cpp
parent78b3377194e64aa3ac311358123b3b5c84c9db23 (diff)
downloadklamav-69817f0eae3ed0e420a7d0e58c29953dd65dda97.tar.gz
klamav-69817f0eae3ed0e420a7d0e58c29953dd65dda97.zip
Klamscan, Scheduler: Reset DirectoryList after use
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'src/directorylist.cpp')
-rw-r--r--src/directorylist.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/directorylist.cpp b/src/directorylist.cpp
index aae909d..c401644 100644
--- a/src/directorylist.cpp
+++ b/src/directorylist.cpp
@@ -98,6 +98,7 @@ Item::Item( TQListView *parent, CollectionSetup *collection, const TQString &nam
else
setPixmap( 0, SmallIcon( "folder" ) );
setVisible( true );
+ connect( collectionSetup, SIGNAL(resetDirs()), this, SLOT(reset()) );
}
@@ -115,6 +116,7 @@ Item::Item( TQListViewItem *parent, CollectionSetup *collection, const KURL &url
connect( &m_lister, SIGNAL(newItems( const KFileItemList& )), SLOT(newItems( const KFileItemList& )) );
connect( &m_lister, SIGNAL(completed()), SLOT(completed()) );
connect( &m_lister, SIGNAL(canceled()), SLOT(completed()) );
+ connect( collectionSetup, SIGNAL(resetDirs()), this, SLOT(reset()) );
}
@@ -225,6 +227,8 @@ Item::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width,
setOn(false);
}
+void Item::reset() { this->setOn(false); }
+
//////////////////////////////////////////////////////////////////////////////////////////
// CLASS DeviceItem
//////////////////////////////////////////////////////////////////////////////////////////
@@ -237,6 +241,7 @@ DeviceItem::DeviceItem( TQListView *parent, CollectionSetup *collection )
collectionSetup = collection;
m_lister.setDirOnlyMode( true );
connect( &m_lister, SIGNAL(newItems( const KFileItemList& )), SLOT(newItems( const KFileItemList& )) );
+ connect( collectionSetup, SIGNAL(resetDirs()), this, SLOT(reset()) );
if ( KDE::versionMajor() == 3 && KDE::versionMinor() < 4 )
{
@@ -299,6 +304,7 @@ DeviceItem::DeviceItem( TQListViewItem *parent, CollectionSetup *collection, con
connect( &m_lister, SIGNAL(newItems( const KFileItemList& )), SLOT(newItems( const KFileItemList& )) );
connect( &m_lister, SIGNAL(completed()), SLOT(completed()) );
connect( &m_lister, SIGNAL(canceled()), SLOT(completed()) );
+ connect( collectionSetup, SIGNAL(resetDirs()), this, SLOT(reset()) );
}
@@ -475,6 +481,8 @@ DeviceItem::mountDevice( const TQString & device)
}
}
+void DeviceItem::reset() { this->setOn(false); }
+
TQStringList CollectionSetup::pruneSelectedDirs( TQStringList listOfUrls ){
// This gets rid of redundant sub-directories
// from the list of dirs to be scanned.
@@ -538,4 +546,9 @@ void CollectionSetup::writeConfig( const char* optGroup, const char* optName )
config->sync();
}
+void CollectionSetup::reset()
+{
+ emit resetDirs();
+}
+
#include "directorylist.moc"