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

List:       kde-commits
Subject:    KDE/kdebase/runtime/nepomuk/services/queryservice
From:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2010-10-07 18:09:00
Message-ID: 20101007180900.0FA1EAC892 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1183539 by trueg:

Use a queued method call to start the timer which cannot be started in another thread \
than the one it was created in.

 M  +6 -1      folder.cpp  


--- trunk/KDE/kdebase/runtime/nepomuk/services/queryservice/folder.cpp \
#1183538:1183539 @@ -127,6 +127,7 @@
 }
 
 
+// called from SearchRunnable in the search thread
 void Nepomuk::Query::Folder::addResult( const Nepomuk::Query::Result& result )
 {
     if ( m_initialListingDone ) {
@@ -142,6 +143,7 @@
 }
 
 
+// called from SearchRunnable in the search thread
 void Nepomuk::Query::Folder::listingFinished()
 {
     m_currentSearchRunnable = 0;
@@ -165,7 +167,9 @@
     }
 
     // make sure we do not update again right away
-    m_updateTimer.start();
+    // but we need to do it from the main thread but this
+    // method is called sync from the SearchRunnable
+    QMetaObject::invokeMethod( &m_updateTimer, "start", Qt::QueuedConnection );
 }
 
 
@@ -190,6 +194,7 @@
 }
 
 
+// called from CountQueryRunnable in the search thread
 void Nepomuk::Query::Folder::countQueryFinished( int count )
 {
     m_totalCount = count;


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

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