[arch-commits] Commit in nepomuk-core/repos (10 files)

Andrea Scarpino andrea at nymeria.archlinux.org
Mon Feb 25 10:11:55 UTC 2013


    Date: Monday, February 25, 2013 @ 11:11:55
  Author: andrea
Revision: 178526

archrelease: copy trunk to extra-i686, extra-x86_64

Added:
  nepomuk-core/repos/extra-i686/PKGBUILD
    (from rev 178525, nepomuk-core/trunk/PKGBUILD)
  nepomuk-core/repos/extra-i686/fix-crash-on-new-install.patch
    (from rev 178525, nepomuk-core/trunk/fix-crash-on-new-install.patch)
  nepomuk-core/repos/extra-i686/fix-recursive-indexing.patch
    (from rev 178525, nepomuk-core/trunk/fix-recursive-indexing.patch)
  nepomuk-core/repos/extra-x86_64/PKGBUILD
    (from rev 178525, nepomuk-core/trunk/PKGBUILD)
  nepomuk-core/repos/extra-x86_64/fix-crash-on-new-install.patch
    (from rev 178525, nepomuk-core/trunk/fix-crash-on-new-install.patch)
  nepomuk-core/repos/extra-x86_64/fix-recursive-indexing.patch
    (from rev 178525, nepomuk-core/trunk/fix-recursive-indexing.patch)
Deleted:
  nepomuk-core/repos/extra-i686/PKGBUILD
  nepomuk-core/repos/extra-i686/fix-recursive-indexing.patch
  nepomuk-core/repos/extra-x86_64/PKGBUILD
  nepomuk-core/repos/extra-x86_64/fix-recursive-indexing.patch

---------------------------------------------+
 extra-i686/PKGBUILD                         |   81 +++++-----
 extra-i686/fix-crash-on-new-install.patch   |   37 ++++
 extra-i686/fix-recursive-indexing.patch     |  206 +++++++++++++-------------
 extra-x86_64/PKGBUILD                       |   81 +++++-----
 extra-x86_64/fix-crash-on-new-install.patch |   37 ++++
 extra-x86_64/fix-recursive-indexing.patch   |  206 +++++++++++++-------------
 6 files changed, 364 insertions(+), 284 deletions(-)

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2013-02-25 10:11:44 UTC (rev 178525)
+++ extra-i686/PKGBUILD	2013-02-25 10:11:55 UTC (rev 178526)
@@ -1,39 +0,0 @@
-# $Id$
-# Maintainer: Andrea Scarpino <andrea at archlinux.org>
-
-pkgname=nepomuk-core
-pkgver=4.10.0
-pkgrel=3
-pkgdesc="Contains the central Nepomuk services like file indexing, file system monitoring, query, storage, client libraries"
-url="https://projects.kde.org/projects/kde/kdelibs/nepomuk-core"
-arch=('i686' 'x86_64')
-license=('GPL' 'LGPL' 'FDL')
-depends=('kdelibs' 'poppler-qt' 'taglib' 'ffmpeg')
-makedepends=('cmake' 'automoc4' 'doxygen')
-source=("http://download.kde.org/stable/${pkgver}/src/${pkgname}-${pkgver}.tar.xz"
-        'fix-recursive-indexing.patch')
-sha1sums=('affc4d3063db773e5b05ff746a4c64adbec29264'
-          'faa0f661fe642af01ac72eda7347dfc659e091e1')
-
-build() {
-  cd ${pkgname}-${pkgver}
-  patch -p1 -i "${srcdir}"/fix-recursive-indexing.patch
-  cd ../
-
-  mkdir build
-  cd build
-  cmake ../${pkgname}-${pkgver} \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DKDE4_BUILD_TESTS=OFF \
-    -DCMAKE_INSTALL_PREFIX=/usr
-  make
-}
-
-package() {
-  cd build
-  make DESTDIR="${pkgdir}" install
-
-  # Fix the python shebang
-  sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \
-    "${pkgdir}"/usr/bin/nepomuk-simpleresource-rcgen
-}

