diff options
Diffstat (limited to 'src/panels/information/kloadmetadatathread.cpp')
| -rw-r--r-- | src/panels/information/kloadmetadatathread.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/panels/information/kloadmetadatathread.cpp b/src/panels/information/kloadmetadatathread.cpp index e95aca404..fc353c493 100644 --- a/src/panels/information/kloadmetadatathread.cpp +++ b/src/panels/information/kloadmetadatathread.cpp @@ -53,6 +53,13 @@ void KLoadMetaDataThread::load(const KUrl::List& urls) start(); } +void KLoadMetaDataThread::cancel() +{ + // Setting m_canceled to true will cancel KLoadMetaDataThread::run() + // as soon as run() gets the chance to check m_cancel. + m_canceled = true; +} + void KLoadMetaDataThread::cancelAndDelete() { if (isFinished()) { @@ -60,9 +67,10 @@ void KLoadMetaDataThread::cancelAndDelete() deleteLater(); } else { connect(this, SIGNAL(finished()), this, SLOT(slotFinished())); - m_canceled = true; // Setting m_canceled to true will cancel KLoadMetaDataThread::run() - // as soon as possible. Afterwards the thread will delete itself + // as soon as run() gets the chance to check m_cancel. + m_canceled = true; + // Afterwards the thread will delete itself // asynchronously inside slotFinished(). } } |
