diff --git a/kded/kded.cpp b/kded/kded.cpp index 6a70b9cc..d2abd7cc 100644 --- a/kded/kded.cpp +++ b/kded/kded.cpp @@ -434,7 +434,15 @@ void Kded::updateDirWatch() connect(m_pDirWatch, SIGNAL(dirty(QString)), this, SLOT(update(QString))); foreach(const QString &it, m_allResourceDirs) { - readDirectory(it); + QString path(it); + if (!path.endsWith('/')) { + path += '/'; + } + // Already seen this one? + if (m_pDirWatch->contains(path)) { + continue; + } + m_pDirWatch->addDir(path, KDirWatch::WatchFiles|KDirWatch::WatchSubDirs); } } @@ -466,25 +474,6 @@ void Kded::update(const QString& path) } } -void Kded::readDirectory(const QString& _path) -{ - if (!bCheckSycoca) { - return; - } - - QString path(_path); - if (!path.endsWith('/')) { - path += '/'; - } - - // Already seen this one? - if (m_pDirWatch->contains(path)) { - return; - } - - m_pDirWatch->addDir(path, KDirWatch::WatchFiles|KDirWatch::WatchSubDirs); -} - #if 0 bool Kded::isWindowRegistered(long windowId) const { diff --git a/kded/kded.h b/kded/kded.h index c8242168..4f56aed8 100644 --- a/kded/kded.h +++ b/kded/kded.h @@ -159,11 +159,6 @@ protected Q_SLOTS: void update(const QString& dir); private: - /** - * Scans dir for new files and new subdirectories. - */ - void readDirectory(const QString& dir); - /** * Pointer to the dirwatch class which tells us, when some directories * changed.