Copied: nepomuk-core/repos/extra-i686/PKGBUILD (from rev 178525, nepomuk-core/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD	                        (rev 0)
+++ extra-i686/PKGBUILD	2013-02-25 10:11:55 UTC (rev 178526)
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Andrea Scarpino <andrea at archlinux.org>
+
+pkgname=nepomuk-core
+pkgver=4.10.0
+pkgrel=4
+pkgdesc="Contains the central Nepomuk services like file indexing, file system monitoring, query, storage, client libraries"
+url="https://projects.kde.org/projects/kde/kdelibs/nepomuk-core"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('kdelibs' 'poppler-qt' 'taglib' 'ffmpeg')
+makedepends=('cmake' 'automoc4' 'doxygen')
+source=("http://download.kde.org/stable/${pkgver}/src/${pkgname}-${pkgver}.tar.xz"
+        'fix-recursive-indexing.patch'
+        'fix-crash-on-new-install.patch')
+sha1sums=('affc4d3063db773e5b05ff746a4c64adbec29264'
+          'faa0f661fe642af01ac72eda7347dfc659e091e1'
+          '5e3b84f0d0f8a868d4aafedf0f3c7ab631ee4263')
+
+build() {
+  cd ${pkgname}-${pkgver}
+  patch -p1 -i "${srcdir}"/fix-recursive-indexing.patch
+  patch -p1 -i "${srcdir}"/fix-crash-on-new-install.patch
+  cd ../
+
+  mkdir build
+  cd build
+  cmake ../${pkgname}-${pkgver} \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DKDE4_BUILD_TESTS=OFF \
+    -DCMAKE_INSTALL_PREFIX=/usr
+  make
+}
+
+package() {
+  cd build
+  make DESTDIR="${pkgdir}" install
+
+  # Fix the python shebang
+  sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \
+    "${pkgdir}"/usr/bin/nepomuk-simpleresource-rcgen
+}

Copied: nepomuk-core/repos/extra-i686/fix-crash-on-new-install.patch (from rev 178525, nepomuk-core/trunk/fix-crash-on-new-install.patch)
===================================================================
--- extra-i686/fix-crash-on-new-install.patch	                        (rev 0)
+++ extra-i686/fix-crash-on-new-install.patch	2013-02-25 10:11:55 UTC (rev 178526)
@@ -0,0 +1,37 @@
+commit b94e9f73bd86593928988e5626511acea805b7be
+Author: Edward Toroshchin <kde at hades.name>
+Date:   Sun Feb 3 17:57:23 2013 +0100
+
+    fileindexer: initialize objects in correct order
+    
+    The IndexCleaner job created in IndexScheduler could complete before
+    m_eventMonitor is initialized, which leads to crash in slotCleaningDone.
+    
+    REVIEW: 108754
+
+diff --git a/services/fileindexer/indexscheduler.cpp b/services/fileindexer/indexscheduler.cpp
+index a13de1b..3ad7819 100644
+--- a/services/fileindexer/indexscheduler.cpp
++++ b/services/fileindexer/indexscheduler.cpp
+@@ -51,10 +51,6 @@ Nepomuk2::IndexScheduler::IndexScheduler( QObject* parent )
+         QFile::remove(KStandardDirs::locateLocal("data", QLatin1String("nepomuk/file-indexer-error-log")));
+     }
+ 
+-    m_cleaner = new IndexCleaner(this);
+-    connect( m_cleaner, SIGNAL(finished(KJob*)), this, SLOT(slotCleaningDone()) );
+-    m_cleaner->start();
+-
+     FileIndexerConfig* indexConfig = FileIndexerConfig::self();
+     connect( indexConfig, SIGNAL(includeFolderListChanged(QStringList,QStringList)),
+              this, SLOT(slotIncludeFolderListChanged(QStringList,QStringList)) );
+@@ -106,6 +102,10 @@ Nepomuk2::IndexScheduler::IndexScheduler( QObject* parent )
+     connect( m_eventMonitor, SIGNAL(powerManagementStatusChanged(bool)),
+              this, SLOT(slotScheduleIndexing()) );
+ 
++    m_cleaner = new IndexCleaner(this);
++    connect( m_cleaner, SIGNAL(finished(KJob*)), this, SLOT(slotCleaningDone()) );
++    m_cleaner->start();
++
+     // Special settings for the queues
+     KConfig config( "nepomukstrigirc" );
+     KConfigGroup cfg = config.group( "Indexing" );

