Hello community,

here is the log from the commit of package akonadi-runtime for openSUSE:Factory
checked in at Mon Mar 14 16:52:37 CET 2011.



--------
--- KDE/akonadi-runtime/akonadi-runtime.changes 2011-02-17 15:09:26.000000000 
+0100
+++ /mounts/work_src_done/STABLE/akonadi-runtime/akonadi-runtime.changes        
2011-03-14 16:00:14.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Mar 14 14:59:17 UTC 2011 - [email protected]
+
+- add fix for the nepomuk query api, backport from akonadi 1.5, 
+  commit be3b9db9 
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
  fix_nepo_search.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ akonadi-runtime.spec ++++++
--- /var/tmp/diff_new_pack.5dC9X5/_old  2011-03-14 16:52:10.000000000 +0100
+++ /var/tmp/diff_new_pack.5dC9X5/_new  2011-03-14 16:52:10.000000000 +0100
@@ -22,7 +22,7 @@
 BuildRequires:  automoc4 boost-devel libsoprano-devel libxslt mysql 
shared-mime-info
 BuildRequires:  fdupes
 Version:        1.5.0
-Release:        5
+Release:        6
 %define rversion %version
 License:        LGPLv2.1+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -32,6 +32,7 @@
 # http://download.akonadi-project.org
 Source0:        akonadi-%rversion.tar.bz2
 Patch0:         1_5_BRANCH.diff
+Patch1:         fix_nepo_search.diff
 Requires:       libqt4 >= %(rpm -q --queryformat '%{VERSION}' libqt4)
 Requires(post):    shared-mime-info
 Requires(postun):  shared-mime-info
@@ -93,6 +94,7 @@
 %prep
 %setup -q -n akonadi-%rversion
 #%patch0
+%patch1 -p1
 
 %build
   %cmake_kde4 -d build -- -DCONFIG_INSTALL_DIR=/etc

++++++ fix_nepo_search.diff ++++++
diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt
index da8e912..9044e29 100644
--- a/server/CMakeLists.txt
+++ b/server/CMakeLists.txt
@@ -139,7 +139,7 @@ if (Soprano_FOUND)
     src/nepomuk/result.cpp
   )
 
-  set_source_files_properties(src/nepomuk/org.kde.nepomuk.QueryService.xml 
PROPERTIES INCLUDE "querymetatype.h")
+  set_source_files_properties(src/nepomuk/org.kde.nepomuk.QueryService.xml 
PROPERTIES INCLUDE "dbusoperators.h")
   set_source_files_properties(src/nepomuk/org.kde.nepomuk.Query.xml PROPERTIES 
INCLUDE "result.h")
 
   qt4_add_dbus_interface(libakonadiprivate_SRCS 
src/nepomuk/org.kde.nepomuk.QueryService.xml queryserviceinterface)
diff --git a/server/src/nepomuk/dbusoperators.cpp 
b/server/src/nepomuk/dbusoperators.cpp
index 7ad6a13..c125805 100644
--- a/server/src/nepomuk/dbusoperators.cpp
+++ b/server/src/nepomuk/dbusoperators.cpp
@@ -19,16 +19,12 @@
 */
 
 #include "dbusoperators.h"
-#include "querymetatype.h"
-
-#include <soprano/version.h>
 
 #include <QtDBus/QDBusMetaType>
 
-Q_DECLARE_METATYPE(Nepomuk::Query::Result)
-Q_DECLARE_METATYPE(Soprano::Node)
-Q_DECLARE_METATYPE(QList<int>)
-Q_DECLARE_METATYPE(QList<Nepomuk::Query::Result>)
+#include <Soprano/Node>
+#include <Soprano/BindingSet>
+
 
 void Nepomuk::Query::registerDBusTypes()
 {
@@ -38,10 +34,11 @@ void Nepomuk::Query::registerDBusTypes()
     qDBusRegisterMetaType<RequestPropertyMapDBus>();
 }
 
