Emit an itemCreated() signal, so that applications can react on the change (patch provided by David Faure after a discussion with Rahman Duran)

CCMAIL: faure@kde.org
CCMAIL: rahman.duran@gmail.com

svn path=/trunk/KDE/kdebase/apps/; revision=940623
This commit is contained in:
Peter Penz 2009-03-17 20:43:48 +00:00
parent 73c75a3c22
commit 2b79fade1d
2 changed files with 9 additions and 0 deletions

View file

@ -587,6 +587,9 @@ void KNewMenu::slotResult( KJob * job )
// Normal (local) file. Need to "touch" it, kio_file copied the mtime.
(void) ::utime(QFile::encodeName(localUrl.toLocalFile()), 0);
}
emit itemCreated(destUrl);
} else if (KIO::SimpleJob* mkdirJob = ::qobject_cast<KIO::SimpleJob*>(job)) {
emit itemCreated(mkdirJob->url());
}
}
if (!d->m_tempFileToDelete.isEmpty())

View file

@ -75,6 +75,12 @@ public Q_SLOTS:
*/
void slotCheckUpToDate();
Q_SIGNALS:
/**
* Emitted once @p url has been successfully created
*/
void itemCreated(const KUrl& url);
protected Q_SLOTS:
/**
* Called when the job that copied the template has finished.