Deleted: extra-i686/fix-recursive-indexing.patch
===================================================================
--- extra-i686/fix-recursive-indexing.patch	2013-02-25 10:11:44 UTC (rev 178525)
+++ extra-i686/fix-recursive-indexing.patch	2013-02-25 10:11:55 UTC (rev 178526)
@@ -1,103 +0,0 @@
-From: Vishesh Handa <me at vhanda.in>
-Date: Fri, 08 Feb 2013 20:58:33 +0000
-Subject: Revert "BasicIndexingQueue: Use stacks instead of queues"
-X-Git-Url: http://quickgit.kde.org/?p=nepomuk-core.git&a=commitdiff&h=b651f9231ac30072418bb06d602951f0f05da22c
----
-Revert "BasicIndexingQueue: Use stacks instead of queues"
-
-This reverts commit 2f33141aa6716550e38b11ec9a0b000dd74eea79.
-
-The commit breaks recursive indexing. Doh!
-
-BUG: 314559
----
-
-
---- a/services/fileindexer/basicindexingqueue.cpp
-+++ b/services/fileindexer/basicindexingqueue.cpp
-@@ -54,14 +54,14 @@
- 
- void BasicIndexingQueue::clear(const QString& path)
- {
--    QMutableVectorIterator< QPair<QString, UpdateDirFlags> > it( m_paths );
-+    QMutableListIterator< QPair<QString, UpdateDirFlags> > it( m_paths );
-     while( it.hasNext() ) {
-         it.next();
-         if( it.value().first.startsWith( path ) )
-             it.remove();
-     }
- 
--    QMutableVectorIterator< QPair<QDirIterator*, UpdateDirFlags> > iter( m_iterators );
-+    QMutableListIterator< QPair<QDirIterator*, UpdateDirFlags> > iter( m_iterators );
-     while( iter.hasNext() ) {
-         QDirIterator* dirIter =  iter.next().first;
- 
-@@ -100,7 +100,7 @@
- {
-     kDebug() << path;
-     bool wasEmpty = m_paths.empty();
--    m_paths.push( qMakePair( path, flags ) );
-+    m_paths.enqueue( qMakePair( path, flags ) );
-     callForNextIteration();
- 
-     if( wasEmpty )
-@@ -120,12 +120,12 @@
-             processingFile = process( dirIt->next(), pair.second );
-         }
-         else {
--            delete m_iterators.pop().first;
-+            delete m_iterators.dequeue().first;
-         }
-     }
- 
-     else if( !m_paths.isEmpty() ) {
--        QPair< QString, UpdateDirFlags > pair = m_paths.pop();
-+        QPair< QString, UpdateDirFlags > pair = m_paths.dequeue();
-         processingFile = process( pair.first, pair.second );
-     }
- 
-@@ -161,7 +161,7 @@
-             QDir::Filters dirFilter = QDir::NoDotAndDotDot|QDir::Readable|QDir::Files|QDir::Dirs;
- 
-             QPair<QDirIterator*, UpdateDirFlags> pair = qMakePair( new QDirIterator( path, dirFilter ), flags );
--            m_iterators.push( pair );
-+            m_iterators.enqueue( pair );
-         }
-     }
-     else if( info.isFile() && (forced || indexingRequired) ) {
-@@ -259,12 +259,6 @@
- 
-     emit endIndexingFile( url );
- 
--    // Give back the memory
--    if( m_paths.isEmpty() )
--        m_paths.clear();
--    if( m_iterators.isEmpty() )
--        m_iterators.clear();
--
-     // Continue the queue
-     finishIteration();
- }
-
---- a/services/fileindexer/basicindexingqueue.h
-+++ b/services/fileindexer/basicindexingqueue.h
-@@ -23,7 +23,6 @@
- 
- #include "indexingqueue.h"
- #include <KJob>
--#include <QtCore/QStack>
- 
- namespace Nepomuk2 {
- 
-@@ -106,8 +105,8 @@
-          */
-         bool process(const QString& path, Nepomuk2::UpdateDirFlags flags);
- 
--        QStack< QPair<QString, UpdateDirFlags> > m_paths;
--        QStack< QPair<QDirIterator*, UpdateDirFlags> > m_iterators;
-+        QQueue< QPair<QString, UpdateDirFlags> > m_paths;
-+        QQueue< QPair<QDirIterator*, UpdateDirFlags> > m_iterators;
- 
-         QUrl m_currentUrl;
-         QString m_currentMimeType;
-

Copied: nepomuk-core/repos/extra-i686/fix-recursive-indexing.patch (from rev 178525, nepomuk-core/trunk/fix-recursive-indexing.patch)
===================================================================
--- extra-i686/fix-recursive-indexing.patch	                        (rev 0)
+++ extra-i686/fix-recursive-indexing.patch	2013-02-25 10:11:55 UTC (rev 178526)
@@ -0,0 +1,103 @@
+From: Vishesh Handa <me at vhanda.in>
+Date: Fri, 08 Feb 2013 20:58:33 +0000
+Subject: Revert "BasicIndexingQueue: Use stacks instead of queues"
+X-Git-Url: http://quickgit.kde.org/?p=nepomuk-core.git&a=commitdiff&h=b651f9231ac30072418bb06d602951f0f05da22c
+---
+Revert "BasicIndexingQueue: Use stacks instead of queues"
+
+This reverts commit 2f33141aa6716550e38b11ec9a0b000dd74eea79.
+
+The commit breaks recursive indexing. Doh!
+
+BUG: 314559
+---
+
+
+--- a/services/fileindexer/basicindexingqueue.cpp
++++ b/services/fileindexer/basicindexingqueue.cpp
+@@ -54,14 +54,14 @@
+ 
+ void BasicIndexingQueue::clear(const QString& path)
+ {
+-    QMutableVectorIterator< QPair<QString, UpdateDirFlags> > it( m_paths );
++    QMutableListIterator< QPair<QString, UpdateDirFlags> > it( m_paths );
+     while( it.hasNext() ) {
+         it.next();
+         if( it.value().first.startsWith( path ) )
+             it.remove();
+     }
+ 
+-    QMutableVectorIterator< QPair<QDirIterator*, UpdateDirFlags> > iter( m_iterators );
++    QMutableListIterator< QPair<QDirIterator*, UpdateDirFlags> > iter( m_iterators );
+     while( iter.hasNext() ) {
+         QDirIterator* dirIter =  iter.next().first;
+ 
+@@ -100,7 +100,7 @@
+ {
+     kDebug() << path;
+     bool wasEmpty = m_paths.empty();
+-    m_paths.push( qMakePair( path, flags ) );
++    m_paths.enqueue( qMakePair( path, flags ) );
+     callForNextIteration();
+ 
+     if( wasEmpty )
+@@ -120,12 +120,12 @@
+             processingFile = process( dirIt->next(), pair.second );
+         }
+         else {
+-            delete m_iterators.pop().first;
++            delete m_iterators.dequeue().first;
+         }
+     }
+ 
+     else if( !m_paths.isEmpty() ) {
+-        QPair< QString, UpdateDirFlags > pair = m_paths.pop();
++        QPair< QString, UpdateDirFlags > pair = m_paths.dequeue();
+         processingFile = process( pair.first, pair.second );
+     }
+ 
+@@ -161,7 +161,7 @@
+             QDir::Filters dirFilter = QDir::NoDotAndDotDot|QDir::Readable|QDir::Files|QDir::Dirs;
+ 
+             QPair<QDirIterator*, UpdateDirFlags> pair = qMakePair( new QDirIterator( path, dirFilter ), flags );
+-            m_iterators.push( pair );
++            m_iterators.enqueue( pair );
+         }
+     }
+     else if( info.isFile() && (forced || indexingRequired) ) {
+@@ -259,12 +259,6 @@
+ 
+     emit endIndexingFile( url );
+ 
+-    // Give back the memory
+-    if( m_paths.isEmpty() )
+-        m_paths.clear();
+-    if( m_iterators.isEmpty() )
+-        m_iterators.clear();
+-
+     // Continue the queue
+     finishIteration();
+ }
+
+--- a/services/fileindexer/basicindexingqueue.h
++++ b/services/fileindexer/basicindexingqueue.h
+@@ -23,7 +23,6 @@
+ 
+ #include "indexingqueue.h"
+ #include <KJob>
+-#include <QtCore/QStack>
+ 
+ namespace Nepomuk2 {
+ 
+@@ -106,8 +105,8 @@
+          */
+         bool process(const QString& path, Nepomuk2::UpdateDirFlags flags);
+ 
+-        QStack< QPair<QString, UpdateDirFlags> > m_paths;
+-        QStack< QPair<QDirIterator*, UpdateDirFlags> > m_iterators;
++        QQueue< QPair<QString, UpdateDirFlags> > m_paths;
++        QQueue< QPair<QDirIterator*, UpdateDirFlags> > m_iterators;
+ 
+         QUrl m_currentUrl;
+         QString m_currentMimeType;
+

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2013-02-25 10:11:44 UTC (rev 178525)
+++ extra-x86_64/PKGBUILD	2013-02-25 10:11:55 UTC (rev 178526)
@@ -1,39 +0,0 @@
-# $Id$
-# Maintainer: Andrea Scarpino <andrea at archlinux.org>
-
-pkgname=nepomuk-core
-pkgver=4.10.0
-pkgrel=3
-pkgdesc="Contains the central Nepomuk services like file indexing, file system monitoring, query, storage, client libraries"
-url="https://projects.kde.org/projects/kde/kdelibs/nepomuk-core"
-arch=('i686' 'x86_64')
-license=('GPL' 'LGPL' 'FDL')
-depends=('kdelibs' 'poppler-qt' 'taglib' 'ffmpeg')
-makedepends=('cmake' 'automoc4' 'doxygen')
-source=("http://download.kde.org/stable/${pkgver}/src/${pkgname}-${pkgver}.tar.xz"
-        'fix-recursive-indexing.patch')
-sha1sums=('affc4d3063db773e5b05ff746a4c64adbec29264'
-          'faa0f661fe642af01ac72eda7347dfc659e091e1')
-
-build() {
-  cd ${pkgname}-${pkgver}
-  patch -p1 -i "${srcdir}"/fix-recursive-indexing.patch
-  cd ../
-
-  mkdir build
-  cd build
-  cmake ../${pkgname}-${pkgver} \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DKDE4_BUILD_TESTS=OFF \
-    -DCMAKE_INSTALL_PREFIX=/usr
-  make
-}
-
-package() {
-  cd build
-  make DESTDIR="${pkgdir}" install
-
-  # Fix the python shebang
-  sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \
-    "${pkgdir}"/usr/bin/nepomuk-simpleresource-rcgen
-}

Copied: nepomuk-core/repos/extra-x86_64/PKGBUILD (from rev 178525, nepomuk-core/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD	                        (rev 0)
+++ extra-x86_64/PKGBUILD	2013-02-25 10:11:55 UTC (rev 178526)
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Andrea Scarpino <andrea at archlinux.org>
+
+pkgname=nepomuk-core
+pkgver=4.10.0
+pkgrel=4
+pkgdesc="Contains the central Nepomuk services like file indexing, file system monitoring, query, storage, client libraries"
+url="https://projects.kde.org/projects/kde/kdelibs/nepomuk-core"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('kdelibs' 'poppler-qt' 'taglib' 'ffmpeg')
+makedepends=('cmake' 'automoc4' 'doxygen')
+source=("http://download.kde.org/stable/${pkgver}/src/${pkgname}-${pkgver}.tar.xz"
+        'fix-recursive-indexing.patch'
+        'fix-crash-on-new-install.patch')
+sha1sums=('affc4d3063db773e5b05ff746a4c64adbec29264'
+          'faa0f661fe642af01ac72eda7347dfc659e091e1'
+          '5e3b84f0d0f8a868d4aafedf0f3c7ab631ee4263')
+
+build() {
+  cd ${pkgname}-${pkgver}
+  patch -p1 -i "${srcdir}"/fix-recursive-indexing.patch
+  patch -p1 -i "${srcdir}"/fix-crash-on-new-install.patch
+  cd ../
+
+  mkdir build
+  cd build
+  cmake ../${pkgname}-${pkgver} \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DKDE4_BUILD_TESTS=OFF \
+    -DCMAKE_INSTALL_PREFIX=/usr
+  make
+}
+
+package() {
+  cd build
+  make DESTDIR="${pkgdir}" install
+
+  # Fix the python shebang
+  sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \
+    "${pkgdir}"/usr/bin/nepomuk-simpleresource-rcgen
+}

Copied: nepomuk-core/repos/extra-x86_64/fix-crash-on-new-install.patch (from rev 178525, nepomuk-core/trunk/fix-crash-on-new-install.patch)
===================================================================
--- extra-x86_64/fix-crash-on-new-install.patch	                        (rev 0)
+++ extra-x86_64/fix-crash-on-new-install.patch	2013-02-25 10:11:55 UTC (rev 178526)
@@ -0,0 +1,37 @@
+commit b94e9f73bd86593928988e5626511acea805b7be
+Author: Edward Toroshchin <kde at hades.name>
+Date:   Sun Feb 3 17:57:23 2013 +0100
+
+    fileindexer: initialize objects in correct order
+    
+    The IndexCleaner job created in IndexScheduler could complete before
+    m_eventMonitor is initialized, which leads to crash in slotCleaningDone.
+    
+    REVIEW: 108754
+
+diff --git a/services/fileindexer/indexscheduler.cpp b/services/fileindexer/indexscheduler.cpp
+index a13de1b..3ad7819 100644
+--- a/services/fileindexer/indexscheduler.cpp
++++ b/services/fileindexer/indexscheduler.cpp
+@@ -51,10 +51,6 @@ Nepomuk2::IndexScheduler::IndexScheduler( QObject* parent )
+         QFile::remove(KStandardDirs::locateLocal("data", QLatin1String("nepomuk/file-indexer-error-log")));
+     }
+ 
+-    m_cleaner = new IndexCleaner(this);
+-    connect( m_cleaner, SIGNAL(finished(KJob*)), this, SLOT(slotCleaningDone()) );
+-    m_cleaner->start();
+-
+     FileIndexerConfig* indexConfig = FileIndexerConfig::self();
+     connect( indexConfig, SIGNAL(includeFolderListChanged(QStringList,QStringList)),
+              this, SLOT(slotIncludeFolderListChanged(QStringList,QStringList)) );
+@@ -106,6 +102,10 @@ Nepomuk2::IndexScheduler::IndexScheduler( QObject* parent )
+     connect( m_eventMonitor, SIGNAL(powerManagementStatusChanged(bool)),
+              this, SLOT(slotScheduleIndexing()) );
+ 
++    m_cleaner = new IndexCleaner(this);
++    connect( m_cleaner, SIGNAL(finished(KJob*)), this, SLOT(slotCleaningDone()) );
++    m_cleaner->start();
++
+     // Special settings for the queues
+     KConfig config( "nepomukstrigirc" );
+     KConfigGroup cfg = config.group( "Indexing" );

Deleted: extra-x86_64/fix-recursive-indexing.patch
===================================================================
--- extra-x86_64/fix-recursive-indexing.patch	2013-02-25 10:11:44 UTC (rev 178525)
+++ extra-x86_64/fix-recursive-indexing.patch	2013-02-25 10:11:55 UTC (rev 178526)
@@ -1,103 +0,0 @@
-From: Vishesh Handa <me at vhanda.in>
-Date: Fri, 08 Feb 2013 20:58:33 +0000
-Subject: Revert "BasicIndexingQueue: Use stacks instead of queues"
-X-Git-Url: http://quickgit.kde.org/?p=nepomuk-core.git&a=commitdiff&h=b651f9231ac30072418bb06d602951f0f05da22c
----
-Revert "BasicIndexingQueue: Use stacks instead of queues"
-
-This reverts commit 2f33141aa6716550e38b11ec9a0b000dd74eea79.
-
-The commit breaks recursive indexing. Doh!
-
-BUG: 314559
----
-
-
---- a/services/fileindexer/basicindexingqueue.cpp
-+++ b/services/fileindexer/basicindexingqueue.cpp
-@@ -54,14 +54,14 @@
- 
- void BasicIndexingQueue::clear(const QString& path)
- {
--    QMutableVectorIterator< QPair<QString, UpdateDirFlags> > it( m_paths );
-+    QMutableListIterator< QPair<QString, UpdateDirFlags> > it( m_paths );
-     while( it.hasNext() ) {
-         it.next();
-         if( it.value().first.startsWith( path ) )
-             it.remove();
-     }
- 
--    QMutableVectorIterator< QPair<QDirIterator*, UpdateDirFlags> > iter( m_iterators );
-+    QMutableListIterator< QPair<QDirIterator*, UpdateDirFlags> > iter( m_iterators );
-     while( iter.hasNext() ) {
-         QDirIterator* dirIter =  iter.next().first;
- 
-@@ -100,7 +100,7 @@
- {
-     kDebug() << path;
-     bool wasEmpty = m_paths.empty();
--    m_paths.push( qMakePair( path, flags ) );
-+    m_paths.enqueue( qMakePair( path, flags ) );
-     callForNextIteration();
- 
-     if( wasEmpty )
-@@ -120,12 +120,12 @@
-             processingFile = process( dirIt->next(), pair.second );
-         }
-         else {
--            delete m_iterators.pop().first;
-+            delete m_iterators.dequeue().first;
-         }
-     }
- 
-     else if( !m_paths.isEmpty() ) {
--        QPair< QString, UpdateDirFlags > pair = m_paths.pop();
-+        QPair< QString, UpdateDirFlags > pair = m_paths.dequeue();
-         processingFile = process( pair.first, pair.second );
-     }
- 
-@@ -161,7 +161,7 @@
-             QDir::Filters dirFilter = QDir::NoDotAndDotDot|QDir::Readable|QDir::Files|QDir::Dirs;
- 
-             QPair<QDirIterator*, UpdateDirFlags> pair = qMakePair( new QDirIterator( path, dirFilter ), flags );
--            m_iterators.push( pair );
-+            m_iterators.enqueue( pair );
-         }
-     }
-     else if( info.isFile() && (forced || indexingRequired) ) {
-@@ -259,12 +259,6 @@
- 
-     emit endIndexingFile( url );
- 
--    // Give back the memory
--    if( m_paths.isEmpty() )
--        m_paths.clear();
--    if( m_iterators.isEmpty() )
--        m_iterators.clear();
--
-     // Continue the queue
-     finishIteration();
- }
-
---- a/services/fileindexer/basicindexingqueue.h
-+++ b/services/fileindexer/basicindexingqueue.h
-@@ -23,7 +23,6 @@
- 
- #include "indexingqueue.h"
- #include <KJob>
--#include <QtCore/QStack>
- 
- namespace Nepomuk2 {
- 
-@@ -106,8 +105,8 @@
-          */
-         bool process(const QString& path, Nepomuk2::UpdateDirFlags flags);
- 
--        QStack< QPair<QString, UpdateDirFlags> > m_paths;
--        QStack< QPair<QDirIterator*, UpdateDirFlags> > m_iterators;
-+        QQueue< QPair<QString, UpdateDirFlags> > m_paths;
-+        QQueue< QPair<QDirIterator*, UpdateDirFlags> > m_iterators;
- 
-         QUrl m_currentUrl;
-         QString m_currentMimeType;
-

Copied: nepomuk-core/repos/extra-x86_64/fix-recursive-indexing.patch (from rev 178525, nepomuk-core/trunk/fix-recursive-indexing.patch)
===================================================================
--- extra-x86_64/fix-recursive-indexing.patch	                        (rev 0)
+++ extra-x86_64/fix-recursive-indexing.patch	2013-02-25 10:11:55 UTC (rev 178526)
@@ -0,0 +1,103 @@
+From: Vishesh Handa <me at vhanda.in>
+Date: Fri, 08 Feb 2013 20:58:33 +0000
+Subject: Revert "BasicIndexingQueue: Use stacks instead of queues"
+X-Git-Url: http://quickgit.kde.org/?p=nepomuk-core.git&a=commitdiff&h=b651f9231ac30072418bb06d602951f0f05da22c
+---
+Revert "BasicIndexingQueue: Use stacks instead of queues"
+
+This reverts commit 2f33141aa6716550e38b11ec9a0b000dd74eea79.
+
+The commit breaks recursive indexing. Doh!
+
+BUG: 314559
+---
+
+
+--- a/services/fileindexer/basicindexingqueue.cpp
++++ b/services/fileindexer/basicindexingqueue.cpp
+@@ -54,14 +54,14 @@
+ 
+ void BasicIndexingQueue::clear(const QString& path)
+ {
+-    QMutableVectorIterator< QPair<QString, UpdateDirFlags> > it( m_paths );
++    QMutableListIterator< QPair<QString, UpdateDirFlags> > it( m_paths );
+     while( it.hasNext() ) {
+         it.next();
+         if( it.value().first.startsWith( path ) )
+             it.remove();
+     }
+ 
+-    QMutableVectorIterator< QPair<QDirIterator*, UpdateDirFlags> > iter( m_iterators );
++    QMutableListIterator< QPair<QDirIterator*, UpdateDirFlags> > iter( m_iterators );
+     while( iter.hasNext() ) {
+         QDirIterator* dirIter =  iter.next().first;
+ 
+@@ -100,7 +100,7 @@
+ {
+     kDebug() << path;
+     bool wasEmpty = m_paths.empty();
+-    m_paths.push( qMakePair( path, flags ) );
++    m_paths.enqueue( qMakePair( path, flags ) );
+     callForNextIteration();
+ 
+     if( wasEmpty )
+@@ -120,12 +120,12 @@
+             processingFile = process( dirIt->next(), pair.second );
+         }
+         else {
+-            delete m_iterators.pop().first;
++            delete m_iterators.dequeue().first;
+         }
+     }
+ 
+     else if( !m_paths.isEmpty() ) {
+-        QPair< QString, UpdateDirFlags > pair = m_paths.pop();
++        QPair< QString, UpdateDirFlags > pair = m_paths.dequeue();
+         processingFile = process( pair.first, pair.second );
+     }
+ 
+@@ -161,7 +161,7 @@
+             QDir::Filters dirFilter = QDir::NoDotAndDotDot|QDir::Readable|QDir::Files|QDir::Dirs;
+ 
+             QPair<QDirIterator*, UpdateDirFlags> pair = qMakePair( new QDirIterator( path, dirFilter ), flags );
+-            m_iterators.push( pair );
++            m_iterators.enqueue( pair );
+         }
+     }
+     else if( info.isFile() && (forced || indexingRequired) ) {
+@@ -259,12 +259,6 @@
+ 
+     emit endIndexingFile( url );
+ 
+-    // Give back the memory
+-    if( m_paths.isEmpty() )
+-        m_paths.clear();
+-    if( m_iterators.isEmpty() )
+-        m_iterators.clear();
+-
+     // Continue the queue
+     finishIteration();
+ }
+
+--- a/services/fileindexer/basicindexingqueue.h
++++ b/services/fileindexer/basicindexingqueue.h
+@@ -23,7 +23,6 @@
+ 
+ #include "indexingqueue.h"
+ #include <KJob>
+-#include <QtCore/QStack>
+ 
+ namespace Nepomuk2 {
+ 
+@@ -106,8 +105,8 @@
+          */
+         bool process(const QString& path, Nepomuk2::UpdateDirFlags flags);
+ 
+-        QStack< QPair<QString, UpdateDirFlags> > m_paths;
+-        QStack< QPair<QDirIterator*, UpdateDirFlags> > m_iterators;
++        QQueue< QPair<QString, UpdateDirFlags> > m_paths;
++        QQueue< QPair<QDirIterator*, UpdateDirFlags> > m_iterators;
+ 
+         QUrl m_currentUrl;
+         QString m_currentMimeType;
+




More information about the arch-commits mailing list