+
 QDBusArgument& operator<<( QDBusArgument& arg, const Nepomuk::Query::Result& 
result )
 {
     //
-    // Signature: (sda{s(isss)}s)
+    // Signature: (sda{s(isss)}a{s(isss)}s)
     //
 
     arg.beginStructure();
@@ -49,19 +46,28 @@ QDBusArgument& operator<<( QDBusArgument& arg, const 
Nepomuk::Query::Result& res
     // resource URI and score
     arg << QString::fromAscii( result.resourceUri().toEncoded() ) << 
result.score();
 
-    arg.beginMap( QVariant::String, qMetaTypeId<Soprano::Node>() );
-
     // request properties
+    arg.beginMap( QVariant::String, qMetaTypeId<Soprano::Node>() );
     QHash<QUrl, Soprano::Node> rp = result.requestProperties();
     for ( QHash<QUrl, Soprano::Node>::const_iterator it = rp.constBegin(); it 
!= rp.constEnd(); ++it ) {
         arg.beginMapEntry();
         arg << QString::fromAscii( it.key().toEncoded() ) << it.value();
         arg.endMapEntry();
     }
+    arg.endMap();
 
+    // additional bindings
+    arg.beginMap( QVariant::String, qMetaTypeId<Soprano::Node>() );
+    const Soprano::BindingSet additionalBindings; // = 
result.additionalBindings();
+    foreach( const QString& binding, additionalBindings.bindingNames() ) {
+        arg.beginMapEntry();
+        arg << binding << additionalBindings[binding];
+        arg.endMapEntry();
+    }
     arg.endMap();
 
-    arg << QString(); // excerpt
+    // full text search excerpt
+    arg << QString();//<< result.excerpt();
 
     arg.endStructure();
 
@@ -72,7 +78,7 @@ QDBusArgument& operator<<( QDBusArgument& arg, const 
Nepomuk::Query::Result& res
 const QDBusArgument& operator>>( const QDBusArgument& arg, 
Nepomuk::Query::Result& result )
 {
     //
-    // Signature: (sda{s(isss)})
+    // Signature: (sda{s(isss)}s)
     //
 
     arg.beginStructure();
@@ -89,16 +95,30 @@ const QDBusArgument& operator>>( const QDBusArgument& arg, 
Nepomuk::Query::Resul
         arg.beginMapEntry();
         arg >> rs >> node;
         arg.endMapEntry();
-        if( !rs.startsWith(QLatin1String("|")) )
-            result.addRequestProperty( QUrl::fromEncoded( rs.toAscii() ), node 
);
+        result.addRequestProperty( QUrl::fromEncoded( rs.toAscii() ), node );
+    }
+    arg.endMap();
+
+    Soprano::BindingSet additionalBindings;
+    arg.beginMap();
+    while ( !arg.atEnd() ) {
+        QString binding;
+        Soprano::Node node;
+        arg.beginMapEntry();
+        arg >> binding >> node;
+        arg.endMapEntry();
+        additionalBindings.insert( binding, node );
     }
     arg.endMap();
 
     QString excerpt;
     arg >> excerpt;
+//    result.setExcerpt( excerpt );
 
     arg.endStructure();
 
+//   result.setAdditionalBindings( additionalBindings );
+
     return arg;
 }
 
@@ -129,14 +149,10 @@ const QDBusArgument& operator>>( const QDBusArgument& 
arg, Soprano::Node& node )
     QString value, language, dataTypeUri;
     arg >> type >> value >> language >> dataTypeUri;
     if ( type == Soprano::Node::LiteralNode ) {
-#if SOPRANO_IS_VERSION( 2, 3, 0 )
         if ( dataTypeUri.isEmpty() )
             node = Soprano::Node( Soprano::LiteralValue::createPlainLiteral( 
value, language ) );
         else
             node = Soprano::Node( Soprano::LiteralValue::fromString( value, 
QUrl::fromEncoded( dataTypeUri.toAscii() ) ) );
-#else
-        node = Soprano::Node( Soprano::LiteralValue::fromString( value, 
dataTypeUri ), language );
-#endif
     }
     else if ( type == Soprano::Node::ResourceNode ) {
         node = Soprano::Node( QUrl::fromEncoded( value.toAscii() ) );
diff --git a/server/src/nepomuk/dbusoperators.h 
b/server/src/nepomuk/dbusoperators.h
index b665c22..a3bec79 100644
--- a/server/src/nepomuk/dbusoperators.h
+++ b/server/src/nepomuk/dbusoperators.h
@@ -1,19 +1,21 @@
 /*
-   Copyright (c) 2008 Sebastian Trueg <[email protected]>
+   Copyright (c) 2008-2009 Sebastian Trueg <[email protected]>
 
    This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License version 2 as published by the Free Software Foundation.
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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 6 of version 3 of the license.
 
    This library 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
-   Library General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library.  If not, see 
<http://www.gnu.org/licenses/>.
 */
 
 #ifndef _NEPOMUK_SEARCH_DBUS_OPERATORS_H_
@@ -22,17 +24,30 @@
 #include <QtDBus/QDBusArgument>
 
 #include "result.h"
+#include "nepomukquery_export.h"
+
+Q_DECLARE_METATYPE(Nepomuk::Query::Result)
+Q_DECLARE_METATYPE(Soprano::Node)
+Q_DECLARE_METATYPE(QList<Nepomuk::Query::Result>)
+typedef QHash<QString, QString> RequestPropertyMapDBus;
+Q_DECLARE_METATYPE( RequestPropertyMapDBus )
 
 namespace Nepomuk {
     namespace Query {
-        void registerDBusTypes();
+        /**
+         * Register the DBus types necessary for communication with the Nepomuk
+         * query service. This method is only made public for the query service
+         * itself which links to this library, too.
+         */
+        NEPOMUKQUERY_EXPORT void registerDBusTypes();
     }
 }
 
-QDBusArgument& operator<<( QDBusArgument& arg, const Soprano::Node& );
-const QDBusArgument& operator>>( const QDBusArgument& arg, Soprano::Node& );
+// We export the non-public operators so that we do not need duplicated code 
in kdebase
+NEPOMUKQUERY_EXPORT QDBusArgument& operator<<( QDBusArgument& arg, const 
Soprano::Node& );
+NEPOMUKQUERY_EXPORT const QDBusArgument& operator>>( const QDBusArgument& arg, 
Soprano::Node& );
 
-QDBusArgument& operator<<( QDBusArgument& arg, const Nepomuk::Query::Result& );
-const QDBusArgument& operator>>( const QDBusArgument& arg, 
Nepomuk::Query::Result& );
+NEPOMUKQUERY_EXPORT QDBusArgument& operator<<( QDBusArgument& arg, const 
Nepomuk::Query::Result& );
+NEPOMUKQUERY_EXPORT const QDBusArgument& operator>>( const QDBusArgument& arg, 
Nepomuk::Query::Result& );
 
 #endif
diff --git a/server/src/nepomuk/nepomukquery_export.h 
b/server/src/nepomuk/nepomukquery_export.h
new file mode 100644
index 0000000..79ec2cf
--- /dev/null
+++ b/server/src/nepomuk/nepomukquery_export.h
@@ -0,0 +1,8 @@
+#ifndef NEPOMUKQUERY_EXPORT_H
+#define NEPOMUKQUERY_EXPORT_H
+
+#ifndef NEPOMUKQUERY_EXPORT
+#define NEPOMUKQUERY_EXPORT
+#endif
+
+#endif
diff --git a/server/src/nepomuk/org.kde.nepomuk.Query.xml 
b/server/src/nepomuk/org.kde.nepomuk.Query.xml
index 9f1834b..96e131a 100644
--- a/server/src/nepomuk/org.kde.nepomuk.Query.xml
+++ b/server/src/nepomuk/org.kde.nepomuk.Query.xml
@@ -12,7 +12,7 @@
       <arg type="s" direction="out" />
     </method>
     <signal name="newEntries">
-      <arg name="entries" type="a(sda{s(isss)})" />
+      <arg name="entries" type="a(sda{s(isss)}s)" />
       <annotation name="com.trolltech.QtDBus.QtTypeName.In0" 
value="QList&lt;Nepomuk::Query::Result&gt;" />
     </signal>
     <signal name="entriesRemoved">
@@ -21,9 +21,6 @@
     <signal name="resultCount">
       <arg name="count" type="i" />
     </signal>
-    <signal name="totalResultCount">
-      <arg name="count" type="i" />
-    </signal>
     <signal name="finishedListing" />
   </interface>
 </node>
diff --git a/server/src/nepomuk/querymetatype.h 
b/server/src/nepomuk/querymetatype.h
deleted file mode 100644
index 3d48e51..0000000
--- a/server/src/nepomuk/querymetatype.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-   Copyright (C) 2008-2009 by Sebastian Trueg <trueg at kde.org>
-
-   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, or (at your option)
-   any later version.
-
-   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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
USA.
- */
-
-/*
- * This file looks very weird but is the only way to get the Query metatype
- * into the service interface when generated via qdbusxml2cpp.
- */
-
-#ifndef _NEPOMUK_QUERY_META_TYPE_H_
-#define _NEPOMUK_QUERY_META_TYPE_H_
-
-typedef QHash<QString, QString> RequestPropertyMapDBus;
-Q_DECLARE_METATYPE( RequestPropertyMapDBus )
-
-#endif

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to