kdecore: use public KDirWatch slot to emit signal

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-03-19 10:28:57 +02:00
parent a172e03199
commit 8a3b902686
2 changed files with 4 additions and 12 deletions

View file

@ -48,14 +48,14 @@ KDirWatch* KDirWatch::self()
KDirWatch::KDirWatch (QObject* parent)
: QObject(parent), d(new KDirWatchPrivate())
{
connect(d->watcher, SIGNAL(directoryChanged(QString)), this, SLOT(emitChanged(QString)));
connect(d->watcher, SIGNAL(fileChanged(QString)), this, SLOT(emitChanged(QString)));
connect(d->watcher, SIGNAL(directoryChanged(QString)), this, SLOT(setDirty(QString)));
connect(d->watcher, SIGNAL(fileChanged(QString)), this, SLOT(setDirty(QString)));
}
KDirWatch::~KDirWatch()
{
disconnect(d->watcher, SIGNAL(directoryChanged(QString)), this, SLOT(emitChanged(QString)));
disconnect(d->watcher, SIGNAL(fileChanged(QString)), this, SLOT(emitChanged(QString)));
disconnect(d->watcher, SIGNAL(directoryChanged(QString)), this, SLOT(setDirty(QString)));
disconnect(d->watcher, SIGNAL(fileChanged(QString)), this, SLOT(setDirty(QString)));
delete d;
}
@ -144,11 +144,6 @@ void KDirWatch::setDeleted(const QString &file)
emit deleted(file);
}
void KDirWatch::emitChanged(const QString &path)
{
setDirty(path);
}
#include "moc_kdirwatch.cpp"
//sven

View file

@ -205,9 +205,6 @@ public Q_SLOTS:
*/
void deleted(const QString &path);
private Q_SLOTS:
void emitChanged(const QString &path);
private:
KDirWatchPrivate* d;