kded: replace Kded::readDirectory() with its body

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-05-30 14:02:29 +03:00
parent 4213d1a06e
commit d6d9273029
2 changed files with 9 additions and 25 deletions

View file

@ -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
{

View file

@ -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.