┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Albers <[email protected]>2009-09-22 19:18:04 +0000
committerTom Albers <[email protected]>2009-09-22 19:18:04 +0000
commit48825e6b5b109bd86e26f3fcf51418ed461e0e77 (patch)
treed71d6e8f91fcd6cecba4ce6bab35e14086057c67
parent4d13af697e72cacd5d98e2b638c27be79c08d521 (diff)
Cross port from local Mailody copy:
SVN commit 1026747 by vkrause: Fix deadlock when changing the rating and the comment of the same object, in that order. The harmless looking setEnabled() call two lines down from here triggers a convoluted chain of (q)events that eventually ends up calling a method that tries to lock the mutex itself. Thanks Volker! CCMAIL:[email protected] svn path=/trunk/KDE/kdebase/apps/; revision=1026888
-rw-r--r--src/panels/information/metadatawidget.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/panels/information/metadatawidget.cpp b/src/panels/information/metadatawidget.cpp
index 6a2f6073a..ea550ed52 100644
--- a/src/panels/information/metadatawidget.cpp
+++ b/src/panels/information/metadatawidget.cpp
@@ -297,6 +297,7 @@ void MetaDataWidget::slotCommentChanged( const QString& s )
QMutexLocker locker( &d->mutex );
Nepomuk::MassUpdateJob* job = Nepomuk::MassUpdateJob::commentResources( d->sharedData.files.values(), s );
+ locker.unlock();
connect( job, SIGNAL( result( KJob* ) ),
this, SLOT( metadataUpdateDone() ) );
setEnabled( false ); // no updates during execution
@@ -314,6 +315,7 @@ void MetaDataWidget::slotRatingChanged(unsigned int rating)
#ifdef HAVE_NEPOMUK
QMutexLocker locker( &d->mutex );
Nepomuk::MassUpdateJob* job = Nepomuk::MassUpdateJob::rateResources( d->sharedData.files.values(), rating );
+ locker.unlock();
connect( job, SIGNAL( result( KJob* ) ),
this, SLOT( metadataUpdateDone() ) );
setEnabled( false ); // no updates during execution