From: Tom Albers Date: Tue, 22 Sep 2009 19:18:04 +0000 (+0000) Subject: Cross port from local Mailody copy: X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/48825e6b5b109bd86e26f3fcf51418ed461e0e77 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:vkrausse@kde.org svn path=/trunk/KDE/kdebase/apps/; revision=1026888 --- 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