Hello community,
here is the log from the commit of package nepomuk-core for openSUSE:Factory checked in at 2013-03-14 14:58:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nepomuk-core (Old)
and /work/SRC/openSUSE:Factory/.nepomuk-core.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nepomuk-core", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/nepomuk-core/nepomuk-core.changes 2013-02-25 20:39:10.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.nepomuk-core.new/nepomuk-core.changes 2013-03-14 14:58:57.000000000 +0100
@@ -1,0 +2,17 @@
+Sat Mar 2 15:44:44 UTC 2013 - tittiatcoke@gmail.com
+
+- Update to 4.10.1
+ * Contains bug fixes. See http://www.kde.org/announcements/
+ for more information
+- Drop all patches applied upstream, that includes:
+ Check-DateTime-for-negative-years.patch,
+ fileindexer-do-not-use-QDirIterators-in-the-queues.patch,
+ initialize-the-m_indexhidden-variable.patch,
+ initialize-m_state-to-its-correct-value.patch,
+ initialize-objects-in-correct-order.diff,
+ connect-both-the-queues-together.diff,
+ do-not-auto-update-the-cache-by-default.diff,
+ emit-the-current-signals-in-propertychanged.diff and
+ Revert-BasicIndexingQueue-Use-stacks-instead-of-queu.patch
+
+-------------------------------------------------------------------
Old:
----
Check-DateTime-for-negative-years.patch
Revert-BasicIndexingQueue-Use-stacks-instead-of-queu.patch
connect-both-the-queues-together.diff
do-not-auto-update-the-cache-by-default.diff
emit-the-current-signals-in-propertychanged.diff
fileindexer-do-not-use-QDirIterators-in-the-queues.patch
initialize-m_state-to-its-correct-value.patch
initialize-objects-in-correct-order.diff
initialize-the-m_indexhidden-variable.patch
nepomuk-core-4.10.0.tar.xz
New:
----
nepomuk-core-4.10.1.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nepomuk-core.spec ++++++
--- /var/tmp/diff_new_pack.6dT0UX/_old 2013-03-14 14:58:59.000000000 +0100
+++ /var/tmp/diff_new_pack.6dT0UX/_new 2013-03-14 14:58:59.000000000 +0100
@@ -34,28 +34,10 @@
License: GPL-2.0+
Group: System/GUI/KDE
Url: http://nepomuk.kde.org/
-Version: 4.10.0
+Version: 4.10.1
Release: 0
Source0: %{name}-%{version}.tar.xz
Source99: nepomuk.png
-# PATCH-FIX-UPSTREAM Revert-BasicIndexingQueue-Use-stacks-instead-of-queu.patch fixes indexer not working recursively (kde#314559)
-Patch0: Revert-BasicIndexingQueue-Use-stacks-instead-of-queu.patch
-# PATCH-FIX-UPSTREAM initialize-objects-in-correct-order.diff Object where initialized in the wrong order, and this always caused a crash for users that enabled nepomuk with clean db (kde#314589)
-Patch1: initialize-objects-in-correct-order.diff
-# PATCH-FIX-UPSTREAM connect-both-the-queues-together.diff
-Patch2: connect-both-the-queues-together.diff
-# PATCH-FIX-UPSTREAM emit-the-current-signals-in-propertychanged.diff
-Patch3: emit-the-current-signals-in-propertychanged.diff
-# PATCH-FIX-UPSTREAM do-not-auto-update-the-cache-by-default.diff
-Patch4: do-not-auto-update-the-cache-by-default.diff
-# PATCH-FIX-UPSTREAM fileindexer-do-not-use-QDirIterators-in-the-queues.patch
-Patch5: fileindexer-do-not-use-QDirIterators-in-the-queues.patch
-# PATCH-FIX-UPSTREAM initialize-the-m_indexhidden-variable.patch
-Patch6: initialize-the-m_indexhidden-variable.patch
-# PATCH-FIX-UPSTREAM initialize-m_state-to-its-correct-value.patch
-Patch7: initialize-m_state-to-its-correct-value.patch
-# PATCH-FIX-UPSTREAM Check-DateTime-for-negative-years.patch
-Patch8: Check-DateTime-for-negative-years.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: kdelibs4 >= %version
Requires: soprano-backend-redland
@@ -76,15 +58,6 @@
%prep
%setup -q -n %{name}-%{version}
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
%build
%cmake_kde4 -d build -- -DKDE4_ENABLE_FPIE=1
++++++ nepomuk-core-4.10.0.tar.xz -> nepomuk-core-4.10.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/autotests/test/resourcetests.cpp new/nepomuk-core-4.10.1/autotests/test/resourcetests.cpp
--- old/nepomuk-core-4.10.0/autotests/test/resourcetests.cpp 2013-01-23 22:44:45.000000000 +0100
+++ new/nepomuk-core-4.10.1/autotests/test/resourcetests.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -81,10 +81,11 @@
QVERIFY(model->containsAnyStatement(uri, NAO::created(), Soprano::Node()));
QVERIFY(model->containsAnyStatement(uri, RDF::type(), NAO::Tag()));
QVERIFY(model->containsAnyStatement(uri, NAO::identifier(), Soprano::LiteralValue("Test")));
+ QVERIFY(model->containsAnyStatement(uri, NAO::prefLabel(), Soprano::LiteralValue::createPlainLiteral("Test")));
QListSoprano::Statement stList = model->listStatements( tag.uri(), Soprano::Node(),
Soprano::Node() ).allStatements();
- QCOMPARE(stList.size(), 4);
+ QCOMPARE(stList.size(), 5);
}
void ResourceTests::newContact()
@@ -404,6 +405,7 @@
QVERIFY(tag3.exists());
Resource res(resUri);
+ res.setWatchEnabled( true );
QList<Tag> tags;
tags << tag1 << tag2 << tag3;
@@ -486,6 +488,7 @@
QUrl fileUri;
Resource fileRes( fileUrl );
+ fileRes.setWatchEnabled( true );
QVERIFY(!fileRes.exists());
QVERIFY(fileRes.uri().isEmpty());
@@ -505,6 +508,7 @@
void ResourceTests::identifierUpdate()
{
Tag tag("Fire");
+ tag.setWatchEnabled( true );
QVERIFY(!tag.exists());
// Save the tag
@@ -570,6 +574,7 @@
Tag tag("Poop");
Resource fileRes( fileUrl );
+ fileRes.setWatchEnabled(true);
fileRes.addTag(tag);
const QUrl tagUri = tag.uri();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/cleaner/nepomukcleaner.desktop new/nepomuk-core-4.10.1/cleaner/nepomukcleaner.desktop
--- old/nepomuk-core-4.10.0/cleaner/nepomukcleaner.desktop 2013-01-23 22:44:47.000000000 +0100
+++ new/nepomuk-core-4.10.1/cleaner/nepomukcleaner.desktop 2013-03-01 07:26:55.000000000 +0100
@@ -9,6 +9,7 @@
Name[es]=Limpiador de Nepomuk
Name[et]=Nepomuki puhastaja
Name[fi]=Nepomukin puhdistus
+Name[fr]=Nettoyeur de Nepomuk
Name[gl]=Limpador de Nepomuk
Name[hu]=Nepomuk tisztító
Name[ia]=Nettator de Nepomuk
@@ -32,6 +33,7 @@
Name[sr@ijekavianlatin]=Nepomukov čistač
Name[sr@latin]=Nepomukov čistač
Name[sv]=Nepomuk-rensare
+Name[tr]=Nepomuk Temizleyici
Name[uk]=Чистильник Nepomuk
Name[x-test]=xxNepomuk Cleanerxx
Name[zh_CN]=Nepomuk 清理工具
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/libnepomukcore/datamanagement/resourcewatcher.cpp new/nepomuk-core-4.10.1/libnepomukcore/datamanagement/resourcewatcher.cpp
--- old/nepomuk-core-4.10.0/libnepomukcore/datamanagement/resourcewatcher.cpp 2013-01-23 22:44:45.000000000 +0100
+++ new/nepomuk-core-4.10.1/libnepomukcore/datamanagement/resourcewatcher.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -318,20 +318,20 @@
}
}
-void Nepomuk2::ResourceWatcher::slotPropertyChanged(const QString& resUri, const QString& propUri, const QVariantList& oldObjs, const QVariantList& newObjs)
+void Nepomuk2::ResourceWatcher::slotPropertyChanged(const QString& res_, const QString& prop_, const QVariantList& addedObjs, const QVariantList& removedObjs)
{
- const Resource res = Resource::fromResourceUri(KUrl(resUri));
- const Types::Property prop = KUrl(propUri);
+ const Resource res = Resource::fromResourceUri(KUrl(res_));
+ const Types::Property prop = KUrl(prop_);
- foreach( const QVariant& v, oldObjs ) {
- emit propertyRemoved( res, prop, v );
+ foreach( const QVariant& v, addedObjs ) {
+ emit propertyAdded( res, prop, convertType(prop, v) );
}
- foreach( const QVariant& v, newObjs ) {
- emit propertyAdded( res, prop, v );
+ foreach( const QVariant& v, removedObjs ) {
+ emit propertyRemoved( res, prop, convertType(prop, v) );
}
- emit propertyChanged( res, prop, oldObjs, newObjs );
+ emit propertyChanged( res, prop, addedObjs, removedObjs );
}
#include "resourcewatcher.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/libnepomukcore/datamanagement/resourcewatcher.h new/nepomuk-core-4.10.1/libnepomukcore/datamanagement/resourcewatcher.h
--- old/nepomuk-core-4.10.0/libnepomukcore/datamanagement/resourcewatcher.h 2013-01-23 22:44:45.000000000 +0100
+++ new/nepomuk-core-4.10.1/libnepomukcore/datamanagement/resourcewatcher.h 2013-03-01 07:26:55.000000000 +0100
@@ -352,9 +352,7 @@
void slotResourceRemoved(const QString& res, const QStringList& types);
void slotResourceTypesAdded(const QString& res, const QStringList& types);
void slotResourceTypesRemoved(const QString& res, const QStringList& types);
- void slotPropertyChanged(const QString& res, const QString& prop,
- const QVariantList & oldObjs,
- const QVariantList & newObjs);
+ void slotPropertyChanged(const QString& res, const QString& prop_, const QVariantList& addedObjs, const QVariantList& removedObjs);
private:
class Private;
Private * d;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/libnepomukcore/resource/resource.cpp new/nepomuk-core-4.10.1/libnepomukcore/resource/resource.cpp
--- old/nepomuk-core-4.10.0/libnepomukcore/resource/resource.cpp 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/libnepomukcore/resource/resource.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -668,6 +668,22 @@
return File( *this );
}
+void Nepomuk2::Resource::setWatchEnabled(bool status)
+{
+ determineFinalResourceData();
+ if( m_data )
+ return m_data->setWatchEnabled( status );
+}
+
+bool Nepomuk2::Resource::watchEnabled()
+{
+ determineFinalResourceData();
+ if( m_data )
+ return m_data->watchEnabled();
+
+ return false;
+}
+
// static
Nepomuk2::Resource Nepomuk2::Resource::fromResourceUri( const KUrl& uri, const Nepomuk2::Types::Class& type )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/libnepomukcore/resource/resource.h new/nepomuk-core-4.10.1/libnepomukcore/resource/resource.h
--- old/nepomuk-core-4.10.0/libnepomukcore/resource/resource.h 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/libnepomukcore/resource/resource.h 2013-03-01 07:26:55.000000000 +0100
@@ -510,6 +510,18 @@
*/
static Resource fromResourceUri( const KUrl& uri, const Nepomuk2::Types::Class& type = Nepomuk2::Types::Class() );
+ /**
+ * Enables automatic updates of the internal cache using a
+ * ResourceWatcher.
+ */
+ void setWatchEnabled( bool status );
+
+ /**
+ * \return \p true if this resource will automatically update its cache
+ * when the data is changed by some other application
+ */
+ bool watchEnabled();
+
private:
/**
* Determines the final ResourceData and updates m_data if
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/libnepomukcore/resource/resourcedata.cpp new/nepomuk-core-4.10.1/libnepomukcore/resource/resourcedata.cpp
--- old/nepomuk-core-4.10.0/libnepomukcore/resource/resourcedata.cpp 2013-01-25 13:02:41.000000000 +0100
+++ new/nepomuk-core-4.10.1/libnepomukcore/resource/resourcedata.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -69,6 +69,7 @@
m_modificationMutex(QMutex::Recursive),
m_cacheDirty(false),
m_addedToWatcher(false),
+ m_watchEnabled(false),
m_rm(rm)
{
if( !uri.isEmpty() ) {
@@ -170,10 +171,7 @@
if( !m_uri.isEmpty() ) {
m_rm->m_initializedData.remove( m_uri );
- if( m_addedToWatcher ) {
- m_rm->removeFromWatcher( m_uri );
- m_addedToWatcher = false;
- }
+ removeFromWatcher();
}
m_rm->mutex.unlock();
@@ -313,10 +311,21 @@
// Caller must hold m_modificationMutex
void Nepomuk2::ResourceData::addToWatcher()
{
- m_rm->addToWatcher( m_uri );
- m_addedToWatcher = true;
+ if( m_watchEnabled && !m_addedToWatcher ) {
+ m_rm->addToWatcher( m_uri );
+ m_addedToWatcher = true;
+ }
}
+void Nepomuk2::ResourceData::removeFromWatcher()
+{
+ if( m_addedToWatcher ) {
+ m_rm->removeFromWatcher( m_uri );
+ m_addedToWatcher = false;
+ }
+}
+
+
bool Nepomuk2::ResourceData::load()
{
QMutexLocker rmlock(&m_rm->mutex); // for updateKickOffLists, but must be locked first
@@ -758,3 +767,21 @@
m_cache[prop.uri()].append(var);
}
}
+
+void Nepomuk2::ResourceData::setWatchEnabled(bool status)
+{
+ QMutexLocker lock(&m_modificationMutex);
+ if( m_watchEnabled != status ) {
+ if( status )
+ addToWatcher();
+ else
+ removeFromWatcher();
+
+ m_watchEnabled = status;
+ }
+}
+
+bool Nepomuk2::ResourceData::watchEnabled()
+{
+ return m_watchEnabled;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/libnepomukcore/resource/resourcedata.h new/nepomuk-core-4.10.1/libnepomukcore/resource/resourcedata.h
--- old/nepomuk-core-4.10.0/libnepomukcore/resource/resourcedata.h 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/libnepomukcore/resource/resourcedata.h 2013-03-01 07:26:55.000000000 +0100
@@ -164,6 +164,8 @@
void propertyRemoved( const Types::Property &prop, const QVariant &value );
void propertyAdded( const Types::Property &prop, const QVariant &value );
+ void setWatchEnabled( bool status );
+ bool watchEnabled();
private:
ResourceData(const ResourceData&); // = delete
ResourceData& operator = (const ResourceData&); // = delete
@@ -171,6 +173,7 @@
void updateIdentifierLists( const QString& oldIdentifier, const QString& newIdentifier );
void addToWatcher();
+ void removeFromWatcher();
/// Will reset this instance to 0 as if constructed without parameters
/// Used by remove() and deleteData()
@@ -203,6 +206,7 @@
bool m_cacheDirty;
bool m_addedToWatcher;
+ bool m_watchEnabled;
ResourceManagerPrivate* m_rm;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/basicindexingqueue.cpp new/nepomuk-core-4.10.1/services/fileindexer/basicindexingqueue.cpp
--- old/nepomuk-core-4.10.0/services/fileindexer/basicindexingqueue.cpp 2013-01-27 16:40:20.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/basicindexingqueue.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -44,12 +44,6 @@
m_currentUrl.clear();
m_currentFlags = NoUpdateFlags;
m_paths.clear();
-
- typedef QPair DirPair;
- foreach( const DirPair& pair, m_iterators )
- delete pair.first;
-
- m_iterators.clear();
}
void BasicIndexingQueue::clear(const QString& path)
@@ -60,16 +54,6 @@
if( it.value().first.startsWith( path ) )
it.remove();
}
-
- QMutableVectorIterator< QPair > iter( m_iterators );
- while( iter.hasNext() ) {
- QDirIterator* dirIter = iter.next().first;
-
- if( dirIter->path().startsWith( path ) ) {
- iter.remove();
- delete dirIter;
- }
- }
}
QUrl BasicIndexingQueue::currentUrl() const
@@ -85,7 +69,7 @@
bool BasicIndexingQueue::isEmpty()
{
- return m_iterators.isEmpty() && m_paths.isEmpty();
+ return m_paths.isEmpty();
}
void BasicIndexingQueue::enqueue(const QString& path)
@@ -111,20 +95,7 @@
{
bool processingFile = false;
- // First process all the iterators and then the paths
- if( !m_iterators.isEmpty() ) {
- QPair< QDirIterator*, UpdateDirFlags > pair = m_iterators.first();
- QDirIterator* dirIt = pair.first;
-
- if( dirIt->hasNext() ) {
- processingFile = process( dirIt->next(), pair.second );
- }
- else {
- delete m_iterators.pop().first;
- }
- }
-
- else if( !m_paths.isEmpty() ) {
+ if( !m_paths.isEmpty() ) {
QPair< QString, UpdateDirFlags > pair = m_paths.pop();
processingFile = process( pair.first, pair.second );
}
@@ -160,8 +131,10 @@
if( recursive && !info.isSymLink() && shouldIndexContents(path) ) {
QDir::Filters dirFilter = QDir::NoDotAndDotDot|QDir::Readable|QDir::Files|QDir::Dirs;
- QPair pair = qMakePair( new QDirIterator( path, dirFilter ), flags );
- m_iterators.push( pair );
+ QDirIterator it( path, dirFilter );
+ while( it.hasNext() ) {
+ m_paths.push( qMakePair(it.next(), flags) );
+ }
}
}
else if( info.isFile() && (forced || indexingRequired) ) {
@@ -259,12 +232,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();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/basicindexingqueue.h new/nepomuk-core-4.10.1/services/fileindexer/basicindexingqueue.h
--- old/nepomuk-core-4.10.0/services/fileindexer/basicindexingqueue.h 2013-01-27 16:40:20.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/basicindexingqueue.h 2013-03-01 07:26:55.000000000 +0100
@@ -107,7 +107,6 @@
bool process(const QString& path, Nepomuk2::UpdateDirFlags flags);
QStack< QPair > m_paths;
- QStack< QPair > m_iterators;
QUrl m_currentUrl;
QString m_currentMimeType;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/fileindexerconfig.cpp new/nepomuk-core-4.10.1/services/fileindexer/fileindexerconfig.cpp
--- old/nepomuk-core-4.10.0/services/fileindexer/fileindexerconfig.cpp 2013-01-27 16:40:20.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/fileindexerconfig.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -51,8 +51,9 @@
Nepomuk2::FileIndexerConfig* Nepomuk2::FileIndexerConfig::s_self = 0;
Nepomuk2::FileIndexerConfig::FileIndexerConfig(QObject* parent)
- : QObject(parent),
- m_config( "nepomukstrigirc" )
+ : QObject(parent)
+ , m_config( "nepomukstrigirc" )
+ , m_indexHidden(false)
{
if(!s_self) {
s_self = this;
@@ -134,7 +135,6 @@
bool Nepomuk2::FileIndexerConfig::indexHiddenFilesAndFolders() const
{
return m_indexHidden;
- return m_config.group( "General" ).readEntry( "index hidden folders", false );
}
@@ -174,7 +174,8 @@
bool Nepomuk2::FileIndexerConfig::shouldFolderBeWatched( const QString& path ) const
{
// do not watch folders in the exclude filters
- if(!shouldFileBeIndexed( path.split('/', QString::SkipEmptyParts).last() ))
+ QStringList cmpts = path.split('/', QString::SkipEmptyParts);
+ if( cmpts.isEmpty() || !shouldFileBeIndexed( cmpts.last() ) )
return false;
return true;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/fileindexingqueue.cpp new/nepomuk-core-4.10.1/services/fileindexer/fileindexingqueue.cpp
--- old/nepomuk-core-4.10.0/services/fileindexer/fileindexingqueue.cpp 2013-01-25 13:02:41.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/fileindexingqueue.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -62,6 +62,15 @@
m_fileQueue.enqueue( it[0].uri() );
}
+void FileIndexingQueue::enqueue(const QUrl& url)
+{
+ if( !m_fileQueue.contains(url) ) {
+ m_fileQueue.enqueue( url );
+ callForNextIteration();
+ }
+}
+
+
bool FileIndexingQueue::isEmpty()
{
return m_fileQueue.isEmpty();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/fileindexingqueue.h new/nepomuk-core-4.10.1/services/fileindexer/fileindexingqueue.h
--- old/nepomuk-core-4.10.0/services/fileindexer/fileindexingqueue.h 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/fileindexingqueue.h 2013-03-01 07:26:55.000000000 +0100
@@ -46,6 +46,7 @@
*/
void start();
+ void enqueue( const QUrl& url );
signals:
void beginIndexingFile(const QUrl& url);
void endIndexingFile(const QUrl& url);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/indexer/extractorplugin.cpp new/nepomuk-core-4.10.1/services/fileindexer/indexer/extractorplugin.cpp
--- old/nepomuk-core-4.10.0/services/fileindexer/indexer/extractorplugin.cpp 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/indexer/extractorplugin.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -95,9 +95,6 @@
contactStrings = string.split(';', QString::SkipEmptyParts);
if( contactStrings.size() == 1 )
- contactStrings = string.split('/', QString::SkipEmptyParts);
-
- if( contactStrings.size() == 1 )
contactStrings = string.split(" ft ", QString::SkipEmptyParts);
if( contactStrings.size() == 1 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/indexer/ffmpegextractor.cpp new/nepomuk-core-4.10.1/services/fileindexer/indexer/ffmpegextractor.cpp
--- old/nepomuk-core-4.10.0/services/fileindexer/indexer/ffmpegextractor.cpp 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/indexer/ffmpegextractor.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -156,8 +156,13 @@
subRes.addProperty( NFO::width(), codec->width );
subRes.addProperty( NFO::height(), codec->height );
- int aspectRatio = codec->sample_aspect_ratio.num / codec->sample_aspect_ratio.den;
- int frameRate = stream->r_frame_rate.num / stream->r_frame_rate.den;
+ int aspectRatio = codec->sample_aspect_ratio.num;
+ int frameRate = stream->r_frame_rate.num;
+
+ if( codec->sample_aspect_ratio.den )
+ aspectRatio /= codec->sample_aspect_ratio.den;
+ if( stream->r_frame_rate.den )
+ frameRate /= stream->r_frame_rate.den;
subRes.addProperty( NFO::aspectRatio(), aspectRatio );
subRes.addProperty( NFO::frameRate(), frameRate );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/indexer/main.cpp new/nepomuk-core-4.10.1/services/fileindexer/indexer/main.cpp
--- old/nepomuk-core-4.10.0/services/fileindexer/indexer/main.cpp 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/indexer/main.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -69,10 +69,8 @@
const KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
// Application
- // Use KApplication instead of QCoreApplication since the okular plugin expects a running GUI
- KApplication app;
-// QCoreApplication app( argc, argv );
-// KComponentData data( aboutData, KComponentData::RegisterAsMainComponent );
+ QCoreApplication app( argc, argv );
+ KComponentData data( aboutData, KComponentData::RegisterAsMainComponent );
if( args->count() == 0 ) {
QTextStream err( stderr );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/indexer/nepomukexiv2extractor.desktop new/nepomuk-core-4.10.1/services/fileindexer/indexer/nepomukexiv2extractor.desktop
--- old/nepomuk-core-4.10.0/services/fileindexer/indexer/nepomukexiv2extractor.desktop 2013-01-23 22:44:47.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/indexer/nepomukexiv2extractor.desktop 2013-03-01 07:26:55.000000000 +0100
@@ -11,6 +11,7 @@
Name[es]=Extractor Exiv2 de Nepomuk
Name[et]=Nepomuki Exiv2 ekstraktimine
Name[fi]=Nepomukin Exiv2-luku
+Name[fr]=Extracteur Exiv2 de Nepomuk
Name[gl]=Extractor de Exiv2 do Nepomuk
Name[hu]=Nepomuk Exiv2 kibontó
Name[ia]=Nepomuk Extractor de Exiv2
@@ -34,6 +35,7 @@
Name[sr@ijekavianlatin]=Nepomukov izdvajač Exivom 2
Name[sr@latin]=Nepomukov izdvajač Exivom 2
Name[sv]=Nepomuk Exiv2-extrahering
+Name[tr]=Nepomuk Exiv2 Çıkartıcı
Name[uk]=Видобувач даних Nepomuk на основі Exiv2
Name[x-test]=xxNepomuk Exiv2 Extractorxx
Name[zh_CN]=Nepomuk Exiv2 提取工具
@@ -47,6 +49,7 @@
Comment[es]=Extractor de archivos de Nepomuk para archivos de imagen
Comment[et]=Nepomuki failiekstraktimine pildifailidele
Comment[fi]=Nepomukin kuvatiedostojen luku
+Comment[fr]=Extracteur de fichiers Nepomuk pour les fichiers image
Comment[gl]=Extractor de ficheiros de imaxe de Nepomuk
Comment[hu]=Nepomuk fájl kibontó képfájlokhoz
Comment[ia]=Extractor de file de Nepomuk pro files de imagines
@@ -69,6 +72,7 @@
Comment[sr@ijekavianlatin]=Nepomukov izdvajač za fajlove slika
Comment[sr@latin]=Nepomukov izdvajač za fajlove slika
Comment[sv]=Nepomuk filextrahering för bildfiler
+Comment[tr]=Resim dosyaları için Nepomuk Dosya çıkartıcısı
Comment[uk]=Видобувач даних Nepomuk для файлів зображень
Comment[x-test]=xxNepomuk File extractor for Image filesxx
Comment[zh_CN]=Nepomuk 图像文件提取工具
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/indexer/nepomukextractor.desktop new/nepomuk-core-4.10.1/services/fileindexer/indexer/nepomukextractor.desktop
--- old/nepomuk-core-4.10.0/services/fileindexer/indexer/nepomukextractor.desktop 2013-01-23 22:44:47.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/indexer/nepomukextractor.desktop 2013-03-01 07:26:55.000000000 +0100
@@ -10,6 +10,7 @@
Comment[es]=Extractor de archivos de Nepomuk
Comment[et]=Nepomuki failiekstraktimine
Comment[fi]=Nepomukin tiedostojen luku
+Comment[fr]=Extracteur de fichiers Nepomuk
Comment[gl]=Extractor de ficheiros de Nepomuk
Comment[hu]=Nepomuk fájl kibontó
Comment[ia]=Nepomuk Extractor de file
@@ -33,6 +34,7 @@
Comment[sr@ijekavianlatin]=Nepomukov izdvajač iz fajlova
Comment[sr@latin]=Nepomukov izdvajač iz fajlova
Comment[sv]=Nepomuk filextrahering
+Comment[tr]=Nepomuk Dosya Çıkartıcı
Comment[uk]=Видобувач даних файлів для Nepomuk
Comment[x-test]=xxNepomuk File Extractorxx
Comment[zh_CN]=Nepomuk 文件提取工具
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/indexer/nepomukffmpegextractor.desktop new/nepomuk-core-4.10.1/services/fileindexer/indexer/nepomukffmpegextractor.desktop
--- old/nepomuk-core-4.10.0/services/fileindexer/indexer/nepomukffmpegextractor.desktop 2013-01-23 22:44:47.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/indexer/nepomukffmpegextractor.desktop 2013-03-01 07:26:55.000000000 +0100
@@ -11,6 +11,7 @@
Name[es]=Extractor FFmpeg de Nepomuk
Name[et]=Nepomuki FFmpegi ekstraktimine
Name[fi]=Nepomukin FFmpeg-luku
+Name[fr]=Extracteur FFmpeg de Nepomuk
Name[gl]=Extractor de FFmpeg de Nepomuk
Name[hu]=Nepomuk FFmpeg kibontó
Name[ia]=Nepomuk Extractor de FFmpeg
@@ -33,6 +34,7 @@
Name[sr@ijekavianlatin]=Nepomukov izdvajač FFmpegom
Name[sr@latin]=Nepomukov izdvajač FFmpegom
Name[sv]=Nepomuk FFmpeg-extrahering
+Name[tr]=Nepomuk FFmpeg Çıkartıcı
Name[uk]=Видобувач даних Nepomuk на основі FFmpeg
Name[x-test]=xxNepomuk FFmpeg Extractorxx
Name[zh_CN]=Nepomuk FFmpeg 提取工具
@@ -46,6 +48,7 @@
Comment[es]=Extractor de archivos de Nepomuk para archivos de vídeo
Comment[et]=Nepomuki failiekstraktimine videofailidele
Comment[fi]=Nepomukin videotiedostojen luku
+Comment[fr]=Extracteur de fichiers Nepomuk pour les fichiers vidéo
Comment[gl]=Extractor de ficheiros de vídeo de Nepomuk
Comment[hu]=Nepomuk fájl kibontó videofájlokhoz
Comment[ia]=Extractor de file de Nepomuk pro files de video
@@ -68,6 +71,7 @@
Comment[sr@ijekavianlatin]=Nepomukov izdvajač za video fajlove
Comment[sr@latin]=Nepomukov izdvajač za video fajlove
Comment[sv]=Nepomuk filextrahering för videofiler
+Comment[tr]=Video dosyaları için Nepomuk Dosya çıkartıcısı
Comment[uk]=Видобувач даних Nepomuk для відеофайлів
Comment[x-test]=xxNepomuk File extractor for Video filesxx
Comment[zh_CN]=Nepomuk 视频文件提取工具
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/indexer/nepomukplaintextextractor.desktop new/nepomuk-core-4.10.1/services/fileindexer/indexer/nepomukplaintextextractor.desktop
--- old/nepomuk-core-4.10.0/services/fileindexer/indexer/nepomukplaintextextractor.desktop 2013-01-23 22:44:47.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/indexer/nepomukplaintextextractor.desktop 2013-03-01 07:26:55.000000000 +0100
@@ -11,6 +11,7 @@
Name[es]=Extractor de texto sin formato de Nepomuk
Name[et]=Nepomuki lihtteksti ekstraktimine
Name[fi]=Nepomukin muotoilemattoman tekstin luku
+Name[fr]=Extracteur de texte en clair de Nepomuk
Name[gl]=Extractor de texto simple do Nepomuk
Name[hu]=Nepomuk egyszerű szöveg kibontó
Name[ia]=Nepomuk Extractor de texto plan
@@ -33,6 +34,7 @@
Name[sr@ijekavianlatin]=Nepomukov izdvajač običnog teksta
Name[sr@latin]=Nepomukov izdvajač običnog teksta
Name[sv]=Nepomuk extrahering av vanlig text
+Name[tr]=Nepomuk Düz Metin Çıkartıcı
Name[uk]=Видобувач текстових даних Nepomuk
Name[x-test]=xxNepomuk Plain Text Extractorxx
Name[zh_CN]=Nepomuk 纯文本提取工具
@@ -46,6 +48,7 @@
Comment[es]=Extractor de archivos de Nepomuk para archivos de texto
Comment[et]=Nepomuki failiekstraktimine tekstifailidele
Comment[fi]=Nepomukin tekstitiedostojen luku
+Comment[fr]=Extracteur de fichiers Nepomuk pour les fichiers texte
Comment[gl]=Extractor de ficheiros de texto de Nepomuk
Comment[hu]=Nepomuk fájl kibontó szöveges fájlokhoz
Comment[ia]=Extractor de file de Nepomuk pro files de texto
@@ -68,6 +71,7 @@
Comment[sr@ijekavianlatin]=Nepomukov izdvajač za tekstualne fajlove
Comment[sr@latin]=Nepomukov izdvajač za tekstualne fajlove
Comment[sv]=Nepomuk filextrahering för textfiler
+Comment[tr]=Metin dosyaları için Nepomuk Dosya çıkartıcısı
Comment[uk]=Видобувач даних Nepomuk для текстових файлів
Comment[x-test]=xxNepomuk File extractor for text filesxx
Comment[zh_CN]=Nepomuk 文本文件提取工具
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/indexer/nepomukpopplerextractor.desktop new/nepomuk-core-4.10.1/services/fileindexer/indexer/nepomukpopplerextractor.desktop
--- old/nepomuk-core-4.10.0/services/fileindexer/indexer/nepomukpopplerextractor.desktop 2013-01-23 22:44:47.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/indexer/nepomukpopplerextractor.desktop 2013-03-01 07:26:55.000000000 +0100
@@ -11,6 +11,7 @@
Name[es]=Extractor Poppler de Nepomuk
Name[et]=Nepomuki Poppleri ekstraktimine
Name[fi]=Nepomukin Poppler-luku
+Name[fr]=Extracteur Poppler de Nepomuk
Name[gl]=Extractor de Poppler do Nepomuk
Name[hu]=Nepomuk Poppler kibontó
Name[ia]=Nepomuk Extractor de Poppler
@@ -33,6 +34,7 @@
Name[sr@ijekavianlatin]=Nepomukov izdvajač Popplerom
Name[sr@latin]=Nepomukov izdvajač Popplerom
Name[sv]=Nepomuk Poppler-extrahering
+Name[tr]=Nepomuk Poppler Çıkartıcı
Name[uk]=Видобувач даних Nepomuk на основі Poppler
Name[x-test]=xxNepomuk Poppler Extractorxx
Name[zh_CN]=Nepomuk Poppler 提取工具
@@ -46,6 +48,7 @@
Comment[es]=Extractor de archivos de Nepomuk para archivos PDF
Comment[et]=Nepomuki failiekstraktimine PDF-failidele
Comment[fi]=Nepomukin PDF-tiedostojen luku
+Comment[fr]=Extracteur de fichiers Nepomuk pour les fichiers PDF
Comment[gl]=Extractor de ficheiros PDF de Nepomuk
Comment[hu]=Nepomuk fájl kibontó PDF fájlokhoz
Comment[ia]=Extractor de file de Nepomuk pro files PDF
@@ -68,6 +71,7 @@
Comment[sr@ijekavianlatin]=Nepomukov izdvajač za PDF fajlove
Comment[sr@latin]=Nepomukov izdvajač za PDF fajlove
Comment[sv]=Nepomuk filextrahering för PDF-filer
+Comment[tr]=PDF dosyaları için Nepomuk Dosya çıkartıcısı
Comment[uk]=Видобувач даних Nepomuk для файлів PDF
Comment[x-test]=xxNepomuk File extractor for PDF filesxx
Comment[zh_CN]=Nepomuk PDF 文件提取工具
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/indexer/nepomuktaglibextractor.desktop new/nepomuk-core-4.10.1/services/fileindexer/indexer/nepomuktaglibextractor.desktop
--- old/nepomuk-core-4.10.0/services/fileindexer/indexer/nepomuktaglibextractor.desktop 2013-01-23 22:44:47.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/indexer/nepomuktaglibextractor.desktop 2013-03-01 07:26:55.000000000 +0100
@@ -11,6 +11,7 @@
Name[es]=Extractor TagLib de Nepomuk
Name[et]=Nepomuki TagLibi ekstraktimine
Name[fi]=Nepomukin TagLib-luku
+Name[fr]=Extracteur TagLib de Nepomuk
Name[gl]=Extractor de Taglib do Nepomuk
Name[hu]=Nepomuk TagLib kibontó
Name[ia]=Nepomuk Extractor de TagLib
@@ -34,6 +35,7 @@
Name[sr@ijekavianlatin]=Nepomukov izdvajač TagLibom
Name[sr@latin]=Nepomukov izdvajač TagLibom
Name[sv]=Nepomuk TagLib-extrahering
+Name[tr]=Nepomuk TagLib Çıkartıcı
Name[uk]=Видобувач даних Nepomuk на основі TagLib
Name[x-test]=xxNepomuk TagLib Extractorxx
Name[zh_CN]=Nepomuk TagLib 提取工具
@@ -47,6 +49,7 @@
Comment[es]=Extractor de archivos de Nepomuk para archivos de música
Comment[et]=Nepomuki failiekstraktimine muusikafailidele
Comment[fi]=Nepomukin musiikkitiedostojen luku
+Comment[fr]=Extracteur de fichiers Nepomuk pour les fichiers musicaux
Comment[gl]=Extractor de ficheiros Music de Nepomuk
Comment[hu]=Nepomuk fájl kibontó zenefájlokhoz
Comment[ia]=Extractor de file de nepomuk pro files de music
@@ -69,6 +72,7 @@
Comment[sr@ijekavianlatin]=Nepomukov izdvajač za muzičke fajlove
Comment[sr@latin]=Nepomukov izdvajač za muzičke fajlove
Comment[sv]=Nepomuk filextrahering för musikfiler
+Comment[tr]=Müzik Dosyaları için Nepomuk Dosya çıkartıcısı
Comment[uk]=Видобувач даних Nepomuk для звукових файлів
Comment[x-test]=xxNepomuk File extractor for Music Filesxx
Comment[zh_CN]=Nepomuk 音乐文件提取工具
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/indexer/taglibextractor.cpp new/nepomuk-core-4.10.1/services/fileindexer/indexer/taglibextractor.cpp
--- old/nepomuk-core-4.10.0/services/fileindexer/indexer/taglibextractor.cpp 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/indexer/taglibextractor.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -119,6 +119,8 @@
QDateTime dt = QDateTime::currentDateTime();
QDate date = dt.date();
date.setDate( tags->year(), date.month(), date.day() );
+ if( date.year() < 0 )
+ date.setDate( 1, date.month(), date.day() );
dt.setDate( date );
fileRes.setProperty( NIE::contentCreated(), dt );
}
@@ -132,7 +134,7 @@
}
if( audioProp->bitrate() ) {
- fileRes.setProperty( NFO::averageBitrate(), audioProp->bitrate() );
+ fileRes.setProperty( NFO::averageBitrate(), audioProp->bitrate() * 1000 );
}
if( audioProp->channels() ) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/indexscheduler.cpp new/nepomuk-core-4.10.1/services/fileindexer/indexscheduler.cpp
--- old/nepomuk-core-4.10.0/services/fileindexer/indexscheduler.cpp 2013-01-29 00:10:10.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/indexscheduler.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -51,10 +51,6 @@
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)) );
@@ -87,6 +83,9 @@
connect( m_fileIQ, SIGNAL(startedIndexing()), this, SLOT(slotStartedIndexing()) );
connect( m_fileIQ, SIGNAL(finishedIndexing()), this, SLOT(slotFinishedIndexing()) );
+ // Connect both the queues together
+ connect( m_basicIQ, SIGNAL(endIndexingFile(QUrl)), m_fileIQ, SLOT(enqueue(QUrl)) );
+
// Status String
connect( m_basicIQ, SIGNAL(beginIndexingFile(QUrl)), this, SIGNAL(statusStringChanged()) );
connect( m_basicIQ, SIGNAL(endIndexingFile(QUrl)), this, SIGNAL(statusStringChanged()) );
@@ -106,6 +105,11 @@
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();
+ m_state = State_Cleaning;
+
// Special settings for the queues
KConfig config( "nepomukstrigirc" );
KConfigGroup cfg = config.group( "Indexing" );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/nepomukfileindexer.desktop new/nepomuk-core-4.10.1/services/fileindexer/nepomukfileindexer.desktop
--- old/nepomuk-core-4.10.0/services/fileindexer/nepomukfileindexer.desktop 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/nepomukfileindexer.desktop 2013-03-01 07:26:55.000000000 +0100
@@ -45,7 +45,7 @@
Name[sr@ijekavianlatin]=Servis indeksara fajlova
Name[sr@latin]=Servis indeksara fajlova
Name[sv]=Filindexeringstjänst
-Name[tr]=Dosya İndeksleme Servisi
+Name[tr]=Dosya Dizinleme Servisi
Name[ug]=ھۆججەت ئىندېكسلىغۇچ مۇلازىمىتى
Name[uk]=Служба індексування файлів
Name[x-test]=xxFile Indexer Servicexx
@@ -92,7 +92,7 @@
Comment[sr@ijekavianlatin]=Nepomukov servis za indeksiranje fajlova na površi
Comment[sr@latin]=Nepomukov servis za indeksiranje fajlova na površi
Comment[sv]=Nepomuk-tjänst som indexerar filer på skrivbordet
-Comment[tr]=Masaüstündeki dosyaları indeksleyen Nepomuk Servisi
+Comment[tr]=Masaüstündeki dosyaları dizinleyen Nepomuk Servisi
Comment[ug]=ئۈستەلئۈستىدىكى ھۆججەتلەرنى ئىندېكىسلايدىغان Nepomuk مۇلازىمىتى
Comment[uk]=Служба Nepomuk, яка індексує файли на вашому комп’ютері
Comment[x-test]=xxNepomuk Service which indexes files on the desktopxx
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/fileindexer/nepomukfileindexer.notifyrc new/nepomuk-core-4.10.1/services/fileindexer/nepomukfileindexer.notifyrc
--- old/nepomuk-core-4.10.0/services/fileindexer/nepomukfileindexer.notifyrc 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/fileindexer/nepomukfileindexer.notifyrc 2013-03-01 07:26:55.000000000 +0100
@@ -72,7 +72,7 @@
Name[ko]=인덱싱 중단됨
Name[lt]=Indeksavimas pristabdytas
Name[lv]=Indeksēšana ir aizturēta
-Name[mr]=अनुक्रमीत करणे निलंबित झाले आहे
+Name[mr]=अनुक्रमीत करणे अकार्यक्षम झाले आहे
Name[nb]=Indeksering midlertidig stoppet
Name[nds]=Indizeren anhollen
Name[nl]=Indexering onderbroken
@@ -90,7 +90,7 @@
Name[sr@ijekavianlatin]=Indeksiranje suspendovano
Name[sr@latin]=Indeksiranje suspendovano
Name[sv]=Indexering tillfälligt stoppad
-Name[tr]=İndeksleme askıya alındı
+Name[tr]=Dizinleme askıya alındı
Name[ug]=ئىندېكسلاش ۋاقتىنچە توختىتىلدى
Name[uk]=Пауза індексування
Name[x-test]=xxIndexing suspendedxx
@@ -119,7 +119,7 @@
Comment[ko]=검색 서비스에서 파일 인덱싱을 중단하였습니다.
Comment[lt]=Failų indeksavimas buvo pristabdytas paieškos tarnybos.
Comment[lv]=Meklēšanas serviss ir aizturējis failu indeksēšanu.
-Comment[mr]=शोध सेवेने फाईल अनुक्रमीत करणे निलंबित केले आहे.
+Comment[mr]=शोध सेवेने फाईल अनुक्रमीत करणे अकार्यक्षम केले आहे.
Comment[nb]=Filindeksering er stoppet av søketjenesten.
Comment[nds]=De Söökdeenst hett dat Indizeren vun Dateien utsett.
Comment[nl]=Bestandenindexering is onderbroken door de zoekservice.
@@ -137,7 +137,7 @@
Comment[sr@ijekavianlatin]=Servis pretrage je suspendovao indeksiranje fajlova.
Comment[sr@latin]=Servis pretrage je suspendovao indeksiranje fajlova.
Comment[sv]=Filindexering har tillfälligt stoppats av söktjänsten.
-Comment[tr]=Dosya indeksleyici arama servisi tarafından durduruldu.
+Comment[tr]=Dosya dizinleyici arama servisi tarafından durduruldu.
Comment[ug]=ھۆججەت ئىندېكسلاش ئىزدەش مۇلازىمىتى تەرىپىدىن ۋاقتىنچە توختىتىلدى.
Comment[uk]=Індексування файлів було призупинено службою пошуку.
Comment[x-test]=xxFile indexing has been suspended by the search service.xx
@@ -169,7 +169,7 @@
Name[ko]=인덱싱 다시 시작됨
Name[lt]=Indeksavimas pratęstas
Name[lv]=Indeksēšana ir atsākta
-Name[mr]=अनुक्रमीत करणे परत सुरु झाले आहे
+Name[mr]=अनुक्रमीत करणे पुन्हा सुरु झाले आहे
Name[nb]=Indeksering gjenopptatt
Name[nds]=Indizeren geiht wieder
Name[nl]=Indexering hervat
@@ -187,7 +187,7 @@
Name[sr@ijekavianlatin]=Indeksiranje nastavljeno
Name[sr@latin]=Indeksiranje nastavljeno
Name[sv]=Indexering återupptagen
-Name[tr]=İndeksleme devam ediyor
+Name[tr]=Dizinleme devam ediyor
Name[ug]=ئىندېكسلاش داۋاملاشتۇرۇلدى
Name[uk]=Продовження індексування
Name[x-test]=xxIndexing resumedxx
@@ -216,7 +216,7 @@
Comment[ko]=검색 서비스에서 파일 인덱싱을 다시 시작하였습니다.
Comment[lt]=Failų indeksavimas buvo pratęstas paieškos tarnybos.
Comment[lv]=Meklēšanas serviss ir atsācis failu indeksēšanu.
-Comment[mr]=शोध सेवेने फाईल अनुक्रमीत करणे परत सुरु केले आहे.
+Comment[mr]=शोध सेवेने फाईल अनुक्रमीत करणे पुन्हा सुरु केले आहे.
Comment[nb]=Filindeksering er gjenopptatt av søketjenesten.
Comment[nds]=De Söökdeenst maakt mit dat Indizeren vun Dateien wieder.
Comment[nl]=Bestandenindexering is hervat door de zoekservice.
@@ -234,7 +234,7 @@
Comment[sr@ijekavianlatin]=Servis pretrage je nastavio indeksiranje fajlova.
Comment[sr@latin]=Servis pretrage je nastavio indeksiranje fajlova.
Comment[sv]=Filindexering har återupptagits av söktjänsten.
-Comment[tr]=Dosya indeksleyici arama servisi tarafından devam ettirildi.
+Comment[tr]=Dosya dizinleyici arama servisi tarafından devam ettirildi.
Comment[ug]=ھۆججەت ئىندېكسلاش ئىزدەش مۇلازىمىتى تەرىپىدىن داۋاملاشتۇرۇلدى.
Comment[uk]=Індексування файлів було поновлено службою пошуку.
Comment[x-test]=xxFile indexing has been resumed by the search service.xx
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/filewatch/kinotify.cpp new/nepomuk-core-4.10.1/services/filewatch/kinotify.cpp
--- old/nepomuk-core-4.10.0/services/filewatch/kinotify.cpp 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/filewatch/kinotify.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -270,7 +270,7 @@
QMutableLinkedListIterator iter( d->dirIterators );
while( iter.hasNext() ) {
QDirIterator* dirIter = iter.next();
- if( dirIter->filePath().startsWith( path ) ) {
+ if( dirIter->path().startsWith( path ) ) {
iter.remove();
delete dirIter;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/filewatch/nepomukfilewatch.cpp new/nepomuk-core-4.10.1/services/filewatch/nepomukfilewatch.cpp
--- old/nepomuk-core-4.10.0/services/filewatch/nepomukfilewatch.cpp 2013-01-27 16:40:20.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/filewatch/nepomukfilewatch.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -125,7 +125,7 @@
// start the mover thread
m_metadataMoverThread = new QThread(this);
m_metadataMoverThread->start();
- m_metadataMover = new MetadataMover( mainModel() );
+ m_metadataMover = new MetadataMover( mainModel(), this );
connect( m_metadataMover, SIGNAL(movedWithoutData(QString)),
this, SLOT(slotMovedWithoutData(QString)),
Qt::QueuedConnection );
@@ -417,17 +417,22 @@
KConfigGroup cfg = config.group( "RemovableMedia" );
if( cfg.readEntry<bool>( "add watches", true ) ) {
+ QString path = entry->mountPath();
+ // If the device is not a storage device, mountPath returns QString().
+ // In this case do not try to install watches.
+ if( path.isEmpty() )
+ return;
if( entry->device().isDeviceInterface( Solid::DeviceInterface::NetworkShare ) ) {
if( cfg.readEntry<bool>( "add watches network share", false ) ) {
- kDebug() << "Installing watch for network share at mount point" << entry->mountPath();
- watchFolder(entry->mountPath());
+ kDebug() << "Installing watch for network share at mount point" << path;
+ watchFolder(path);
}
}
else {
- kDebug() << "Installing watch for removable storage at mount point" << entry->mountPath();
+ kDebug() << "Installing watch for removable storage at mount point" << path;
// vHanda: Perhaps this should only be done if we have some metadata on the removable media
// and if we do not then we add the watches when we get some metadata?
- watchFolder(entry->mountPath());
+ watchFolder(path);
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/filewatch/nepomukfilewatch.notifyrc new/nepomuk-core-4.10.1/services/filewatch/nepomukfilewatch.notifyrc
--- old/nepomuk-core-4.10.0/services/filewatch/nepomukfilewatch.notifyrc 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/filewatch/nepomukfilewatch.notifyrc 2013-03-01 07:26:55.000000000 +0100
@@ -72,7 +72,7 @@
Name[ko]=새 이동식 장치
Name[lt]=Naujas išorinis įrenginys
Name[lv]=Jauna noņemamā iekārta
-Name[mr]=नविन काढता येण्याजोगे साधन
+Name[mr]=नवीन काढता येण्याजोगे साधन
Name[nb]=Ny flyttbar enhet
Name[nds]=Niege tuuschbore Reedschappen
Name[nl]=Nieuwe verwijderbare apparaten
@@ -119,7 +119,7 @@
Comment[ko]=알 수 없는 새 이동식 장치가 마운트됨
Comment[lt]=Naujas nežinomas išorinis įrenginys buvo įtaisytas
Comment[lv]=Ir piemontēta jauna nezināma noņemamā iekārta
-Comment[mr]=एक नविन अपरिचीत काढता येण्याजोगे साधन जोडले आहे
+Comment[mr]=एक नवीन अपरिचीत काढता येण्याजोगे साधन जोडले आहे
Comment[nb]=En ny ukjent flyttbar enhet er montert
Comment[nds]=En nieg nich begäng tuuschbor Reedschap wöör inhangt
Comment[nl]=Een nieuw verwijderbaar apparaat is aangekoppeld
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/storage/classandpropertytree.cpp new/nepomuk-core-4.10.1/services/storage/classandpropertytree.cpp
--- old/nepomuk-core-4.10.0/services/storage/classandpropertytree.cpp 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/storage/classandpropertytree.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -430,8 +430,11 @@
// although nao:identifier is actually an abstract property Nepomuk has been using
// it for very long to store string identifiers (instead of nao:personalIdentifier).
// Thus, we force its range to xsd:string for correct conversion in variantListToNodeSet()
- if(m_tree.contains(NAO::identifier()))
- m_tree[NAO::identifier()]->range = XMLSchema::string();
+ if(m_tree.contains(NAO::identifier())) {
+ ClassOrProperty* cop = m_tree[NAO::identifier()];
+ cop->range = XMLSchema::string();
+ cop->literalType = QVariant::String;
+ }
// add rdfs:Resource as parent for all top-level classes
ClassOrProperty* rdfsResourceNode = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/storage/datamanagementmodel.cpp new/nepomuk-core-4.10.1/services/storage/datamanagementmodel.cpp
--- old/nepomuk-core-4.10.0/services/storage/datamanagementmodel.cpp 2013-01-29 22:55:32.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/storage/datamanagementmodel.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -237,6 +237,7 @@
Nepomuk2::DataManagementModel::~DataManagementModel()
{
+ delete d->m_typeCache;
delete d;
}
@@ -931,8 +932,6 @@
void Nepomuk2::DataManagementModel::removeResources(const QList<QUrl> &resources, RemovalFlags flags, const QString &app)
{
- kDebug() << resources << app << flags;
-
Q_UNUSED(app);
// 1. get all sub-resources and check if they are used by some other resource (not in the list of resources to remove)
// for the latter one can use a bif:exists and a !filter(?s in <s>, <s>, ...) - based on the value of force
@@ -1800,10 +1799,6 @@
//
resIdent.identifyAll();
- if( resIdent.mappings().empty() ) {
- kDebug() << "Nothing was mapped merging everything as it is.";
- }
-
ResourceMerger merger( this, app, additionalMetadata, flags );
merger.setMappings( resIdent.mappings() );
if( !merger.merge( resIdent.resourceHash() ) ) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/storage/nepomukstorage.notifyrc new/nepomuk-core-4.10.1/services/storage/nepomukstorage.notifyrc
--- old/nepomuk-core-4.10.0/services/storage/nepomukstorage.notifyrc 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/storage/nepomukstorage.notifyrc 2013-03-01 07:26:55.000000000 +0100
@@ -263,7 +263,7 @@
Comment[ko]=모든 Nepomuk 데이터가 새 저장 백엔드로 변환됨
Comment[lt]=Visi Nepomuk duomenys yra konvertuoti į naują kaupiklio galinę sąsają
Comment[lv]=Visi Nepomuk dati ir konvertēti jaunās datu glabātuves lietošanai
-Comment[mr]=सर्व नेपोमुक डेटा नविन स्टोरेज बॅकएन्ड मध्ये रूपांतरित झाला आहे
+Comment[mr]=सर्व नेपोमुक डेटा नवीन स्टोरेज बॅकएन्ड मध्ये रूपांतरित झाला आहे
Comment[nb]=Alle Nepomuk-data er omformet til en ny lagringsmotor
Comment[nds]=All Nepomuk-Daten warrt för en nieg Hülpprogramm ümwannelt
Comment[nl]=Alle Nepomuk-gegevens zijn geconverteerd naar de nieuwe opslagbackend
@@ -360,7 +360,7 @@
Comment[ko]=Nepomuk 데이터를 새 백엔드로 변환할 수 없음
Comment[lt]=Nepomuk duomenų konvertavimas į naują galinę sąsają nepavyko
Comment[lv]=Nepomuk datu konvertēšana uz jauno glabātuvi bija nesekmīga
-Comment[mr]=नेपोमुक डेटा नविन स्टोरेज बॅकएन्ड मध्ये रूपांतरित करण्यास अपयश
+Comment[mr]=नेपोमुक डेटा नवीन स्टोरेज बॅकएन्ड मध्ये रूपांतरित करण्यास अपयश
Comment[nb]=Det lyktes ikke å omforme Nepomuk-data til en ny bakgrunnsmotor
Comment[nds]=Ümwanneln vun Nepomuk-Daten för en nieg Hülpprogramm fehlslaan
Comment[nl]=Het converteren van de Nepomuk-gegevens naar een nieuwe backend is mislukt
@@ -457,7 +457,7 @@
Comment[ko]=Nepomuk 데이터를 새 백엔드로 변환함
Comment[lt]=Sėkmingai konvertuoti Nepomuk duomenys į naują galinę sąsają
Comment[lv]=Nepomuk dati ir sekmīgi konvertēti uz jauno aizmuguri
-Comment[mr]=नेपोमुक डेटा नविन स्टोरेज बॅकएन्ड मध्ये यशस्वीपूर्वक रूपांतरित झाले
+Comment[mr]=नेपोमुक डेटा नवीन स्टोरेज बॅकएन्ड मध्ये यशस्वीपूर्वक रूपांतरित झाले
Comment[nb]=Nepomuk-data er vellykket omformet til en ny lagringsmotor
Comment[nds]=Nepomuk-Daten mit Spood för nieg Hülpprogramm ümwannelt
Comment[nl]=De Nepomuk-gegevens zijn succesvol geconverteerd naar de nieuwe backend
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/storage/resourceidentifier.cpp new/nepomuk-core-4.10.1/services/storage/resourceidentifier.cpp
--- old/nepomuk-core-4.10.0/services/storage/resourceidentifier.cpp 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/storage/resourceidentifier.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -125,12 +125,11 @@
//
QUrl nieUrl = res.nieUrl();
if( !nieUrl.isEmpty() ) {
- QString query = QString::fromLatin1("select ?r where { ?r %1 %2 . }")
- .arg( Soprano::Node::resourceToN3( NIE::url() ),
- Soprano::Node::resourceToN3( nieUrl ) );
- Soprano::QueryResultIterator it = m_model->executeQuery( query, Soprano::Query::QueryLanguageSparql );
+ QString query = QString::fromLatin1("select ?r where { ?r nie:url %1 . } LIMIT 1")
+ .arg( Soprano::Node::resourceToN3( nieUrl ) );
+ Soprano::QueryResultIterator it = m_model->executeQuery( query, Soprano::Query::QueryLanguageSparqlNoInference );
if( it.next() ) {
- const QUrl newUri = it["r"].uri();
+ const QUrl newUri = it[0].uri();
kDebug() << uri << " --> " << newUri;
manualIdentification( uri, newUri );
return true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/storage/syncresourceidentifier.cpp new/nepomuk-core-4.10.1/services/storage/syncresourceidentifier.cpp
--- old/nepomuk-core-4.10.0/services/storage/syncresourceidentifier.cpp 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/storage/syncresourceidentifier.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -79,9 +79,6 @@
void Nepomuk2::Sync::ResourceIdentifier::identifyAll()
{
- int totalSize = m_notIdentified.size();
- kDebug() << totalSize;
-
return identify( m_notIdentified.toList() );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/storage/test/CMakeLists.txt new/nepomuk-core-4.10.1/services/storage/test/CMakeLists.txt
--- old/nepomuk-core-4.10.0/services/storage/test/CMakeLists.txt 2013-01-23 22:44:46.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/storage/test/CMakeLists.txt 2013-03-01 07:26:55.000000000 +0100
@@ -63,6 +63,18 @@
datamanagementtestlib
)
+kde4_add_unit_test(datamanagementmodelbenchmark
+ datamanagementmodelbenchmark.cpp
+)
+
+target_link_libraries(datamanagementmodelbenchmark
+ ${QT_QTTEST_LIBRARY}
+ ${SOPRANO_LIBRARIES}
+ ${KDE4_KIO_LIBS}
+ ${KDE4_SOLID_LIBS}
+ nepomukcore
+ datamanagementtestlib
+)
kde4_add_unit_test(datamanagementadaptortest
datamanagementadaptortest.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/storage/test/datamanagementmodelbenchmark.cpp new/nepomuk-core-4.10.1/services/storage/test/datamanagementmodelbenchmark.cpp
--- old/nepomuk-core-4.10.0/services/storage/test/datamanagementmodelbenchmark.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/storage/test/datamanagementmodelbenchmark.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -0,0 +1,389 @@
+/*
+ *
+ * Copyright 2013 Vishesh Handa
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License or (at your option) version 3 or any later version
+ * accepted by the membership of KDE e.V. (or its successor approved
+ * by the membership of KDE e.V.), which shall act as a proxy
+ * defined in Section 14 of version 3 of the license.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
+ *
+ */
+
+#include "datamanagementmodelbenchmark.h"
+#include "../datamanagementmodel.h"
+#include "../classandpropertytree.h"
+#include "../virtuosoinferencemodel.h"
+#include "simpleresource.h"
+#include "simpleresourcegraph.h"
+
+#include <QtTest>
+#include "qtest_kde.h"
+#include "qtest_dms.h"
+
+#include
+#include
+#define USING_SOPRANO_NRLMODEL_UNSTABLE_API
+#include
+
+#include <KTemporaryFile>
+#include <KTempDir>
+#include <KProtocolInfo>
+#include <KDebug>
+
+#include "nfo.h"
+#include "nmm.h"
+#include "nco.h"
+#include "nie.h"
+#include "nmo.h"
+#include "resourcemanager.h"
+
+using namespace Soprano;
+using namespace Soprano::Vocabulary;
+using namespace Nepomuk2;
+using namespace Nepomuk2::Vocabulary;
+
+
+void DataManagementModelBenchmark::resetModel()
+{
+ // remove all the junk from previous tests
+ m_model->removeAllStatements();
+
+ // add some classes and properties
+ QUrl graph("graph:/onto");
+ Nepomuk2::insertOntologies( m_model, graph );
+
+ // rebuild the internals of the data management model
+ m_classAndPropertyTree->rebuildTree(m_dmModel);
+ m_inferenceModel->updateOntologyGraphs(true);
+ m_dmModel->clearCache();
+}
+
+void DataManagementModelBenchmark::initTestCase()
+{
+ const Soprano::Backend* backend = Soprano::PluginManager::instance()->discoverBackendByName( "virtuosobackend" );
+ QVERIFY( backend );
+ m_storageDir = new KTempDir();
+ m_model = backend->createModel( Soprano::BackendSettings() << Soprano::BackendSetting(Soprano::BackendOptionStorageDir, m_storageDir->name()) );
+ QVERIFY( m_model );
+
+ // DataManagementModel relies on the usage of a NRLModel in the storage service
+ m_nrlModel = new Soprano::NRLModel(m_model);
+ Nepomuk2::insertNamespaceAbbreviations( m_model );
+
+ m_classAndPropertyTree = new Nepomuk2::ClassAndPropertyTree(this);
+ m_inferenceModel = new Nepomuk2::VirtuosoInferenceModel(m_nrlModel);
+ m_dmModel = new Nepomuk2::DataManagementModel(m_classAndPropertyTree, m_inferenceModel);
+}
+
+
+void DataManagementModelBenchmark::cleanupTestCase()
+{
+ delete m_dmModel;
+ delete m_inferenceModel;
+ delete m_nrlModel;
+ delete m_model;
+ delete m_storageDir;
+ delete m_classAndPropertyTree;
+}
+
+void DataManagementModelBenchmark::init()
+{
+ resetModel();
+}
+
+void DataManagementModelBenchmark::addProperty()
+{
+ const QString resTemp("nepomuk:/res/");
+ int i = 0;
+
+ QBENCHMARK {
+ QUrl res( resTemp + QString::number(i) );
+ i++;
+
+ QList<QUrl> urlList;
+ urlList << res;
+
+
+ m_dmModel->addProperty( urlList, QUrl("prop:/string"), QVariantList() << "Boo1", QLatin1String("A") );
+ m_dmModel->addProperty( urlList, QUrl("prop:/string"), QVariantList() << "Boo2", QLatin1String("B") );
+ m_dmModel->addProperty( urlList, QUrl("prop:/string"), QVariantList() << "Boo3", QLatin1String("C") );
+ m_dmModel->addProperty( urlList, QUrl("prop:/string"), QVariantList() << "Boo4", QLatin1String("D") );
+ }
+}
+
+void DataManagementModelBenchmark::addProperty_sameData()
+{
+ const QString resTemp("nepomuk:/res/");
+ int i = 0;
+
+ QBENCHMARK {
+ QUrl res( resTemp + QString::number(i) );
+ i++;
+
+ QList<QUrl> urlList;
+ urlList << res;
+
+
+ m_dmModel->addProperty( urlList, QUrl("prop:/string"), QVariantList() << "Boo", QLatin1String("A") );
+ m_dmModel->addProperty( urlList, QUrl("prop:/string"), QVariantList() << "Boo", QLatin1String("B") );
+ m_dmModel->addProperty( urlList, QUrl("prop:/string"), QVariantList() << "Boo", QLatin1String("C") );
+ m_dmModel->addProperty( urlList, QUrl("prop:/string"), QVariantList() << "Boo", QLatin1String("D") );
+ }
+}
+
+void DataManagementModelBenchmark::setProperty()
+{
+ const QString resTemp("nepomuk:/res/");
+ int i = 0;
+
+ QBENCHMARK {
+ QUrl res( resTemp + QString::number(i) );
+ i++;
+
+ QList<QUrl> urlList;
+ urlList << res;
+
+
+ m_dmModel->setProperty( urlList, QUrl("prop:/string"), QVariantList() << "Boo1", QLatin1String("A") );
+ m_dmModel->setProperty( urlList, QUrl("prop:/string"), QVariantList() << "Boo2", QLatin1String("B") );
+ m_dmModel->setProperty( urlList, QUrl("prop:/string"), QVariantList() << "Boo3", QLatin1String("C") );
+ m_dmModel->setProperty( urlList, QUrl("prop:/string"), QVariantList() << "Boo4", QLatin1String("D") );
+ }
+}
+
+void DataManagementModelBenchmark::setProperty_sameData()
+{
+ const QString resTemp("nepomuk:/res/");
+ int i = 0;
+
+ QBENCHMARK {
+ QUrl res( resTemp + QString::number(i) );
+ i++;
+
+ QList<QUrl> urlList;
+ urlList << res;
+
+ QVariantList vl;
+ vl << "Boo1";
+
+ m_dmModel->setProperty( urlList, QUrl("prop:/string"), vl, QLatin1String("A") );
+
+ vl << "Boo2";
+ m_dmModel->setProperty( urlList, QUrl("prop:/string"), vl, QLatin1String("B") );
+
+ vl << "Boo3";
+ m_dmModel->setProperty( urlList, QUrl("prop:/string"), vl, QLatin1String("C") );
+
+ vl << "Boo4";
+ m_dmModel->setProperty( urlList, QUrl("prop:/string"), vl, QLatin1String("D") );
+ }
+}
+
+void DataManagementModelBenchmark::storeResources()
+{
+ SimpleResource res;
+ res.addType( NCO::Contact() );
+ res.addProperty( NCO::fullname(), QLatin1String("Boo") );
+ res.addProperty( QUrl("prop:/string"), QLatin1String("Goo") );
+ res.addProperty( QUrl("prop:/string"), QLatin1String("lho") );
+ res.addProperty( QUrl("prop:/int"), 42 );
+ res.addProperty( QUrl("prop:/int2"), 42 );
+ res.addProperty( QUrl("prop:/int3"), 42 );
+ res.addProperty( QUrl("prop:/date"), QDateTime::currentDateTime() );
+
+ QBENCHMARK {
+ QUrl uri = m_dmModel->createResource( QList<QUrl>(), QString(), QString(), "A" );
+ res.setUri( uri );
+
+ SimpleResourceGraph graph;
+ graph << res;
+
+ m_dmModel->storeResources( graph, "A" );
+ }
+}
+
+namespace {
+ SimpleResource createHeader(const QString& name, const QString &value, SimpleResourceGraph& graph) {
+ SimpleResource res;
+ res.addType( NMO::MessageHeader() );
+ res.addProperty( NMO::headerName(), name );
+ res.addProperty( NMO::headerValue(), value );
+
+ graph << res;
+ return res;
+ }
+
+ QUrl createContact(const QString& name, const QString& email, SimpleResourceGraph& graph) {
+ SimpleResource emRes;
+ emRes.addType( NCO::EmailAddress() );
+ emRes.addProperty( NCO::emailAddress(), email );
+
+ SimpleResource res;
+ res.addType( NCO::Contact() );
+ res.addProperty( NCO::fullname(), name );
+ res.addProperty( NCO::hasEmailAddress(), emRes );
+
+ graph << emRes << res;
+ return res.uri();
+ }
+
+ QUrl createIcon(const QString& iconName, SimpleResourceGraph& graph) {
+ SimpleResource iconRes;
+ iconRes.addType( NAO::FreeDesktopIcon() );
+ iconRes.addProperty( NAO::iconName(), iconName );
+
+ graph << iconRes;
+ return iconRes.uri();
+ }
+
+ QUrl createTag(const QString& identifier, const QString& label, SimpleResourceGraph& graph) {
+ SimpleResource tagRes;
+ tagRes.addType( NAO::Tag() );
+ tagRes.addProperty( NAO::identifier(), identifier );
+ tagRes.addProperty( NAO::prefLabel(), label );
+
+ graph << tagRes;
+ return tagRes.uri();
+ }
+}
+
+void DataManagementModelBenchmark::storeResources_email()
+{
+ SimpleResourceGraph graph;
+
+ SimpleResource res;
+ res.addType( NMO::Email() );
+ res.setProperty( NIE::byteSize(), 10 );
+ res.setProperty( NMO::isRead(), QVariant(true) );
+ res.setProperty( NMO::plainTextMessageContent(), QLatin1String("This is a test email") );
+ res.setProperty( NAO::prefLabel(), QLatin1String("Email Subject") );
+ res.setProperty( NMO::sentDate(), QDateTime::currentDateTime() );
+ res.setProperty( NMO::messageId(), QLatin1String("message-id") );
+
+ QStringList headers;
+ headers << "List-Id" << "X-Loop" << "X-MailingList" << "X-Spam-Flag" << "Organization";
+
+ foreach(const QString& head, headers) {
+ SimpleResource headRes = createHeader( head, "Don't care about the value", graph );
+ res.addProperty( NMO::messageHeader(), headRes );
+ }
+
+ // Contacts
+ res.addProperty( NMO::from(), createContact("FromCon", "from@contact.org", graph ) );
+ res.addProperty( NMO::to(), createContact("ToCon", "to@contact.org", graph ) );
+ res.addProperty( NMO::bcc(), createContact("BccCon", "bcc@contact.org", graph ) );
+ res.addProperty( NMO::cc(), createContact("ccCon", "cc@contact.org", graph ) );
+
+ res.addProperty( NAO::prefSymbol(), createIcon("internet-mail", graph ) );
+
+ res.addProperty( NAO::hasTag(), createTag( "mail-mark-important", "Important", graph ) );
+ res.addProperty( NAO::hasTag(), createTag( "mail-mark-task", "TODO", graph ) );
+ res.addProperty( NAO::hasTag(), createTag( "mail-mark-junk", "SPAM", graph ) );
+
+ graph << res;
+
+ QBENCHMARK {
+ m_dmModel->storeResources( graph, "TestApp", Nepomuk2::IdentifyNone, Nepomuk2::NoStoreResourcesFlags );
+ }
+}
+
+void DataManagementModelBenchmark::createResource()
+{
+ QList<QUrl> types;
+ types << NCO::Contact();
+
+ QBENCHMARK {
+ m_dmModel->createResource( types, QString(), QString(), QString("app") );
+ }
+}
+
+void DataManagementModelBenchmark::removeResources()
+{
+ QList<QUrl> types;
+ types << NCO::Contact();
+
+ QBENCHMARK {
+ QUrl uri = m_dmModel->createResource( types, QString(), QString(), QString("app") );
+ m_dmModel->removeResources( QList<QUrl>() << uri, NoRemovalFlags, QLatin1String("app") );
+ }
+}
+
+void DataManagementModelBenchmark::removeDataByApplication()
+{
+ SimpleResource temp;
+ temp.addType( NCO::PersonContact() );
+ temp.addProperty( NCO::fullname(), QLatin1String("Peter Parker") );
+
+ SimpleResourceGraph graph;
+ for( int i=0; i<10; i++ ) {
+ SimpleResource res;
+ QUrl uri = res.uri();
+ res = temp;
+ res.setUri( uri );
+
+ graph << res;
+ }
+
+ QBENCHMARK {
+ QHash mappings = m_dmModel->storeResources( graph, "app", Nepomuk2::IdentifyNone );
+ m_dmModel->removeDataByApplication( mappings.values(), NoRemovalFlags, QLatin1String("app") );
+ }
+}
+
+void DataManagementModelBenchmark::removeDataByApplication_subResources()
+{
+ SimpleResource temp;
+ temp.addType( NCO::PersonContact() );
+ temp.addProperty( NCO::fullname(), QLatin1String("Peter Parker") );
+
+ SimpleResourceGraph graph;
+ for( int i=0; i<10; i++ ) {
+ SimpleResource res;
+ QUrl uri = res.uri();
+ res = temp;
+ res.setUri( uri );
+
+ graph << res;
+ }
+
+ QBENCHMARK {
+ QHash mappings = m_dmModel->storeResources( graph, "app", Nepomuk2::IdentifyNone );
+ m_dmModel->removeDataByApplication( mappings.values(), RemoveSubResoures, QLatin1String("app") );
+ }
+}
+
+void DataManagementModelBenchmark::removeAllDataByApplication()
+{
+ SimpleResource temp;
+ temp.addType( NCO::PersonContact() );
+ temp.addProperty( NCO::fullname(), QLatin1String("Peter Parker") );
+
+ SimpleResourceGraph graph;
+ for( int i=0; i<10; i++ ) {
+ SimpleResource res;
+ QUrl uri = res.uri();
+ res = temp;
+ res.setUri( uri );
+
+ graph << res;
+ }
+
+ QBENCHMARK {
+ m_dmModel->storeResources( graph, "app", Nepomuk2::IdentifyNone );
+ m_dmModel->removeDataByApplication( NoRemovalFlags, QLatin1String("app") );
+ }
+}
+
+
+QTEST_KDEMAIN_CORE(DataManagementModelBenchmark)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/storage/test/datamanagementmodelbenchmark.h new/nepomuk-core-4.10.1/services/storage/test/datamanagementmodelbenchmark.h
--- old/nepomuk-core-4.10.0/services/storage/test/datamanagementmodelbenchmark.h 1970-01-01 01:00:00.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/storage/test/datamanagementmodelbenchmark.h 2013-03-01 07:26:55.000000000 +0100
@@ -0,0 +1,74 @@
+/*
+ *
+ * Copyright 2013 Vishesh Handa
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License or (at your option) version 3 or any later version
+ * accepted by the membership of KDE e.V. (or its successor approved
+ * by the membership of KDE e.V.), which shall act as a proxy
+ * defined in Section 14 of version 3 of the license.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
+ *
+ */
+
+#ifndef DATAMANAGEMENTMODELBENCHMARK_H
+#define DATAMANAGEMENTMODELBENCHMARK_H
+
+#include
+
+namespace Soprano {
+class Model;
+class NRLModel;
+}
+namespace Nepomuk2 {
+class DataManagementModel;
+class ClassAndPropertyTree;
+class VirtuosoInferenceModel;
+}
+class KTempDir;
+
+class DataManagementModelBenchmark : public QObject
+{
+ Q_OBJECT
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+
+ void addProperty();
+ void addProperty_sameData();
+
+ void setProperty();
+ void setProperty_sameData();
+
+ void storeResources();
+ void storeResources_email();
+
+ void createResource();
+ void removeResources();
+
+ void removeDataByApplication();
+ void removeDataByApplication_subResources();
+
+ void removeAllDataByApplication();
+private:
+ void resetModel();
+
+ KTempDir* m_storageDir;
+ Soprano::Model* m_model;
+ Soprano::NRLModel* m_nrlModel;
+ Nepomuk2::VirtuosoInferenceModel* m_inferenceModel;
+ Nepomuk2::ClassAndPropertyTree* m_classAndPropertyTree;
+ Nepomuk2::DataManagementModel* m_dmModel;
+};
+
+#endif // DATAMANAGEMENTMODELBENCHMARK_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nepomuk-core-4.10.0/services/storage/test/qtest_dms.cpp new/nepomuk-core-4.10.1/services/storage/test/qtest_dms.cpp
--- old/nepomuk-core-4.10.0/services/storage/test/qtest_dms.cpp 2013-01-23 22:44:47.000000000 +0100
+++ new/nepomuk-core-4.10.1/services/storage/test/qtest_dms.cpp 2013-03-01 07:26:55.000000000 +0100
@@ -32,6 +32,7 @@
#include "nco.h"
#include "nie.h"
#include "pimo.h"
+#include "nmo.h"
#include
#include
@@ -41,6 +42,22 @@
using namespace Nepomuk2::Vocabulary;
using namespace Nepomuk2;
+namespace {
+ void addProperty(Soprano::Model* model, const QUrl& graph, const QUrl& prop, const Node& dom, const Node& ran) {
+ model->addStatement( prop, RDF::type(), RDF::Property(), graph );
+ model->addStatement( prop, RDFS::domain(), dom, graph );
+ model->addStatement( prop, RDFS::range(), ran, graph );
+ }
+
+ void addType(Soprano::Model* model, const QUrl& graph, const QUrl& type, const QList<QUrl>& superTypes) {
+ model->addStatement( type, RDF::type(), RDFS::Class(), graph );
+
+ foreach(const QUrl& super, superTypes) {
+ model->addStatement( type, RDFS::subClassOf(), super, graph );
+ model->addStatement( super, RDF::type(), RDFS::Class(), graph );
+ }
+ }
+}
void Nepomuk2::insertOntologies(Soprano::Model* model, const QUrl& graph)
{
model->addStatement( graph, RDF::type(), NRL::Ontology(), graph );
@@ -261,6 +278,34 @@
model->addStatement( NAO::maintainedBy(), RDF::type(), RDF::Property(), graph );
model->addStatement( NAO::maintainedBy(), RDFS::range(), RDFS::Resource(), graph );
model->addStatement( NAO::maintainedBy(), RDFS::domain(), NAO::Agent(), graph );
+
+ // Email stuff
+ addType( model, graph, NMO::MessageHeader(), QList<QUrl>() << RDFS::Resource() );
+ addProperty( model, graph, NMO::messageHeader(), NMO::Message(), NMO::MessageHeader() );
+ addProperty( model, graph, NMO::headerName(), NMO::MessageHeader(), XMLSchema::string() );
+ addProperty( model, graph, NMO::headerValue(), NMO::MessageHeader(), XMLSchema::string() );
+
+ addType( model, graph, NMO::Message(), QList<QUrl>() << NIE::InformationElement() );
+ addType( model, graph, NMO::Email(), QList<QUrl>() << NMO::Message() );
+ addProperty( model, graph, NMO::to(), NMO::Email(), NCO::Contact() );
+ addProperty( model, graph, NMO::from(), NMO::Email(), NCO::Contact() );
+ addProperty( model, graph, NMO::cc(), NMO::Email(), NCO::Contact() );
+ addProperty( model, graph, NMO::bcc(), NMO::Email(), NCO::Contact() );
+ addProperty( model, graph, NMO::isRead(), NMO::Email(), XMLSchema::boolean() );
+ addProperty( model, graph, NMO::plainTextMessageContent(), NMO::Email(), XMLSchema::string() );
+ addProperty( model, graph, NMO::messageId(), NMO::Email(), XMLSchema::string() );
+ addProperty( model, graph, NMO::sentDate(), NMO::Message(), XMLSchema::dateTime() );
+ addProperty( model, graph, NIE::byteSize(), NIE::InformationElement(), XMLSchema::integer() );
+
+ addType( model, graph, NCO::EmailAddress(), QList<QUrl>() << RDFS::Resource() );
+ addProperty( model, graph, NCO::hasEmailAddress(), NCO::Contact(), NCO::EmailAddress() );
+ addProperty( model, graph, NCO::emailAddress(), NCO::EmailAddress(), XMLSchema::string() );
+
+ // Icons
+ addType( model, graph, NAO::Symbol(), QList<QUrl>() << RDFS::Resource() );
+ addType( model, graph, NAO::FreeDesktopIcon(), QList<QUrl>() << NAO::Symbol() );
+ addProperty( model, graph, NAO::iconName(), NAO::FreeDesktopIcon(), XMLSchema::string() );
+ addProperty( model, graph, NAO::prefSymbol(), RDFS::Resource(), NAO::FreeDesktopIcon() );
}
void Nepomuk2::insertNamespaceAbbreviations(Model* model)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org