mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kded: Kded::updateDirWatch() optimization
KDirWatch already checks if the path is added and appends trailing slash as neccessary Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
9916fcdce9
commit
3380664558
1 changed files with 1 additions and 9 deletions
|
@ -452,15 +452,7 @@ void Kded::updateDirWatch()
|
|||
connect(m_pDirWatch, SIGNAL(dirty(QString)), this, SLOT(update(QString)));
|
||||
|
||||
foreach(const QString &it, m_allResourceDirs) {
|
||||
QString path(it);
|
||||
if (!path.endsWith('/')) {
|
||||
path += '/';
|
||||
}
|
||||
// Already seen this one?
|
||||
if (m_pDirWatch->contains(path)) {
|
||||
continue;
|
||||
}
|
||||
m_pDirWatch->addDir(path, true);
|
||||
m_pDirWatch->addDir(it, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue