packages: kde4-kdepimlibs/kde4-kdepimlibs-branch.diff, kde4-kdepimlibs/kde4...
arekm
arekm at pld-linux.org
Wed Jan 26 21:30:26 CET 2011
Author: arekm Date: Wed Jan 26 20:30:26 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- rel 2; branch diff updated (fix for some imap4 segfaults on recent glibc)
---- Files affected:
packages/kde4-kdepimlibs:
kde4-kdepimlibs-branch.diff (1.24 -> 1.25) , kde4-kdepimlibs.spec (1.131 -> 1.132)
---- Diffs:
================================================================
Index: packages/kde4-kdepimlibs/kde4-kdepimlibs-branch.diff
diff -u packages/kde4-kdepimlibs/kde4-kdepimlibs-branch.diff:1.24 packages/kde4-kdepimlibs/kde4-kdepimlibs-branch.diff:1.25
--- packages/kde4-kdepimlibs/kde4-kdepimlibs-branch.diff:1.24 Thu Oct 21 17:20:13 2010
+++ packages/kde4-kdepimlibs/kde4-kdepimlibs-branch.diff Wed Jan 26 21:30:21 2011
@@ -1,962 +1,28 @@
-Index: kmime/kmime_content.h
+Index: kioslave/imap4/imap4.cpp
===================================================================
---- kmime/kmime_content.h (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ kmime/kmime_content.h (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -770,8 +770,7 @@
-
- template <typename T> T *Content::header( bool create )
- {
-- T dummy;
-- Headers::Base *h = headerByType( dummy.type() );
-+ Headers::Base *h = headerByType( T::staticType() );
- if( h ) {
- // Make sure the header is actually of the right type.
- Q_ASSERT( dynamic_cast<T*>( h ) );
-Index: kmime/kmime_parsers.cpp
-===================================================================
---- kmime/kmime_parsers.cpp (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ kmime/kmime_parsers.cpp (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -22,7 +22,6 @@
- */
- #include "kmime_parsers.h"
-
--#include <QtCore/QRegExp>
- #include <QtCore/QByteArray>
-
- using namespace KMime::Parser;
-@@ -164,7 +163,7 @@
- //==============================================================================
-
- UUEncoded::UUEncoded( const QByteArray &src, const QByteArray &subject ) :
-- NonMimeParser( src ), s_ubject( subject )
-+ NonMimeParser( src ), s_ubject( subject ), m_beginRegExp( "begin [0-9][0-9][0-9]" ), m_numberRegExp( "[0-9]+/[0-9]+" )
- {}
-
- bool UUEncoded::parse()
-@@ -178,7 +177,7 @@
- QByteArray tmp, fileName;
-
- if ( ( beginPos = QString( s_rc ).
-- indexOf( QRegExp( "begin [0-9][0-9][0-9]" ), currentPos ) ) > -1 &&
-+ indexOf( m_beginRegExp, currentPos ) ) > -1 &&
- ( beginPos == 0 || s_rc.at( beginPos - 1 ) == '\n') ) {
- containsBegin = true;
- uuStart = s_rc.indexOf( '\n', beginPos );
-@@ -223,9 +222,8 @@
-
- if ( ( !containsBegin || !containsEnd ) && !s_ubject.isNull() ) {
- // message may be split up => parse subject
-- QRegExp rx("[0-9]+/[0-9]+");
-- pos = rx.indexIn( QString( s_ubject ), 0 );
-- len = rx.matchedLength();
-+ pos = m_numberRegExp.indexIn( QString( s_ubject ), 0 );
-+ len = m_numberRegExp.matchedLength();
- if ( pos != -1 ) {
- tmp = s_ubject.mid( pos, len );
- pos = tmp.indexOf( '/' );
-Index: kmime/kmime_message.cpp
-===================================================================
---- kmime/kmime_message.cpp (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ kmime/kmime_message.cpp (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -103,8 +103,9 @@
- KMime::Content *c = this;
- while ( c ) {
- // not a multipart message
-- if ( !c->contentType()->isMultipart() ) {
-- if ( c->contentType()->mimeType() == type || type.isEmpty() ) {
-+ const KMime::Headers::ContentType * const contentType = c->contentType();
-+ if ( !contentType->isMultipart() ) {
-+ if ( contentType->mimeType() == type || type.isEmpty() ) {
- return c;
- }
- return 0;
-@@ -116,7 +117,7 @@
- }
-
- // multipart/alternative
-- if ( c->contentType()->subType() == "alternative" ) {
-+ if ( contentType->subType() == "alternative" ) {
- if ( type.isEmpty() ) {
- return c->contents().first();
- }
-Index: kmime/kmime_headers.h
-===================================================================
---- kmime/kmime_headers.h (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ kmime/kmime_headers.h (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -109,7 +109,8 @@
-
- #define kmime_mk_trivial_ctor_with_name( subclass ) \
- kmime_mk_trivial_ctor( subclass ) \
-- const char *type() const;
-+ const char *type() const; \
-+ static const char *staticType();
- //@endcond
-
- //
-Index: kmime/kmime_parsers.h
-===================================================================
---- kmime/kmime_parsers.h (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ kmime/kmime_parsers.h (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -23,8 +23,9 @@
- #ifndef __KMIME_PARSERS__
- #define __KMIME_PARSERS__
-
--#include<QByteArray>
--#include<QList>
-+#include<QtCore/QByteArray>
-+#include<QtCore/QList>
-+#include<QtCore/QRegExp>
-
- namespace KMime {
-
-@@ -103,6 +104,10 @@
-
- protected:
- QByteArray s_ubject;
-+
-+ private:
-+ QRegExp m_beginRegExp;
-+ QRegExp m_numberRegExp;
- };
-
- /** Helper-class: tries to extract the data from a possibly
-Index: kmime/kmime_headers.cpp
-===================================================================
---- kmime/kmime_headers.cpp (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ kmime/kmime_headers.cpp (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -124,12 +124,14 @@
- \
- const char *subclass::type() const \
- { \
-- return #name; \
--}
-+ return staticType(); \
-+} \
-+const char *subclass::staticType() { return #name; }
-
- #define kmime_mk_trivial_ctor_with_name_and_dptr( subclass, baseclass, name ) \
- kmime_mk_trivial_ctor_with_dptr( subclass, baseclass ) \
--const char *subclass::type() const { return #name; }
-+const char *subclass::type() const { return staticType(); } \
-+const char *subclass::staticType() { return #name; }
-
- #define kmime_mk_dptr_ctor( subclass, baseclass ) \
- subclass::subclass( subclass##Private *d, KMime::Content *parent ) : baseclass( d, parent ) {}
-@@ -1715,7 +1717,13 @@
-
- QByteArray ContentType::mimeType() const
- {
-- return d_func()->mimeType + '/' + d_func()->mimeSubType;
-+ Q_D(const ContentType);
-+ QByteArray mt;
-+ mt.reserve( d->mimeType.size() + d->mimeSubType.size() + 1 );
-+ mt.append( d->mimeType );
-+ mt.append( '/' );
-+ mt.append( d->mimeSubType );
-+ return mt;
- }
-
- QByteArray ContentType::mediaType() const
-Index: kcal/localdir.desktop
-===================================================================
---- kcal/localdir.desktop (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ kcal/localdir.desktop (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -57,7 +57,7 @@
- Comment[es]=Provee acceso a elementos de un calendario, cada uno almacenado en un archivo diferente, dentro de un directorio determinado
- Comment[et]=Võimaldab kasutada eraldi failidesse salvestatud kalendrielemente määratud kataloogis
- Comment[fi]=Tarjoaa pääsyn annetun kansion erillisiin tiedostoihin tallennettuihin kalenteritietueisiin
--Comment[fr]=Fourni l'accès à des entrées d'agenda, chaque élément étant représenté par un fichier dans le dossier indiqué
-+Comment[fr]=Fournit l'accès à des entrées d'agenda, chaque élément étant représenté par un fichier dans le dossier indiqué
- Comment[ga]=Soláthraíonn sé seo rochtain ar mhíreanna féilire, gach ceann stóráilte i gcomhad aonair, i gcomhadlann sonraithe
- Comment[gl]=Dá acceso aos obxectos do calendario, cada un gardado nun ficheiro nun cartafol dado
- Comment[hu]=Helyi mappában tárolt naptérbejegyzések elérését biztosítja. Minden bejegyzés külön fájlban található.
-Index: kcal/local.desktop
-===================================================================
---- kcal/local.desktop (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ kcal/local.desktop (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -57,7 +57,7 @@
- Comment[es]=Provee acceso a un calendario almacenado en un único archivo local
- Comment[et]=Võimaldab kasutada kohalikku faili salvestatud kalendrit
- Comment[fi]=Tarjoaa pääsyn yksittäiseen paikalliseen tiedostoon tallennettuun kalenteriin
--Comment[fr]=Fourni l'accès à un agenda stocké dans un fichier local
-+Comment[fr]=Fournit l'accès à un agenda stocké dans un fichier local
- Comment[ga]=Soláthraíonn sé seo rochtain ar fhéilire stóráilte i gcomhad logánta amháin
- Comment[gl]=Dá acceso a un calendario gardado nun único ficheiro local
- Comment[hu]=Helyi fájlban tárolt naptár elérését biztosítja.
-Index: kcal/scheduler.cpp
-===================================================================
---- kcal/scheduler.cpp (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ kcal/scheduler.cpp (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -256,8 +256,8 @@
- if ( !visitor.assign( calInc, newInc ) ) {
- kError() << "assigning different incidence types";
- } else {
-+ calInc->setSchedulingID( newInc->uid() );
- calInc->setUid( oldUid );
-- calInc->setSchedulingID( newInc->uid() );
- res = true;
- }
- }
-@@ -345,8 +345,8 @@
- kError() << "assigning different incidence types";
- res = false;
- } else {
-+ i->setSchedulingID( inc->uid() );
- i->setUid( oldUid );
-- i->setSchedulingID( inc->uid() );
- }
- deleteTransaction( incidence );
- return res;
-Index: kabc/plugins/file/file.desktop
-===================================================================
---- kabc/plugins/file/file.desktop (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ kabc/plugins/file/file.desktop (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -59,7 +59,7 @@
- Comment[es]=Provee acceso a los contactos almacenados en un único archivo local. Soporta archivos VCard estándar y otros formatos dependiendo de la disponibilidad de los componentes.
- Comment[et]=Võimaldab kasutada kohalikku faili salvestatud kontakte. Toetab standardseid VCard-faile ja teisi vorminguid sõltuvalt pluginate olemasolust.
- Comment[fi]=Tarjoaa pääsyn yksittäiseen paikalliseen tiedostoon tallennettuihin yhteystietoihin. Tukee vakiomuotoisia vCard-tiedostoja sekä muita tiedostomuotoja liitännäisistä riippuen.
--Comment[fr]=Fourni l'accès aux contacts stockés dans un seul fichier local. Le format VCard et d'autres formats sont pris en charge en fonction des modules externes disponibles.
-+Comment[fr]=Fournit l'accès aux contacts stockés dans un seul fichier local. Le format VCard et d'autres formats sont pris en charge en fonction des modules externes disponibles.
- Comment[ga]=Soláthraíonn sé seo rochtain ar theagmhálacha, stóráilte i gcomhad aonair. Tacaítear le comhaid v-Chárta agus formáidí eile, ag brath ar na breiseáin atá ar fáil.
- Comment[gl]=Dá acceso a contactos gardados nun único ficheiro local. Admite ficheiros vCard estándar e outros formatos en función das extensións dispoñíbeis.
- Comment[hu]=Névjegyek elérését biztosítja. Minden névjegy egy közös helyi fájlban található. Támogatja a standard vCard formátumot, és bővítmények segítségével más formátumok is kezelhetők.
-Index: kabc/plugins/ldapkio/ldapkio.desktop
-===================================================================
---- kabc/plugins/ldapkio/ldapkio.desktop (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ kabc/plugins/ldapkio/ldapkio.desktop (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -59,7 +59,7 @@
- Comment[es]=Provee acceso a los contactos almacenados en un servidor de directorios LDAP
- Comment[et]=Võimaldab kasutada LDAP kataloogiserverisse salvestatud kontakte
- Comment[fi]=Tarjoaa pääsyn LDAP-hakemistopalvelimelle tallennettuihin yhteystietoihin
--Comment[fr]=Fourni l'accès aux contacts stockés dans un annuaire LDAP
-+Comment[fr]=Fournit l'accès aux contacts stockés dans un annuaire LDAP
- Comment[ga]=Soláthraíonn sé seo rochtain ar theagmhálacha atá stóráilte in eolaire LDAP
- Comment[gl]=Dá acceso a contactos gardados nun servidor de directorio LDAP
- Comment[hu]=LDAP címtárkiszolgálókon tárolt névjegyek elérését biztosítja.
-Index: kabc/plugins/net/net.desktop
-===================================================================
---- kabc/plugins/net/net.desktop (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ kabc/plugins/net/net.desktop (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -59,7 +59,7 @@
- Comment[es]=Provee acceso a los contactos en un archivo remoto utilizando la infraestructura de red KIO de KDE. Soporta archivos VCard estándar y otros formatos dependiendo en la disponibilidad de los complementos.
- Comment[et]=Võimaldab kasutada võrgufaile KDE võrguraamistiku KIO abil. Toetab standardseid VCard-faile ja teisi vorminguid sõltuvalt pluginate olemasolust.
- Comment[fi]=Tarjoaa pääsyn etätiedostoissa oleviin yhteystietoihin KDE:n verkkokehyksen KIOn välityksellä. Tukee vakiomuotoisia vCard-tiedostoja sekä muita tiedostomuotoja liitännäisistä riippuen.
--Comment[fr]=Fourni l'accès aux contacts stockés dans des fichiers distants en utilisant le mécanisme réseau KIO de KDE. Le format VCard et d'autres formats sont pris en charge en fonction des modules externes disponibles.
-+Comment[fr]=Fournit l'accès aux contacts stockés dans des fichiers distants en utilisant le mécanisme réseau KIO de KDE. Le format VCard et d'autres formats sont pris en charge en fonction des modules externes disponibles.
- Comment[ga]=Soláthraíonn sé seo rochtain ar theagmhálacha i gcianchomhaid tríd an gcreatlach líonra KIO atá cuid de KDE. Tacaítear le comhaid v-Chárta agus formáidí eile, ag brath ar na breiseáin atá ar fáil.
- Comment[gl]=Dá acceso a contactos gardados en ficheiros remotos mediante a infraestrutura de rede KIO, de KDE. Admite ficheiros vCard estándar e outros formatos en función das extensións dispoñíbeis.
- Comment[hu]=Távoli fájlokban található névjegyek elérését biztosítja a KDE KIO keretrendszeren keresztül. Támogatja a standard vCard formátumot, és bővítmények segítségével más formátumok is kezelhetők.
-Index: kabc/plugins/dir/dir.desktop
-===================================================================
---- kabc/plugins/dir/dir.desktop (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ kabc/plugins/dir/dir.desktop (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -53,7 +53,7 @@
- Comment[es]=Provee acceso a los contactos, cada uno almacenado en un archivo diferente, dentro de un directorio determinado. Soporta archivos VCard estándar y otros formatos dependiendo de la disponibilidad de los complementos.
- Comment[et]=Võimaldab kasutada eraldi failidesse salvestatud kontakte määratud kataloogis. Toetab standardseid VCard-faile ja teisi vorminguid sõltuvalt pluginate olemasolust.
- Comment[fi]=Tarjoaa pääsyn annetun kansion yksittäisiin tiedostoihin tallennettuihin yhteystietoihin. Tukee vakiomuotoista vCard-tiedostoa sekä muita tiedostomuotoja liitännäisistä riippuen.
--Comment[fr]=Fourni l'accès aux contacts stockés chacun dans un fichier dans le dossier indiqué. Le format VCard et d'autres formats sont pris en charge en fonction des modules externes disponibles
-+Comment[fr]=Fournit l'accès aux contacts stockés chacun dans un fichier dans le dossier indiqué. Le format VCard et d'autres formats sont pris en charge en fonction des modules externes disponibles
- Comment[ga]=Soláthraíonn sé seo rochtain ar theagmhálacha, gach ceann stóráilte i gcomhad aonair, i bhfillteán sonraithe. Tacaítear le comhaid v-Chárta agus le formáidí eile, ag brath ar na breiseáin atá ar fáil.
- Comment[gl]=Dá acceso aos contactos, cada un gardado nun ficheiro nun cartafol dado. Admite ficheiros vCard estándar e outros formatos, en función da dispoñibilidade de extensións.
- Comment[hu]=Névjegyek elérését biztosítja. Minden névjegy külön fájlban található, egy adott mappában. Támogatja a standard vCard formátumot, és bővítmények segítségével más formátumok is kezelhetők.
-Index: akonadi/sharedvaluepool_p.h
-===================================================================
---- akonadi/sharedvaluepool_p.h (.../tags/KDE/4.5.2/kdepimlibs) (wersja 0)
-+++ akonadi/sharedvaluepool_p.h (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -0,0 +1,78 @@
-+/*
-+ Copyright (c) 2010 Volker Krause <vkrause at kde.org>
-+
-+ This library is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or (at your
-+ option) any later version.
-+
-+ 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.
-+
-+ 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.
-+*/
-+
-+#ifndef AKONADI_SHAREDVALUEPOOL_P_H
-+#define AKONADI_SHAREDVALUEPOOL_P_H
-+
-+#include <boost/utility/enable_if.hpp>
-+#include <algorithm>
-+
-+namespace Akonadi {
-+namespace Internal {
-+
-+/*template <typename T> class container_traits
-+{
-+ private:
-+ typedef char sizeOne;
-+ typedef struct { char a[2]; } sizeTwo;
-+ template <typename C> static sizeOne testForKeyType( typename C::key_type const* );
-+ template <typename C> static sizeTwo testForKeyType( ... );
-+ public:
-+ enum { isAssociative = sizeof( container_traits<T>::testForKeyType<T>( 0 ) ) == 1 };
-+};*/
-+
-+/**
-+ * Pool of implicitly shared values, use for optimizing memory use
-+ * when having a large amount of copies from a small set of different values.
-+ */
-+template <typename T, template <typename> class Container>
-+class SharedValuePool
-+{
-+ public:
-+ /** Returns the shared value equal to @p value .*/
-+ /*template <typename C>
-+ typename boost::enable_if_c<container_traits<Container<C> >::isAssociative, C>::type sharedValue( const C &value, const int* = 0 )
-+ {
-+ typename Container<T>::const_iterator it = m_pool.constFind( value );
-+ if ( it != m_pool.constEnd() )
-+ return *it;
-+ m_pool.insert( value );
-+ return value;
-+ }
-+
-+ template <typename C>
-+ typename boost::disable_if_c<container_traits<Container<C> >::isAssociative, C>::type sharedValue( const C &value )*/
-+ T sharedValue( const T &value )
-+ {
-+ // for small pool sizes this is actually faster than using lower_bound and a sorted vector
-+ typename Container<T>::const_iterator it = std::find( m_pool.constBegin(), m_pool.constEnd(), value );
-+ if ( it != m_pool.constEnd() )
-+ return *it;
-+ m_pool.push_back( value );
-+ return value;
-+ }
-+
-+ private:
-+ Container<T> m_pool;
-+};
-+
-+}
-+}
-+
-+#endif
-Index: akonadi/itemfetchjob.cpp
-===================================================================
---- akonadi/itemfetchjob.cpp (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ akonadi/itemfetchjob.cpp (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -40,11 +40,17 @@
- {
- public:
- ItemFetchJobPrivate( ItemFetchJob *parent )
-- : JobPrivate( parent )
-+ : JobPrivate( parent ),
-+ mValuePool( 0 )
- {
- mCollection = Collection::root();
- }
-
-+ ~ItemFetchJobPrivate()
-+ {
-+ delete mValuePool;
-+ }
-+
- void init()
- {
- Q_Q( ItemFetchJob );
-@@ -78,6 +84,7 @@
- ItemFetchScope mFetchScope;
- Item::List mPendingItems; // items pending for emitting itemsReceived()
- QTimer* mEmitTimer;
-+ ProtocolHelperValuePool *mValuePool;
- };
-
- void ItemFetchJobPrivate::startFetchJob()
-@@ -116,6 +123,7 @@
-
- d->init();
- d->mCollection = collection;
-+ d->mValuePool = new ProtocolHelperValuePool; // only worth it for lots of results
- }
-
- ItemFetchJob::ItemFetchJob( const Item & item, QObject * parent)
-@@ -171,7 +179,7 @@
- ImapParser::parseParenthesizedList( data, fetchResponse, begin + 6 );
-
- Item item;
-- ProtocolHelper::parseItemFetchResult( fetchResponse, item );
-+ ProtocolHelper::parseItemFetchResult( fetchResponse, item, d->mValuePool );
- if ( !item.isValid() )
- return;
-
-Index: akonadi/item_p.h
-===================================================================
---- akonadi/item_p.h (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ akonadi/item_p.h (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -94,9 +94,9 @@
- QString mMimeType;
- Item::Flags mAddedFlags;
- Item::Flags mDeletedFlags;
-- bool mFlagsOverwritten;
-- bool mSizeChanged;
-- bool mClearPayload;
-+ bool mFlagsOverwritten : 1;
-+ bool mSizeChanged : 1;
-+ bool mClearPayload : 1;
- };
-
- }
-Index: akonadi/protocolhelper_p.h
-===================================================================
---- akonadi/protocolhelper_p.h (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ akonadi/protocolhelper_p.h (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -25,6 +25,7 @@
- #include <akonadi/collectionutils_p.h>
- #include <akonadi/item.h>
- #include <akonadi/itemfetchscope.h>
-+#include <akonadi/sharedvaluepool_p.h>
-
- #include <akonadi/private/imapparser_p.h>
- #include <akonadi/private/protocol_p.h>
-@@ -34,6 +35,16 @@
-
- namespace Akonadi {
-
-+struct ProtocolHelperValuePool
-+{
-+ typedef Internal::SharedValuePool<QByteArray, QVector> FlagPool;
-+ typedef Internal::SharedValuePool<QString, QVector> MimeTypePool;
-+
-+ FlagPool flagPool;
-+ MimeTypePool mimeTypePool;
-+ QHash<Collection::Id, Collection> ancestorCollections;
-+};
-+
- /**
- @internal
- Helper methods for converting between libakonadi objects and their protocol
-@@ -72,6 +83,14 @@
- static void parseAncestors( const QByteArray &data, Entity *entity, int start = 0 );
-
- /**
-+ Convert a ancestor chain from its protocol representation into an Entity object.
-+
-+ This method allows to pass a @p valuePool which acts as cache, so ancestor paths for the
-+ same @p parentCollection don't have to be parsed twice.
-+ */
-+ static void parseAncestorsCached( const QByteArray &data, Entity *entity, Collection::Id parentCollection, ProtocolHelperValuePool *valuePool = 0, int start = 0 );
-+
-+ /**
- Parse a collection description.
- @param data The input data.
- @param collection The parsed collection.
-@@ -195,7 +214,7 @@
- /**
- Parses a single line from an item fetch job result into an Item object.
- */
-- static void parseItemFetchResult( const QList<QByteArray> &lineTokens, Item &item );
-+ static void parseItemFetchResult( const QList<QByteArray> &lineTokens, Item &item, ProtocolHelperValuePool *valuePool = 0 );
- };
-
- }
-Index: akonadi/tests/CMakeLists.txt
-===================================================================
---- akonadi/tests/CMakeLists.txt (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ akonadi/tests/CMakeLists.txt (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -137,6 +137,7 @@
- add_akonadi_test(collectionutilstest.cpp)
- add_akonadi_test(entitydisplayattributetest.cpp)
- add_akonadi_test(proxymodelstest.cpp)
-+add_akonadi_test(sharedvaluepooltest.cpp)
-
- # qtestlib tests that need non-exported stuff from akonadi-kde
- kde4_add_unit_test(resourceschedulertest TESTNAME akonadi-resourceschedulertest resourceschedulertest.cpp ../resourcescheduler.cpp)
-Index: akonadi/tests/sharedvaluepooltest.cpp
-===================================================================
---- akonadi/tests/sharedvaluepooltest.cpp (.../tags/KDE/4.5.2/kdepimlibs) (wersja 0)
-+++ akonadi/tests/sharedvaluepooltest.cpp (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -0,0 +1,89 @@
-+/*
-+ Copyright (c) 2010 Volker Krause <vkrause at kde.org>
-+
-+ This library is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU Library General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or (at your
-+ option) any later version.
-+
-+ 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.
-+
-+ 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.
-+*/
-+
-+#include "../sharedvaluepool_p.h"
-+#include <qtest_kde.h>
-+
-+#include <QVector>
-+#include <QSet>
-+#include <set>
-+#include <vector>
-+
-+using namespace Akonadi;
-+
-+class SharedValuePoolTest : public QObject
-+{
-+ Q_OBJECT
-+ private slots:
-+ void testQVector_data()
-+ {
-+ QTest::addColumn<int>( "size" );
-+ QTest::newRow( "10" ) << 10;
-+ QTest::newRow( "100" ) << 100;
-+ }
-+
-+ void testQVector()
-+ {
-+ QFETCH( int, size );
-+ QVector<QByteArray> data;
-+ Internal::SharedValuePool<QByteArray, QVector> pool;
-+
-+ for ( int i = 0; i < size; ++i ) {
-+ QByteArray b( 10, (char)i );
-+ data.push_back( b );
-+ QCOMPARE( pool.sharedValue( b ), b );
-+ QCOMPARE( pool.sharedValue( b ), b );
-+ }
-+
-+ QBENCHMARK {
-+ foreach ( const QByteArray &b, data )
-+ pool.sharedValue( b );
-+ }
-+ }
-+
-+ /*void testQSet_data()
-+ {
-+ QTest::addColumn<int>( "size" );
-+ QTest::newRow( "10" ) << 10;
-+ QTest::newRow( "100" ) << 100;
-+ }
-+
-+ void testQSet()
-+ {
-+ QFETCH( int, size );
-+ QVector<QByteArray> data;
-+ Internal::SharedValuePool<QByteArray, QSet> pool;
-+
-+ for ( int i = 0; i < size; ++i ) {
-+ QByteArray b( 10, (char)i );
-+ data.push_back( b );
-+ QCOMPARE( pool.sharedValue( b ), b );
-+ QCOMPARE( pool.sharedValue( b ), b );
-+ }
-+
-+ QBENCHMARK {
-+ foreach ( const QByteArray &b, data )
-+ pool.sharedValue( b );
-+ }
-+ }*/
-+};
-+
-+QTEST_KDEMAIN( SharedValuePoolTest, NoGUI )
-+
-+#include "sharedvaluepooltest.moc"
-Index: akonadi/collectionstatisticsdelegate.cpp
-===================================================================
---- akonadi/collectionstatisticsdelegate.cpp (.../tags/KDE/4.5.2/kdepimlibs) (wersja 1188163)
-+++ akonadi/collectionstatisticsdelegate.cpp (.../branches/KDE/4.5/kdepimlibs) (wersja 1188163)
-@@ -74,7 +74,8 @@
-
- if ( index.model()->hasChildren( index ) )
- {
-- for ( int row = 0; row < index.model()->rowCount( index ); row++ )
-+ const int rowCount = index.model()->rowCount( index );
-+ for ( int row = 0; row < rowCount; row++ )
- {
- static const int column = 0;
- count += getCountRecursive<countType>( index.model()->index( row, column, index ) );
-@@ -287,7 +288,7 @@
- sumText = QString::number( expanded ? unreadCount : unreadRecursiveCount );
- } else {
-
-- qint64 totalCount = statistics.unreadCount();
-+ qint64 totalCount = statistics.count();
- qint64 totalRecursiveCount = d->getCountRecursive<TotalCount>( index.sibling( index.row(), 0 ) );
- if (index.column() == 2 && ( ( !expanded && totalRecursiveCount > 0 ) || ( expanded && totalCount > 0 ) ) ) {
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kde4-kdepimlibs/kde4-kdepimlibs-branch.diff?r1=1.24&r2=1.25&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kde4-kdepimlibs/kde4-kdepimlibs.spec?r1=1.131&r2=1.132&f=u
More information about the pld-cvs-commit
mailing list