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

List:       kde-commits
Subject:    KDE/kdebase/runtime/nepomuk/services/strigi
From:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2008-10-13 9:47:25
Message-ID: 1223891245.041824.22676.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 870779 by trueg:

Added DBus method to update all folders.

 M  +5 -7      indexscheduler.cpp  
 M  +6 -0      strigiserviceadaptor.cpp  
 M  +2 -0      strigiserviceadaptor.h  


--- trunk/KDE/kdebase/runtime/nepomuk/services/strigi/indexscheduler.cpp \
#870778:870779 @@ -363,14 +363,12 @@
     }
     m_analyzerConfig->setFilters(filters);
 
-    // if the recursion setting changed, update everything again
+    // update everything again in case the folders changed
     // FIXME: this does not really help if the new value is false!
-    if ( m_startedRecursive != Config::self()->recursive() ) {
-        QMutexLocker lock( &m_dirsToUpdateMutex );
-        foreach( const QString& f, Config::self()->folders() )
-            m_dirsToUpdate << qMakePair( f, Config::self()->recursive() );
-        m_dirsToUpdateWc.wakeAll();
-    }
+    QMutexLocker lock( &m_dirsToUpdateMutex );
+    foreach( const QString& f, Config::self()->folders() )
+        m_dirsToUpdate << qMakePair( f, Config::self()->recursive() );
+    m_dirsToUpdateWc.wakeAll();
 }
 
 
--- trunk/KDE/kdebase/runtime/nepomuk/services/strigi/strigiserviceadaptor.cpp \
#870778:870779 @@ -89,6 +89,12 @@
 }
 
 
+void Nepomuk::StrigiServiceAdaptor::updateAllFolders()
+{
+    m_indexScheduler->updateAll();
+}
+
+
 void Nepomuk::StrigiServiceAdaptor::analyzeResource( const QString& uri, uint mTime, \
const QByteArray& data )  {
     QDataStream stream( data );
--- trunk/KDE/kdebase/runtime/nepomuk/services/strigi/strigiserviceadaptor.h \
#870778:870779 @@ -49,6 +49,7 @@
                     "    <method name=\"updateFolder\" >\n"
                     "      <arg name=\"path\" direction=\"in\" type=\"s\" />\n"
                     "    </method>\n"
+                    "    <method name=\"updateAllFolders\" />\n"
                     "    <method name=\"analyzeResource\" >\n"
                     "      <arg name=\"uri\" direction=\"in\" type=\"s\" />\n"
                     "      <arg name=\"lastModificationDate\" direction=\"in\" \
type=\"u\" />\n" @@ -78,6 +79,7 @@
         void resume();
         void suspend();
         void updateFolder( const QString& path );
+        void updateAllFolders();
         void analyzeResource( const QString& uri, uint mTime, const QByteArray& data \
                );
         void analyzeResourceFromTempFileAndDeleteTempFile( const QString& uri, uint \
mTime, const QString& tmpFile );  


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

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