Revert "kio: use own directory watcher for directory lister cache"

This reverts commit dabd0b9067.
This commit is contained in:
Ivailo Monev 2021-02-05 10:17:18 +02:00
parent 3bd1f98e75
commit 8be347e351
2 changed files with 3 additions and 5 deletions

View file

@ -49,15 +49,14 @@
K_GLOBAL_STATIC(KDirListerCache, kDirListerCache) K_GLOBAL_STATIC(KDirListerCache, kDirListerCache)
KDirListerCache::KDirListerCache() KDirListerCache::KDirListerCache()
: itemsCached( 10 ), // keep the last 10 directories around : itemsCached( 10 ) // keep the last 10 directories around
dirwatch(new KDirWatch(this))
{ {
//kDebug(7004); //kDebug(7004);
connect( &pendingUpdateTimer, SIGNAL(timeout()), this, SLOT(processPendingUpdates()) ); connect( &pendingUpdateTimer, SIGNAL(timeout()), this, SLOT(processPendingUpdates()) );
pendingUpdateTimer.setSingleShot( true ); pendingUpdateTimer.setSingleShot( true );
connect( dirwatch, SIGNAL(dirty(QString)), connect( KDirWatch::self(), SIGNAL(dirty(QString)),
this, SLOT(slotFileDirty(QString)) ); this, SLOT(slotFileDirty(QString)) );
kdirnotify = new org::kde::KDirNotify(QString(), QString(), QDBusConnection::sessionBus(), this); kdirnotify = new org::kde::KDirNotify(QString(), QString(), QDBusConnection::sessionBus(), this);
@ -81,7 +80,7 @@ KDirListerCache::~KDirListerCache()
itemsCached.clear(); itemsCached.clear();
directoryData.clear(); directoryData.clear();
delete dirwatch; KDirWatch::self()->disconnect( this );
} }
// setting _reload to true will emit the old files and // setting _reload to true will emit the old files and

View file

@ -433,7 +433,6 @@ private:
// this is why we need to remember those files here. // this is why we need to remember those files here.
QSet<KFileItem*> pendingRemoteUpdates; QSet<KFileItem*> pendingRemoteUpdates;
KDirWatch *dirwatch;
// the KDirNotify signals // the KDirNotify signals
OrgKdeKDirNotifyInterface *kdirnotify; OrgKdeKDirNotifyInterface *kdirnotify;