mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kded: replace Kded::readDirectory() with its body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4213d1a06e
commit
d6d9273029
2 changed files with 9 additions and 25 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue