[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/multimedia/amarok/src/dynamic
From:       Seb Ruiz <ruiz () kde ! org>
Date:       2008-11-09 2:44:40
Message-ID: 1226198680.505325.9369.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 881834 by seb:

Use a QMutexLocker to handle mutex lock/unlocks instead of doing so manually, which is error prone


 M  +1 -4      BiasSolver.cpp  


--- trunk/extragear/multimedia/amarok/src/dynamic/BiasSolver.cpp #881833:881834
@@ -117,7 +117,7 @@
 
     // update biases
 
-    m_biasMutex.lock();
+    QMutexLocker locker( m_biasMutex );
 
     CollectionDependantBias* cb;
     foreach( Bias* b, m_biases )
@@ -137,7 +137,6 @@
     // nothing to update
     if( !m_pendingBiasUpdates && !s_universeOutdated )
     {
-        m_biasMutex.unlock();
         emit readyToRun();
         return;
     }
@@ -147,8 +146,6 @@
 
     if( s_universeOutdated )
         updateUniverse();
-
-    m_biasMutex.unlock();
 }
 
 void Dynamic::BiasSolver::run()
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic