From d6d9273029436cbbdc72e36f51d64e86e9a64840 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Mon, 30 May 2022 14:02:29 +0300 Subject: [PATCH] kded: replace Kded::readDirectory() with its body Signed-off-by: Ivailo Monev --- kded/kded.cpp | 29 +++++++++-------------------- kded/kded.h | 5 ----- 2 files changed, 9 insertions(+), 25 deletions(-) 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.