Hello community,

here is the log from the commit of package kdepimlibs4 for openSUSE:Factory 
checked in at 2014-09-18 07:57:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdepimlibs4 (Old)
 and      /work/SRC/openSUSE:Factory/.kdepimlibs4.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdepimlibs4"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kdepimlibs4/kdepimlibs4.changes  2014-09-12 
11:19:16.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kdepimlibs4.new/kdepimlibs4.changes     
2014-09-18 07:57:35.000000000 +0200
@@ -1,0 +2,7 @@
+Sat Sep 13 16:21:00 UTC 2014 - [email protected]
+
+- Update to 4.14.1
+   * KDE 4.14.1 SC Bugfix Release
+   * See http://www.kde.org/announcements/announce-4.14.1.php
+
+-------------------------------------------------------------------

Old:
----
  kdepimlibs-4.14.0.tar.xz

New:
----
  kdepimlibs-4.14.1.tar.xz

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

Other differences:
------------------
++++++ kdepimlibs4.spec ++++++
--- /var/tmp/diff_new_pack.N4dLdY/_old  2014-09-18 07:57:36.000000000 +0200
+++ /var/tmp/diff_new_pack.N4dLdY/_new  2014-09-18 07:57:36.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           kdepimlibs4
-Version:        4.14.0
+Version:        4.14.1
 Release:        0
 Summary:        KDE PIM Libraries
 License:        LGPL-2.1+

++++++ kdepimlibs-4.14.0.tar.xz -> kdepimlibs-4.14.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/CMakeLists.txt 
new/kdepimlibs-4.14.1/CMakeLists.txt
--- old/kdepimlibs-4.14.0/CMakeLists.txt        2014-08-13 09:43:09.000000000 
+0200
+++ new/kdepimlibs-4.14.1/CMakeLists.txt        2014-09-10 22:48:29.000000000 
+0200
@@ -7,7 +7,7 @@
 ############### The kdepimlibs version (used e.g. in KdepimLibsConfig.cmake) 
###############
 set(KDEPIMLIBS_VERSION_MAJOR 4)
 set(KDEPIMLIBS_VERSION_MINOR 14)
-set(KDEPIMLIBS_VERSION_PATCH 0)
+set(KDEPIMLIBS_VERSION_PATCH 1)
 set(KDEPIMLIBS_VERSION 
${KDEPIMLIBS_VERSION_MAJOR}.${KDEPIMLIBS_VERSION_MINOR}.${KDEPIMLIBS_VERSION_PATCH})
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kdepimlibs-4.14.0/akonadi/contact/editor/im/kaddressbookimprotocol.desktop 
new/kdepimlibs-4.14.1/akonadi/contact/editor/im/kaddressbookimprotocol.desktop
--- 
old/kdepimlibs-4.14.0/akonadi/contact/editor/im/kaddressbookimprotocol.desktop  
    2014-08-13 09:43:09.000000000 +0200
+++ 
new/kdepimlibs-4.14.1/akonadi/contact/editor/im/kaddressbookimprotocol.desktop  
    2014-09-10 22:48:29.000000000 +0200
@@ -37,7 +37,7 @@
 Name[ro]=Protocol de mesagerie instantanee a cărții de adrese
 Name[ru]=Протокол обмена мгновенными сообщениями KAddressBook
 Name[sk]=Protokol KAddressbook Instant Messaging
-Name[sl]=Protokol takojšnjega sporočanja v KAddressBook
+Name[sl]=Protokol hipnega sporočanja za KAddressBook
 Name[sr]=Брзогласнички протокол К‑адресара
 Name[sr@ijekavian]=Брзогласнички протокол К‑адресара
 Name[sr@ijekavianlatin]=Brzoglasnički protokol K‑adresara
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kdepimlibs-4.14.0/akonadi/contact/editor/im/protocols/skypeprotocol.desktop 
new/kdepimlibs-4.14.1/akonadi/contact/editor/im/protocols/skypeprotocol.desktop
--- 
old/kdepimlibs-4.14.0/akonadi/contact/editor/im/protocols/skypeprotocol.desktop 
    2014-08-13 09:43:09.000000000 +0200
+++ 
new/kdepimlibs-4.14.1/akonadi/contact/editor/im/protocols/skypeprotocol.desktop 
    2014-09-10 22:48:29.000000000 +0200
@@ -39,7 +39,7 @@
 Comment[ro]=Telefonie prin internet Skype
 Comment[ru]=Интернет-телефония Skype
 Comment[sk]=Skype Internet Telephony
-Comment[sl]=Medmrežna telefonija Skype
+Comment[sl]=Internetna telefonija Skype
 Comment[sr]=Скајп, интернет телефонија
 Comment[sr@ijekavian]=Скајп, интернет телефонија
 Comment[sr@ijekavianlatin]=Skype, internet telefonija
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/entitycache_p.h 
new/kdepimlibs-4.14.1/akonadi/entitycache_p.h
--- old/kdepimlibs-4.14.0/akonadi/entitycache_p.h       2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/entitycache_p.h       2014-09-10 
22:48:29.000000000 +0200
@@ -33,6 +33,7 @@
 
 #include "akonadiprivate_export.h"
 
+#include <kdebug.h>
 #include <qobject.h>
 #include <QQueue>
 #include <QVariant>
@@ -194,8 +195,11 @@
 
     void processResult(KJob *job)
     {
-        // Error handling?
         typename T::Id id = job->property("EntityCacheNode").template 
value<typename T::Id>();
+        // Error handling?
+        if ( job->error() ) {
+          kWarning() << job->errorString();
+        }
         EntityCacheNode<T> *node = cacheNodeForId(id);
         if (!node) {
             return; // got replaced in the meantime
@@ -458,6 +462,9 @@
 
     void processResult(KJob *job)
     {
+        if ( job->error() ) {
+          kWarning() << job->errorString();
+        }
         const QList<Entity::Id> ids = 
job->property("EntityListCacheIds").value< QList<Entity::Id> >();
 
         typename T::List entities;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/entitytreemodel_p.cpp 
new/kdepimlibs-4.14.1/akonadi/entitytreemodel_p.cpp
--- old/kdepimlibs-4.14.0/akonadi/entitytreemodel_p.cpp 2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/entitytreemodel_p.cpp 2014-09-10 
22:48:29.000000000 +0200
@@ -380,6 +380,18 @@
     }
 }
 
+static QSet<Collection::Id> getChildren(Collection::Id parent, const 
QHash<Collection::Id, Collection::Id> &childParentMap)
+{
+    QSet<Collection::Id> children;
+    Q_FOREACH (Collection::Id c, childParentMap.keys()) {
+        if (childParentMap.value(c) == parent) {
+            children << c;
+            children += getChildren(c, childParentMap);
+        }
+    }
+    return children;
+}
+
 void EntityTreeModelPrivate::collectionsFetched(const 
Akonadi::Collection::List &collections)
 {
     Q_Q(EntityTreeModel);
@@ -389,22 +401,13 @@
     QListIterator<Akonadi::Collection> it(collections);
 
     QHash<Collection::Id, Collection> collectionsToInsert;
-    QHash<Collection::Id, QVector<Collection::Id> > subTreesToInsert;
-    QHash<Collection::Id, Collection> parents;
 
     while (it.hasNext()) {
         const Collection collection = it.next();
 
         const Collection::Id collectionId = collection.id();
 
-        // If a collection is hidden, we still need to put it in the model if 
it has a
-        // non-hidden child. We rely on the fact that children will be returned
-        // first and will be in collectionsToInsert (if returned in this batch)
-        // or will already be in the model as a dummy node in m_collections
-        // if returned and processed in an earlier batch.
-        if (isHidden(collection) &&
-            !collectionsToInsert.contains(collectionId) &&
-            !m_collections.contains(collectionId)) {
+        if (isHidden(collection)) {
             continue;
         }
 
@@ -428,49 +431,69 @@
             retrieveAncestors(collection, false);
         }
 
-        Collection parent = collection;
+        collectionsToInsert.insert(collectionId, collection);
+    }
 
-        while (!m_collections.contains(parent.parentCollection().id())) {
-            if 
(!subTreesToInsert[parent.parentCollection().id()].contains(parent.parentCollection().id()))
 {
-                
subTreesToInsert[parent.parentCollection().id()].append(parent.parentCollection().id());
-                collectionsToInsert.insert(parent.parentCollection().id(), 
parent.parentCollection());
-            }
+    //Build a list of subtrees to insert, with the root of the subtree on the 
left, and the complete subtree including root on the right
+    QHash<Collection::Id, QSet<Collection::Id> > subTreesToInsert;
+    {
+        //Build a child-parent map that allows us to build the subtrees 
afterwards
+        QHash<Collection::Id, Collection::Id> childParentMap;
+        Q_FOREACH (const Collection &col, collectionsToInsert) {
+            childParentMap.insert(col.id(), col.parentCollection().id());
+
+            //Complete the subtree up to the last known parent
+            Collection parent = col.parentCollection();
+            while (parent.isValid() && parent != m_rootCollection && 
!m_collections.contains(parent.id())) {
+                childParentMap.insert(parent.id(), 
parent.parentCollection().id());
 
-            foreach (Collection::Id collectionId, 
subTreesToInsert.take(parent.id())) {
-                if 
(!subTreesToInsert[parent.parentCollection().id()].contains(collectionId)) {
-                    
subTreesToInsert[parent.parentCollection().id()].append(collectionId);
+                if (!collectionsToInsert.contains(parent.id())) {
+                    collectionsToInsert.insert(parent.id(), parent);
                 }
+                parent = parent.parentCollection();
             }
-
-            parent = parent.parentCollection();
         }
 
-        if (!subTreesToInsert[parent.id()].contains(collectionId)) {
-            subTreesToInsert[parent.id()].append(collectionId);
+        QSet<Collection::Id> parents;
+
+        //Find toplevel parents of the subtrees
+        Q_FOREACH (Collection::Id c, childParentMap.keys()) {
+            //The child has a parent without parent (it's a toplevel node that 
is not yet in m_collections)
+            if (!childParentMap.contains(childParentMap.value(c))) {
+                Q_ASSERT(!m_collections.contains(c));
+                parents << c;
+            }
         }
 
-        collectionsToInsert.insert(collectionId, collection);
-        if (!parents.contains(parent.id())) {
-            parents.insert(parent.id(), parent.parentCollection());
+        //Find children of each subtree
+        Q_FOREACH (Collection::Id p, parents) {
+            QSet<Collection::Id> children;
+            //We add the parent itself as well so it can be inserted below as 
part of the same loop
+            children << p;
+            children += getChildren(p, childParentMap);
+            subTreesToInsert[p] = children;
         }
     }
 
     const int row = 0;
 
-    QHashIterator<Collection::Id, QVector<Collection::Id> > 
collectionIt(subTreesToInsert);
+    QHashIterator<Collection::Id, QSet<Collection::Id> > 
collectionIt(subTreesToInsert);
     while (collectionIt.hasNext()) {
         collectionIt.next();
 
         const Collection::Id topCollectionId = collectionIt.key();
+        kDebug() << "Subtree: " << topCollectionId << collectionIt.value();
 
         Q_ASSERT(!m_collections.contains(topCollectionId));
+        Collection topCollection = collectionsToInsert.value(topCollectionId);
+        Q_ASSERT(topCollection.isValid());
 
-        Q_ASSERT(parents.contains(topCollectionId));
-        const QModelIndex parentIndex = 
indexForCollection(parents.value(topCollectionId));
+        //The toplevels parent must already be part of the model
+        
Q_ASSERT(m_collections.contains(topCollection.parentCollection().id()));
+        const QModelIndex parentIndex = 
indexForCollection(topCollection.parentCollection());
 
         q->beginInsertRows(parentIndex, row, row);
         Q_ASSERT(!collectionIt.value().isEmpty());
-        Q_ASSERT(m_collections.contains(parents.value(topCollectionId).id()));
 
         foreach (Collection::Id collectionId, collectionIt.value()) {
             const Collection collection = 
collectionsToInsert.take(collectionId);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/itemfetchscope.cpp 
new/kdepimlibs-4.14.1/akonadi/itemfetchscope.cpp
--- old/kdepimlibs-4.14.0/akonadi/itemfetchscope.cpp    2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/itemfetchscope.cpp    2014-09-10 
22:48:29.000000000 +0200
@@ -194,6 +194,21 @@
     return d->mFetchTags;
 }
 
+void ItemFetchScope::setTagFetchScope(const TagFetchScope &tagFetchScope)
+{
+    d->mTagFetchScope = tagFetchScope;
+}
+
+TagFetchScope &ItemFetchScope::tagFetchScope()
+{
+    return d->mTagFetchScope;
+}
+
+TagFetchScope ItemFetchScope::tagFetchScope() const
+{
+    return d->mTagFetchScope;
+}
+
 void ItemFetchScope::setFetchVirtualReferences(bool fetchVRefs)
 {
     d->mFetchVRefs = fetchVRefs;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/itemfetchscope.h 
new/kdepimlibs-4.14.1/akonadi/itemfetchscope.h
--- old/kdepimlibs-4.14.0/akonadi/itemfetchscope.h      2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/itemfetchscope.h      2014-09-10 
22:48:29.000000000 +0200
@@ -31,6 +31,7 @@
 namespace Akonadi {
 
 class ItemFetchScopePrivate;
+class TagFetchScope;
 
 /**
  * @short Specifies which parts of an item should be fetched from the Akonadi 
storage.
@@ -346,6 +347,49 @@
     bool fetchTags() const;
 
     /**
+     * Sets the tag fetch scope.
+     *
+     * The TagFetchScope controls how much of an tags's data is fetched
+     * from the server.
+     *
+     * By default setFetchIdOnly is set to true on the tag fetch scope.
+     *
+     * @param fetchScope The new fetch scope for tag fetch operations.
+     * @see fetchScope()
+     * @since 4.15
+     */
+    void setTagFetchScope(const TagFetchScope &fetchScope);
+
+    /**
+     * Returns the tag fetch scope.
+     *
+     * Since this returns a reference it can be used to conveniently modify the
+     * current scope in-place, i.e. by calling a method on the returned 
reference
+     * without storing it in a local variable. See the TagFetchScope 
documentation
+     * for an example.
+     *
+     * By default setFetchIdOnly is set to true on the tag fetch scope.
+     *
+     * @return a reference to the current tag fetch scope
+     *
+     * @see setFetchScope() for replacing the current tag fetch scope
+     * @since 4.15
+     */
+    TagFetchScope &tagFetchScope();
+
+    /**
+     * Returns the tag fetch scope.
+     *
+     * By default setFetchIdOnly is set to true on the tag fetch scope.
+     *
+     * @return a reference to the current tag fetch scope
+     *
+     * @see setFetchScope() for replacing the current tag fetch scope
+     * @since 4.15
+     */
+    TagFetchScope tagFetchScope() const;
+
+    /**
      * Returns whether to fetch list of virtual collections the item is linked 
to
      *
      * @param fetchVRefs whether or not to fetch virtualc references
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/itemfetchscope_p.h 
new/kdepimlibs-4.14.1/akonadi/itemfetchscope_p.h
--- old/kdepimlibs-4.14.0/akonadi/itemfetchscope_p.h    2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/itemfetchscope_p.h    2014-09-10 
22:48:29.000000000 +0200
@@ -24,6 +24,7 @@
 #include <QtCore/QString>
 #include <KDE/KDateTime>
 #include "itemfetchscope.h"
+#include "tagfetchscope.h"
 
 namespace Akonadi {
 
@@ -46,6 +47,7 @@
         , mFetchTags(false)
         , mFetchVRefs(false)
     {
+        mTagFetchScope.setFetchIdOnly(true);
     }
 
     ItemFetchScopePrivate(const ItemFetchScopePrivate &other)
@@ -64,6 +66,7 @@
         mFetchRid = other.mFetchRid;
         mFetchGid = other.mFetchGid;
         mFetchTags = other.mFetchTags;
+        mTagFetchScope = other.mTagFetchScope;
         mFetchVRefs = other.mFetchVRefs;
     }
 
@@ -81,6 +84,7 @@
     bool mFetchRid;
     bool mFetchGid;
     bool mFetchTags;
+    TagFetchScope mTagFetchScope;
     bool mFetchVRefs;
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/itemmodifyjob.cpp 
new/kdepimlibs-4.14.1/akonadi/itemmodifyjob.cpp
--- old/kdepimlibs-4.14.0/akonadi/itemmodifyjob.cpp     2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/itemmodifyjob.cpp     2014-09-10 
22:48:29.000000000 +0200
@@ -116,6 +116,45 @@
   mSilent = silent;
 }
 
+QByteArray ItemModifyJobPrivate::tagsToCommandParameter(const Tag::List &tags) 
const
+{
+    QByteArray c;
+    if (tags.first().id() >= 0) {
+        c += "TAGS";
+        c += ' ' + ProtocolHelper::tagSetToImapSequenceSet(tags);
+    } else if (std::find_if(tags.constBegin(), tags.constEnd(),
+                        boost::bind(&QByteArray::isEmpty, 
boost::bind(&Tag::remoteId, _1)))
+        == tags.constEnd()) {
+        //All items have a remoteId
+        c += "RTAGS";
+        QList<QByteArray> rids;
+        Q_FOREACH (const Tag &object, tags) {
+            rids << ImapParser::quote(object.remoteId());
+        }
+
+        c += '(';
+        c += ImapParser::join(rids, " ");
+        c += ')';
+
+    } else if (std::find_if(tags.constBegin(), tags.constEnd(),
+                        boost::bind(&QByteArray::isEmpty, 
boost::bind(&Tag::gid, _1)))
+        == tags.constEnd()) {
+        //All items have a gid
+        c += "GTAGS";
+        QList<QByteArray> gids;
+        Q_FOREACH (const Tag &object, tags) {
+            gids << ImapParser::quote(object.gid());
+        }
+
+        c += '(';
+        c += ImapParser::join(gids, " ");
+        c += ')';
+    } else {
+        throw Exception("Cannot identify all tags");
+    }
+    return c;
+}
+
 ItemModifyJob::ItemModifyJob(const Item &item, QObject *parent)
     : Job(new ItemModifyJobPrivate(this), parent)
 {
@@ -205,16 +244,13 @@
     }
 
     if (item.d_func()->mTagsOverwritten) {
-        changes << "TAGS";
-        changes << ' ' + ProtocolHelper::tagSetToImapSequenceSet(item.tags());
+        changes << tagsToCommandParameter(item.tags());
     } else {
         if (!item.d_func()->mAddedTags.isEmpty()) {
-            changes << "+TAGS";
-            changes << ' ' + 
ProtocolHelper::tagSetToImapSequenceSet(item.d_func()->mAddedTags);
+            changes << "+" + tagsToCommandParameter(item.d_func()->mAddedTags);
         }
         if (!item.d_func()->mDeletedTags.isEmpty()) {
-            changes << "-TAGS";
-            changes << ' ' + 
ProtocolHelper::tagSetToImapSequenceSet(item.d_func()->mDeletedTags);
+            changes << "-" + 
tagsToCommandParameter(item.d_func()->mDeletedTags);
         }
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/itemmodifyjob_p.h 
new/kdepimlibs-4.14.1/akonadi/itemmodifyjob_p.h
--- old/kdepimlibs-4.14.0/akonadi/itemmodifyjob_p.h     2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/itemmodifyjob_p.h     2014-09-10 
22:48:29.000000000 +0200
@@ -49,6 +49,7 @@
 
     QString jobDebuggingString() const /*Q_DECL_OVERRIDE*/;
     QByteArray fullCommand() const;
+    QByteArray tagsToCommandParameter(const Tag::List &tags) const;
 
     void setSilent( bool silent );
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/protocolhelper.cpp 
new/kdepimlibs-4.14.1/akonadi/protocolhelper.cpp
--- old/kdepimlibs-4.14.0/akonadi/protocolhelper.cpp    2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/protocolhelper.cpp    2014-09-10 
22:48:29.000000000 +0200
@@ -26,6 +26,7 @@
 #include "itemserializer_p.h"
 #include "itemserializerplugin.h"
 #include "servermanager.h"
+#include "tagfetchscope.h"
 #include <akonadi/private/xdgbasedirs_p.h>
 
 #include <QtCore/QDateTime>
@@ -445,8 +446,12 @@
     command += " " AKONADI_PARAM_REMOTEID " " AKONADI_PARAM_REMOTEREVISION;
   if ( fetchScope.fetchGid() )
     command += " GID";
-  if ( fetchScope.fetchTags() )
+  if ( fetchScope.fetchTags() ) {
     command += " TAGS";
+    if ( !fetchScope.tagFetchScope().fetchIdOnly() ) {
+      command += " " + ProtocolHelper::tagFetchScopeToByteArray( 
fetchScope.tagFetchScope() );
+    }
+  }
   if ( fetchScope.fetchVirtualReferences() )
     command += " VIRTREF";
   if ( fetchScope.fetchModificationTime() )
@@ -460,6 +465,41 @@
   return command;
 }
 
+QByteArray ProtocolHelper::tagFetchScopeToByteArray( const TagFetchScope 
&fetchScope )
+{
+  QByteArray command;
+
+  command += "(UID";
+  Q_FOREACH (const QByteArray &part, fetchScope.attributes()) {
+    command += ' ' + 
ProtocolHelper::encodePartIdentifier(ProtocolHelper::PartAttribute, part);
+  }
+  command += ")";
+  return command;
+}
+
+static Item::Flags convertFlags( const QList<QByteArray>& flags, 
ProtocolHelperValuePool *valuePool )
+{
+#if __cplusplus >= 201103L || defined(__GNUC__) || defined(__clang__)
+  // When the compiler supports thread-safe static initialization (mandated by 
the C++11 memory model)
+  // then use it to share the common case of a single-item set only containing 
the \SEEN flag.
+  // NOTE: GCC and clang has threadsafe static initialization for some time 
now, even without C++11.
+  if (flags.size() == 1 && flags.first() == "\\SEEN") {
+    static const Item::Flags sharedSeen = Item::Flags() << QByteArray( 
"\\SEEN" );
+    return sharedSeen;
+  }
+#endif
+
+  Item::Flags convertedFlags;
+  convertedFlags.reserve( flags.size() );
+  foreach ( const QByteArray &flag, flags ) {
+    if ( valuePool )
+      convertedFlags.insert( valuePool->flagPool.sharedValue( flag ) );
+    else
+      convertedFlags.insert( flag );
+  }
+  return convertedFlags;
+}
+
 void ProtocolHelper::parseItemFetchResult( const QList<QByteArray> 
&lineTokens, Item &item, ProtocolHelperValuePool *valuePool )
 {
   // create a new item object
@@ -525,26 +565,30 @@
       QList<QByteArray> flags;
       ImapParser::parseParenthesizedList( lineTokens[i + 1], flags );
       if ( !flags.isEmpty() ) {
-        Item::Flags convertedFlags;
-        convertedFlags.reserve( flags.size() );
-        foreach ( const QByteArray &flag, flags ) {
-          if ( valuePool )
-            convertedFlags.insert( valuePool->flagPool.sharedValue( flag ) );
-          else
-            convertedFlags.insert( flag );
-        }
-        item.setFlags( convertedFlags );
+        item.setFlags( convertFlags( flags, valuePool ) );
       }
     } else if ( key == "TAGS" ) {
-      ImapSet set;
-      ImapParser::parseSequenceSet( lineTokens[i + 1], set );
       Tag::List tags;
-      Q_FOREACH ( const ImapInterval &interval, set.intervals() ) {
-        Q_ASSERT( interval.hasDefinedBegin() );
-        Q_ASSERT( interval.hasDefinedEnd() );
-        for ( qint64 i = interval.begin(); i <= interval.end(); i++ ) {
-          //TODO use value pool when tag is shared data
-          tags << Tag( i );
+      if ( lineTokens[i + 1].startsWith("(") ) {
+        QList<QByteArray> tagsData;
+        ImapParser::parseParenthesizedList( lineTokens[i + 1], tagsData );
+        Q_FOREACH (const QByteArray &t, tagsData) {
+          QList<QByteArray> tagParts;
+          ImapParser::parseParenthesizedList( t, tagParts );
+          Tag tag;
+          parseTagFetchResult(tagParts, tag);
+          tags << tag;
+        }
+      } else {
+        ImapSet set;
+        ImapParser::parseSequenceSet( lineTokens[i + 1], set );
+        Q_FOREACH ( const ImapInterval &interval, set.intervals() ) {
+          Q_ASSERT( interval.hasDefinedBegin() );
+          Q_ASSERT( interval.hasDefinedEnd() );
+          for ( qint64 i = interval.begin(); i <= interval.end(); i++ ) {
+            //TODO use value pool when tag is shared data
+            tags << Tag( i );
+          }
         }
       }
       item.setTags( tags );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/protocolhelper_p.h 
new/kdepimlibs-4.14.1/akonadi/protocolhelper_p.h
--- old/kdepimlibs-4.14.0/akonadi/protocolhelper_p.h    2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/protocolhelper_p.h    2014-09-10 
22:48:29.000000000 +0200
@@ -224,6 +224,11 @@
     static QByteArray itemFetchScopeToByteArray(const ItemFetchScope 
&fetchScope);
 
     /**
+      Converts a given TagFetchScope object into a protocol representation.
+    */
+    static QByteArray tagFetchScopeToByteArray( const TagFetchScope 
&fetchScope );
+
+    /**
       Parses a single line from an item fetch job result into an Item object.
      */
     static void parseItemFetchResult(const QList<QByteArray> &lineTokens, Item 
&item, ProtocolHelperValuePool *valuePool = 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/resourcebase.cpp 
new/kdepimlibs-4.14.1/akonadi/resourcebase.cpp
--- old/kdepimlibs-4.14.0/akonadi/resourcebase.cpp      2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/resourcebase.cpp      2014-09-10 
22:48:29.000000000 +0200
@@ -312,6 +312,11 @@
             changeProcessed();
             return;
         }
+        if (!item.parentCollection().isValid()) {
+            kWarning() << "Invalid parent collection for item" << item.id();
+            changeProcessed();
+            return;
+        }
         AgentBasePrivate::itemRemoved(item);
     }
 
@@ -319,6 +324,10 @@
     {
         Item::List validItems;
         foreach (const Akonadi::Item &item, items) {
+            if (!item.parentCollection().isValid()) {
+                kWarning() << "Invalid parent collection for item" << 
item.id();
+                continue;
+            }
             if (!item.remoteId().isEmpty()) {
                 validItems << item;
             }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/tagfetchjob.cpp 
new/kdepimlibs-4.14.1/akonadi/tagfetchjob.cpp
--- old/kdepimlibs-4.14.0/akonadi/tagfetchjob.cpp       2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/tagfetchjob.cpp       2014-09-10 
22:48:29.000000000 +0200
@@ -134,11 +134,7 @@
             return;
         }
     }
-    command += " (UID";
-    Q_FOREACH (const QByteArray &part, d->mFetchScope.attributes()) {
-        command += ' ' + 
ProtocolHelper::encodePartIdentifier(ProtocolHelper::PartAttribute, part);
-    }
-    command += ")\n";
+    command += " " + ProtocolHelper::tagFetchScopeToByteArray(d->mFetchScope) 
+ "\n";
 
     d->writeData(command);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/tagfetchscope.cpp 
new/kdepimlibs-4.14.1/akonadi/tagfetchscope.cpp
--- old/kdepimlibs-4.14.0/akonadi/tagfetchscope.cpp     2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/tagfetchscope.cpp     2014-09-10 
22:48:29.000000000 +0200
@@ -24,7 +24,13 @@
 
 struct Akonadi::TagFetchScope::Private
 {
+    Private()
+    : mFetchIdOnly(false)
+    {
+    }
+
     QSet<QByteArray> mAttributes;
+    bool mFetchIdOnly;
 };
 
 TagFetchScope::TagFetchScope()
@@ -46,6 +52,7 @@
 TagFetchScope &TagFetchScope::operator=(const TagFetchScope &other)
 {
     d->mAttributes = other.d->mAttributes;
+    d->mFetchIdOnly = other.d->mFetchIdOnly;
     return *this;
 }
 
@@ -62,3 +69,15 @@
         d->mAttributes.remove(type);
     }
 }
+
+void TagFetchScope::setFetchIdOnly(bool idOnly)
+{
+    d->mFetchIdOnly = idOnly;
+    d->mAttributes.clear();
+}
+
+bool TagFetchScope::fetchIdOnly() const
+{
+    return d->mFetchIdOnly;
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/tagfetchscope.h 
new/kdepimlibs-4.14.1/akonadi/tagfetchscope.h
--- old/kdepimlibs-4.14.0/akonadi/tagfetchscope.h       2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/tagfetchscope.h       2014-09-10 
22:48:29.000000000 +0200
@@ -85,6 +85,23 @@
         fetchAttribute(dummy.type(), fetch);
     }
 
+    /**
+     * Sets wether only the id or the complete tag should be fetched.
+     *
+     * The default is @c false.
+     *
+     * @since 4.15
+     */
+    void setFetchIdOnly(bool fetchIdOnly);
+
+    /**
+     * Sets wether only the id of the tags should be retieved or the complete 
tag.
+     *
+     * @see tagFetchScope()
+     * @since 4.15
+     */
+    bool fetchIdOnly() const;
+
 private:
     class Private;
     //@cond PRIVATE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/tests/tagtest.cpp 
new/kdepimlibs-4.14.1/akonadi/tests/tagtest.cpp
--- old/kdepimlibs-4.14.0/akonadi/tests/tagtest.cpp     2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/tests/tagtest.cpp     2014-09-10 
22:48:29.000000000 +0200
@@ -54,6 +54,10 @@
     void testCreateMerge();
     void testAttributes();
     void testTagItem();
+    void testFetchTagIdWithItem();
+    void testFetchFullTagWithItem();
+    void testModifyItemWithTagByGID();
+    void testModifyItemWithTagByRID();
     void testMonitor();
 };
 
@@ -65,6 +69,13 @@
     qRegisterMetaType<Akonadi::Tag>();
     qRegisterMetaType<QSet<Akonadi::Tag> >();
     qRegisterMetaType<Akonadi::Item::List>();
+
+    // Delete the default Knut tag - it's interfering with this test
+    TagFetchJob *fetchJob = new TagFetchJob(this);
+    AKVERIFYEXEC(fetchJob);
+    QCOMPARE(fetchJob->tags().size(), 1);
+    TagDeleteJob *deleteJob = new TagDeleteJob(fetchJob->tags().first(), this);
+    AKVERIFYEXEC(deleteJob);
 }
 
 void TagTest::testCreateFetch()
@@ -337,6 +348,150 @@
     QCOMPARE(fetchJob->items().first().tags().size(), 1);
 }
 
+void TagTest::testFetchTagIdWithItem()
+{
+    const Collection res3 = Collection( collectionIdFromPath( "res3" ) );
+    Tag tag;
+    {
+        TagCreateJob *createjob = new TagCreateJob(Tag("gid1"), this);
+        AKVERIFYEXEC(createjob);
+        tag = createjob->tag();
+    }
+
+    Item item1;
+    {
+        item1.setMimeType( "application/octet-stream" );
+        ItemCreateJob *append = new ItemCreateJob(item1, res3, this);
+        AKVERIFYEXEC(append);
+        item1 = append->item();
+
+        // FIXME This should also be possible with create, but isn't
+        item1.setTag(tag);
+
+        ItemModifyJob *modJob = new ItemModifyJob(item1, this);
+        AKVERIFYEXEC(modJob);
+    }
+
+    ItemFetchJob *fetchJob = new ItemFetchJob(item1, this);
+    fetchJob->fetchScope().setFetchTags(true);
+    fetchJob->fetchScope().tagFetchScope().setFetchIdOnly(true);
+    AKVERIFYEXEC(fetchJob);
+    QCOMPARE(fetchJob->items().first().tags().size(), 1);
+    Tag t = fetchJob->items().first().tags().first();
+    QCOMPARE(t.id(), tag.id());
+    QVERIFY(t.gid().isEmpty());
+
+    TagDeleteJob *deleteJob = new TagDeleteJob(tag, this);
+    AKVERIFYEXEC(deleteJob);
+}
+
+void TagTest::testFetchFullTagWithItem()
+{
+    const Collection res3 = Collection( collectionIdFromPath( "res3" ) );
+    Tag tag;
+    {
+        TagCreateJob *createjob = new TagCreateJob(Tag("gid1"), this);
+        AKVERIFYEXEC(createjob);
+        tag = createjob->tag();
+    }
+
+    Item item1;
+    {
+        item1.setMimeType( "application/octet-stream" );
+        ItemCreateJob *append = new ItemCreateJob(item1, res3, this);
+        AKVERIFYEXEC(append);
+        item1 = append->item();
+        //FIXME This should also be possible with create, but isn't
+        item1.setTag(tag);
+    }
+
+    ItemModifyJob *modJob = new ItemModifyJob(item1, this);
+    AKVERIFYEXEC(modJob);
+
+    ItemFetchJob *fetchJob = new ItemFetchJob(item1, this);
+    fetchJob->fetchScope().setFetchTags(true);
+    fetchJob->fetchScope().tagFetchScope().setFetchIdOnly(false);
+    AKVERIFYEXEC(fetchJob);
+    QCOMPARE(fetchJob->items().first().tags().size(), 1);
+    Tag t = fetchJob->items().first().tags().first();
+    QCOMPARE(t, tag);
+    QVERIFY(!t.gid().isEmpty());
+
+    TagDeleteJob *deleteJob = new TagDeleteJob(tag, this);
+    AKVERIFYEXEC(deleteJob);
+}
+
+void TagTest::testModifyItemWithTagByGID()
+{
+    const Collection res3 = Collection( collectionIdFromPath( "res3" ) );
+    {
+        Tag tag;
+        tag.setGid("gid2");
+        TagCreateJob *createjob = new TagCreateJob(tag, this);
+        AKVERIFYEXEC(createjob);
+    }
+
+    Item item1;
+    {
+        item1.setMimeType( "application/octet-stream" );
+        ItemCreateJob *append = new ItemCreateJob(item1, res3, this);
+        AKVERIFYEXEC(append);
+        item1 = append->item();
+    }
+
+    Tag tag;
+    tag.setGid("gid2");
+    item1.setTag(tag);
+
+    ItemModifyJob *modJob = new ItemModifyJob(item1, this);
+    AKVERIFYEXEC(modJob);
+
+    ItemFetchJob *fetchJob = new ItemFetchJob(item1, this);
+    fetchJob->fetchScope().setFetchTags(true);
+    AKVERIFYEXEC(fetchJob);
+    QCOMPARE(fetchJob->items().first().tags().size(), 1);
+}
+
+void TagTest::testModifyItemWithTagByRID()
+{
+    {
+        ResourceSelectJob *select = new 
ResourceSelectJob("akonadi_knut_resource_0");
+        AKVERIFYEXEC(select);
+    }
+    const Collection res3 = Collection( collectionIdFromPath( "res3" ) );
+    {
+        Tag tag;
+        tag.setGid("gid3");
+        tag.setRemoteId("rid3");
+        TagCreateJob *createjob = new TagCreateJob(tag, this);
+        AKVERIFYEXEC(createjob);
+    }
+
+    Item item1;
+    {
+        item1.setMimeType( "application/octet-stream" );
+        ItemCreateJob *append = new ItemCreateJob(item1, res3, this);
+        AKVERIFYEXEC(append);
+        item1 = append->item();
+    }
+
+    Tag tag;
+    tag.setRemoteId("rid2");
+    item1.setTag(tag);
+
+    ItemModifyJob *modJob = new ItemModifyJob(item1, this);
+    AKVERIFYEXEC(modJob);
+
+    ItemFetchJob *fetchJob = new ItemFetchJob(item1, this);
+    fetchJob->fetchScope().setFetchTags(true);
+    AKVERIFYEXEC(fetchJob);
+    QCOMPARE(fetchJob->items().first().tags().size(), 1);
+    {
+        ResourceSelectJob *select = new ResourceSelectJob("");
+        AKVERIFYEXEC(select);
+    }
+}
+
 void TagTest::testMonitor()
 {
   Akonadi::Monitor monitor;
@@ -347,9 +502,10 @@
   {
     QSignalSpy addedSpy(&monitor, SIGNAL(tagAdded(Akonadi::Tag)));
     QVERIFY(addedSpy.isValid());
-    Tag tag("gid2");
-    tag.attribute<Akonadi::TagAttribute>(AttributeEntity::AddIfMissing);
-    QVERIFY(tag.hasAttribute<Akonadi::TagAttribute>());
+    Tag tag;
+    tag.setGid("gid2");
+    tag.setName("name2");
+    tag.setType("type2");
     TagCreateJob *createjob = new TagCreateJob(tag, this);
     AKVERIFYEXEC(createjob);
     //We usually pick up signals from the previous tests as well (due to 
server-side notification caching)
@@ -360,6 +516,19 @@
   }
 
   {
+    QSignalSpy modifedSpy(&monitor, SIGNAL(tagChanged(Akonadi::Tag)));
+    QVERIFY(modifedSpy.isValid());
+    createdTag.setName("name3");
+
+    TagModifyJob *modJob = new TagModifyJob(createdTag, this);
+    AKVERIFYEXEC(modJob);
+    //We usually pick up signals from the previous tests as well (due to 
server-side notification caching)
+    QTRY_VERIFY(modifedSpy.count() >= 1);
+    QTRY_COMPARE(modifedSpy.last().first().value<Akonadi::Tag>().id(), 
createdTag.id());
+    
QVERIFY(modifedSpy.last().first().value<Akonadi::Tag>().hasAttribute<Akonadi::TagAttribute>());
+  }
+
+  {
     QSignalSpy removedSpy(&monitor, SIGNAL(tagRemoved(Akonadi::Tag)));
     QVERIFY(removedSpy.isValid());
     TagDeleteJob *deletejob = new TagDeleteJob(createdTag, this);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kdepimlibs-4.14.0/akonadi/tests/testresource/knutresource.cpp 
new/kdepimlibs-4.14.1/akonadi/tests/testresource/knutresource.cpp
--- old/kdepimlibs-4.14.0/akonadi/tests/testresource/knutresource.cpp   
2014-08-13 09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/tests/testresource/knutresource.cpp   
2014-09-10 22:48:29.000000000 +0200
@@ -31,6 +31,7 @@
 #include <akonadi/dbusconnectionpool.h>
 #include <akonadi/item.h>
 #include <akonadi/itemfetchscope.h>
+#include <akonadi/tagcreatejob.h>
 
 #include <kfiledialog.h>
 #include <klocale.h>
@@ -131,6 +132,11 @@
 {
   const Collection::List collections = mDocument.collections();
   collectionsRetrieved( collections );
+  const Tag::List tags = mDocument.tags();
+  Q_FOREACH ( const Tag &tag, tags ) {
+      TagCreateJob *createjob = new TagCreateJob(tag);
+      createjob->setMergeIfExisting(true);
+  }
 }
 
 void KnutResource::retrieveItems( const Akonadi::Collection &collection )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kdepimlibs-4.14.0/akonadi/tests/testresource/knutresource.desktop 
new/kdepimlibs-4.14.1/akonadi/tests/testresource/knutresource.desktop
--- old/kdepimlibs-4.14.0/akonadi/tests/testresource/knutresource.desktop       
2014-08-13 09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/tests/testresource/knutresource.desktop       
2014-09-10 22:48:29.000000000 +0200
@@ -27,6 +27,7 @@
 Name[pt_BR]=Knut
 Name[ru]=Knut
 Name[sk]=Knut
+Name[sl]=Knut
 Name[sr]=КНУТ
 Name[sr@ijekavian]=КНУТ
 Name[sr@ijekavianlatin]=KNUT
@@ -64,6 +65,7 @@
 Comment[pt_BR]=Um agente para depuração
 Comment[ru]=Агент Akonadi для целей отладки
 Comment[sk]=Agent na ladiace účely
+Comment[sl]=Posrednik za namene razhroščevanja
 Comment[sr]=Агент за исправљање
 Comment[sr@ijekavian]=Агент за исправљање
 Comment[sr@ijekavianlatin]=Agent za ispravljanje
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kdepimlibs-4.14.0/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop
 
new/kdepimlibs-4.14.1/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop
--- 
old/kdepimlibs-4.14.0/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop
        2014-08-13 09:43:09.000000000 +0200
+++ 
new/kdepimlibs-4.14.1/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop
        2014-09-10 22:48:29.000000000 +0200
@@ -14,6 +14,7 @@
 Name[fr]=Module externe de test pour les recherches Akonadi
 Name[gl]=Engadido de busca de proba de Akonadi
 Name[hu]=Akonadi teszt keresés bővítmény
+Name[ia]=Plug-in de Cerca de Test de Akonadi
 Name[it]=Estensione di test per la ricerca di Akonadi
 Name[ko]=Akonadi 테스트 검색 플러그인
 Name[nb]=Akonadi test-tillegg for søk
@@ -24,6 +25,7 @@
 Name[pt_BR]=Plugin de teste de pesquisa do Akonadi
 Name[ru]=Тестовый модуль поиска для Akonadi
 Name[sk]=Testovací plugin hľadania Akonadi
+Name[sl]=Preizkusni iskalni vstavek za Akonadi
 Name[sr]=Пробни прикључак за претрагу над Аконадијем
 Name[sr@ijekavian]=Пробни прикључак за претрагу над Аконадијем
 Name[sr@ijekavianlatin]=Probni priključak za pretragu nad Akonadijem
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kdepimlibs-4.14.0/akonadi/tests/unittestenv/kdehome/testdata-res1.xml 
new/kdepimlibs-4.14.1/akonadi/tests/unittestenv/kdehome/testdata-res1.xml
--- old/kdepimlibs-4.14.0/akonadi/tests/unittestenv/kdehome/testdata-res1.xml   
2014-08-13 09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/tests/unittestenv/kdehome/testdata-res1.xml   
2014-09-10 22:48:29.000000000 +0200
@@ -18,6 +18,7 @@
     <payload>testmailbody1</payload>
     <attribute type="HEAD">From: &lt;[email protected]&gt;</attribute>
     <flag>\FLAGGED</flag>
+    <tag>tagrid</tag>
    </item>
    <item rid="C" mimetype="application/octet-stream">
     <payload>testmailbody2</payload>
@@ -73,4 +74,5 @@
    </item>
   </collection>
  </collection>
+ <tag name="name" type="type" gid="taggid" rid="tagrid"></tag>
 </knut>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/xml/akonadi-xml.xsd 
new/kdepimlibs-4.14.1/akonadi/xml/akonadi-xml.xsd
--- old/kdepimlibs-4.14.0/akonadi/xml/akonadi-xml.xsd   2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/xml/akonadi-xml.xsd   2014-09-10 
22:48:29.000000000 +0200
@@ -26,6 +26,7 @@
      <xsd:sequence>
        <xsd:element name="collection" type="collectionType" minOccurs="0" 
maxOccurs="unbounded"/>
        <xsd:element name="item"       type="itemType"       minOccurs="0" 
maxOccurs="unbounded"/>
+       <xsd:element name="tag"        type="tagType"        minOccurs="0" 
maxOccurs="unbounded"/>
      </xsd:sequence>
    </xsd:complexType>
   </xsd:element>
@@ -46,11 +47,22 @@
       <xsd:element name="payload"    type="payloadType"   minOccurs="0" 
maxOccurs="1"/>
       <xsd:element name="attribute"  type="attributeType" minOccurs="0" 
maxOccurs="unbounded"/>
       <xsd:element name="flag"       type="flagType"      minOccurs="0" 
maxOccurs="unbounded"/>
+      <xsd:element name="tag"        type="tagRIDRefType"    minOccurs="0" 
maxOccurs="unbounded"/>
     </xsd:sequence>
     <xsd:attribute name="rid"        type="xsd:string" use="required"/>
     <xsd:attribute name="mimetype"   type="xsd:string" use="required"/>
   </xsd:complexType>
 
+  <xsd:complexType name="tagType">
+    <xsd:sequence>
+      <xsd:element name="tag"        type="tagType"       minOccurs="0" 
maxOccurs="unbounded"/>
+    </xsd:sequence>
+    <xsd:attribute name="rid"        type="xsd:string" use="required"/>
+    <xsd:attribute name="type"       type="xsd:string" use="required"/>
+    <xsd:attribute name="gid"        type="xsd:string" use="required"/>
+    <xsd:attribute name="name"       type="xsd:string" use="required"/>
+  </xsd:complexType>
+
   <xsd:complexType name="payloadType">
     <xsd:simpleContent>
       <xsd:extension base="xsd:string"/>
@@ -69,6 +81,12 @@
     <xsd:simpleContent>
       <xsd:extension base="xsd:string"/>
     </xsd:simpleContent>
+  </xsd:complexType>
+
+  <xsd:complexType name="tagRIDRefType">
+    <xsd:simpleContent>
+      <xsd:extension base="xsd:string"/>
+    </xsd:simpleContent>
   </xsd:complexType>
 
 </xsd:schema>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/xml/format_p.h 
new/kdepimlibs-4.14.1/akonadi/xml/format_p.h
--- old/kdepimlibs-4.14.0/akonadi/xml/format_p.h        2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/xml/format_p.h        2014-09-10 
22:48:29.000000000 +0200
@@ -33,6 +33,7 @@
   inline QString item() { return QString::fromLatin1( "item" ); }
   inline QString attribute() { return QString::fromLatin1( "attribute" ); }
   inline QString flag() { return QString::fromLatin1( "flag" ); }
+  inline QString tag() { return QString::fromLatin1( "tag" ); }
   inline QString payload() { return QString::fromLatin1( "payload" ); }
 
 }
@@ -44,6 +45,9 @@
   inline QString collectionName() { return QString::fromLatin1( "name" ); }
   inline QString collectionContentTypes() { return QString::fromLatin1( 
"content" ); }
   inline QString itemMimeType() { return QString::fromLatin1( "mimetype" ); }
+  inline QString name() { return QString::fromLatin1( "name" ); }
+  inline QString gid() { return QString::fromLatin1( "gid" ); }
+  inline QString type() { return QString::fromLatin1( "type" ); }
 
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/xml/xmldocument.cpp 
new/kdepimlibs-4.14.1/akonadi/xml/xmldocument.cpp
--- old/kdepimlibs-4.14.0/akonadi/xml/xmldocument.cpp   2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/xml/xmldocument.cpp   2014-09-10 
22:48:29.000000000 +0200
@@ -271,6 +271,11 @@
   return XmlReader::readCollections( d->document.documentElement() );
 }
 
+Tag::List XmlDocument::tags() const
+{
+  return XmlReader::readTags( d->document.documentElement() );
+}
+
 Collection::List XmlDocument::childCollections(const QString& 
parentCollectionRid) const
 {
   Collection c;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/xml/xmldocument.h 
new/kdepimlibs-4.14.1/akonadi/xml/xmldocument.h
--- old/kdepimlibs-4.14.0/akonadi/xml/xmldocument.h     2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/xml/xmldocument.h     2014-09-10 
22:48:29.000000000 +0200
@@ -114,6 +114,11 @@
     Collection::List collections() const;
 
     /**
+      Returns the tags defined in this document.
+    */
+    Tag::List tags() const;
+
+    /**
       Returns immediate child collections of the specified parent collection.
       @deprecated Not HRID aware, use childCollections( Akonadi::Collection ) 
instead
     */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/xml/xmlreader.cpp 
new/kdepimlibs-4.14.1/akonadi/xml/xmlreader.cpp
--- old/kdepimlibs-4.14.0/akonadi/xml/xmlreader.cpp     2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/xml/xmlreader.cpp     2014-09-10 
22:48:29.000000000 +0200
@@ -22,6 +22,7 @@
 #include "format_p.h"
 
 #include <akonadi/attributefactory.h>
+#include <akonadi/tag.h>
 
 #include <QStringList>
 
@@ -85,6 +86,45 @@
   return rv;
 }
 
+Tag XmlReader::elementToTag(const QDomElement& elem)
+{
+  if ( elem.isNull() || elem.tagName() != Format::Tag::tag() )
+    return Tag();
+
+  Tag t;
+  t.setRemoteId( elem.attribute( Format::Attr::remoteId() ).toUtf8() );
+  t.setName( elem.attribute( Format::Attr::name() ) );
+  t.setGid( elem.attribute( Format::Attr::gid() ).toUtf8() );
+  t.setType( elem.attribute( Format::Attr::type() ).toUtf8() );
+
+  //TODO Implement rid parent support in TagCreateJob first
+  // const QDomElement parentElem = elem.parentNode().toElement();
+  // if ( !parentElem.isNull() && parentElem.tagName() == Format::Tag::tag() ) 
{
+  //   Tag parent;
+  //   parent.setRemoteId( parentElem.attribute( Format::Attr::remoteId() 
).toLatin1() );
+  //   t.setParent( parent );
+  // }
+
+  return t;
+}
+
+Tag::List XmlReader::readTags(const QDomElement& elem)
+{
+  Tag::List rv;
+  if ( elem.isNull() )
+    return rv;
+  if ( elem.tagName() == Format::Tag::tag() )
+    rv += elementToTag( elem );
+  const QDomNodeList children = elem.childNodes();
+  for ( int i = 0; i < children.count(); i++ ) {
+    const QDomElement child = children.at( i ).toElement();
+    if ( child.isNull() || child.tagName() != Format::Tag::tag() )
+      continue;
+    rv += readTags( child );
+  }
+  return rv;
+}
+
 Item XmlReader::elementToItem(const QDomElement& elem, bool includePayload)
 {
   Item item( elem.attribute( Format::Attr::itemMimeType(), 
QLatin1String("application/octet-stream") ) );
@@ -98,6 +138,10 @@
       continue;
     if ( subElem.tagName() == Format::Tag::flag() ) {
       item.setFlag( subElem.text().toUtf8() );
+    } else if ( subElem.tagName() == Format::Tag::tag() ) {
+      Tag tag;
+      tag.setRemoteId( subElem.text().toUtf8() );
+      item.setTag( tag );
     } else if ( includePayload && subElem.tagName() == Format::Tag::payload() 
) {
       const QByteArray payloadData = subElem.text().toUtf8();
       item.setPayloadFromData( payloadData );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/akonadi/xml/xmlreader.h 
new/kdepimlibs-4.14.1/akonadi/xml/xmlreader.h
--- old/kdepimlibs-4.14.0/akonadi/xml/xmlreader.h       2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/akonadi/xml/xmlreader.h       2014-09-10 
22:48:29.000000000 +0200
@@ -60,6 +60,16 @@
   AKONADI_XML_EXPORT Collection::List readCollections( const QDomElement &elem 
);
 
   /**
+    Converts a tag element.
+  */
+  AKONADI_XML_EXPORT Tag elementToTag( const QDomElement &elem );
+
+  /**
+    Reads recursively all tags starting from the given DOM element.
+  */
+  AKONADI_XML_EXPORT Tag::List readTags( const QDomElement &elem );
+
+  /**
     Converts an item element.
   */
   AKONADI_XML_EXPORT Item elementToItem( const QDomElement &elem, bool 
includePayload = true );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/kabc/plugins/dir/dir.desktop 
new/kdepimlibs-4.14.1/kabc/plugins/dir/dir.desktop
--- old/kdepimlibs-4.14.0/kabc/plugins/dir/dir.desktop  2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/kabc/plugins/dir/dir.desktop  2014-09-10 
22:48:29.000000000 +0200
@@ -78,6 +78,7 @@
 Comment[pt_BR]=Fornece acesso aos contatos, cada um armazenado em um único 
arquivo, em uma pasta informada. Suporta o formato de arquivos vCard padrão e 
outros formatos, dependendo da disponibilidade de plugins.
 Comment[ru]=Предоставляет доступ к контактам, хранящимся в отдельных файлах в 
заданной папке. Поддерживает стандартный формат vCard и другие форматы при 
наличии соответствующих модулей.
 Comment[sk]=Poskytuje prístup ku kontaktom, každý uložený v samostatnom súbore 
v danom adresári. Podporuje štandardný vCard súbor a ostatné formáty v 
závislosti od dostupnosti zásuvných modulov.
+Comment[sl]=Nudi dostop do stikov, ki so vsak posebej shranjeni v eni 
datoteki, v dani mapi. Podpira običajne datoteke VCard in druge vrste, odvisno 
od razpoložljivosti vstavkov.
 Comment[sr]=Пружа приступ контактима складиштеним у појединачним фајловима у 
датој фасцикли. Подржава стандардне в‑кард фајлове и друге формате, према 
расположивим прикључцима.
 Comment[sr@ijekavian]=Пружа приступ контактима складиштеним у појединачним 
фајловима у датој фасцикли. Подржава стандардне в‑кард фајлове и друге формате, 
према расположивим прикључцима.
 Comment[sr@ijekavianlatin]=Pruža pristup kontaktima skladištenim u 
pojedinačnim fajlovima u datoj fascikli. Podržava standardne vCard fajlove i 
druge formate, prema raspoloživim priključcima.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/kabc/plugins/file/file.desktop 
new/kdepimlibs-4.14.1/kabc/plugins/file/file.desktop
--- old/kdepimlibs-4.14.0/kabc/plugins/file/file.desktop        2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/kabc/plugins/file/file.desktop        2014-09-10 
22:48:29.000000000 +0200
@@ -83,6 +83,7 @@
 Comment[pt_BR]=Fornece acesso aos contatos armazenados em um único arquivo 
local. Suporta o formato de arquivos vCard padrão e outros formatos, dependendo 
da disponibilidade de plugins.
 Comment[ru]=Предоставляет доступ к контактам, хранящимся в одном локальном 
файле. Поддерживает стандартный формат vCard и другие форматы при наличии 
соответствующих модулей.
 Comment[sk]=Poskytuje prístup ku kontaktom uloženým v samostatnom lokálnom 
súbore. Podporuje štandardný vCard súbor a ostatné formáty v závislosti od 
dostupnosti zásuvných modulov.
+Comment[sl]=Nudi dostop do stikov, ki so shranjeni v eni sami krajevni 
datoteki. Podpira običajne datoteke VCard in druge vrste, odvisno od 
razpoložljivosti vstavkov.
 Comment[sr]=Пружа приступ контактима складиштеним у једном локалном фајлу. 
Подржава стандардне в‑кард фајлове и друге формате, према расположивим 
прикључцима.
 Comment[sr@ijekavian]=Пружа приступ контактима складиштеним у једном локалном 
фајлу. Подржава стандардне в‑кард фајлове и друге формате, према расположивим 
прикључцима.
 Comment[sr@ijekavianlatin]=Pruža pristup kontaktima skladištenim u jednom 
lokalnom fajlu. Podržava standardne vCard fajlove i druge formate, prema 
raspoloživim priključcima.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/kabc/plugins/net/net.desktop 
new/kdepimlibs-4.14.1/kabc/plugins/net/net.desktop
--- old/kdepimlibs-4.14.0/kabc/plugins/net/net.desktop  2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/kabc/plugins/net/net.desktop  2014-09-10 
22:48:29.000000000 +0200
@@ -83,6 +83,7 @@
 Comment[pt_BR]=Fornece acesso aos contatos em arquivos remotos usando o KIO 
framework de rede do KDE. O suporte a arquivos vCard padrão e outros formatos 
dependem da disponibilidade de plugins.
 Comment[ru]=Предоставляет доступ к контактам в удалённых файлах, используя 
сетевую подсистему KDE KIO. Поддерживает стандартный формат vCard и другие 
форматы при наличии соответствующих модулей.
 Comment[sk]=Poskytuje prístup ku kontaktom vo vzdialených súboroch s použitím 
KDE sieťového rámca KIO. Podporuje štandardný vCard súbor a ostatné formáty v 
závislosti od dostupnosti zásuvných modulov.
+Comment[sl]=Nudi dostop do stikov v oddaljenih datotekah z uporabo KDE-jevega 
ogrodja KIO. Podpira običajne datoteke VCard in druge vrste, odvisno od 
razpoložljivosti vstavkov.
 Comment[sr]=Пружа приступ контактима у удаљеним фајловима преко КДЕ‑овог 
мрежног радног оквира К‑У/И. Подржава стандардне в‑кард фајлове и друге 
формате, према расположивим прикључцима.
 Comment[sr@ijekavian]=Пружа приступ контактима у удаљеним фајловима преко 
КДЕ‑овог мрежног радног оквира К‑У/И. Подржава стандардне в‑кард фајлове и 
друге формате, према расположивим прикључцима.
 Comment[sr@ijekavianlatin]=Pruža pristup kontaktima u udaljenim fajlovima 
preko KDE‑ovog mrežnog radnog okvira K‑U/I. Podržava standardne vCard fajlove i 
druge formate, prema raspoloživim priključcima.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/kalarmcal/alarmtext.cpp 
new/kdepimlibs-4.14.1/kalarmcal/alarmtext.cpp
--- old/kdepimlibs-4.14.0/kalarmcal/alarmtext.cpp       2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/kalarmcal/alarmtext.cpp       2014-09-10 
22:48:29.000000000 +0200
@@ -379,7 +379,7 @@
 */
 bool AlarmText::checkIfEmail(const QString& text)
 {
-    QStringList lines = text.split(QLatin1Char('\n'), QString::SkipEmptyParts);
+    const QStringList lines = text.split(QLatin1Char('\n'), 
QString::SkipEmptyParts);
     return Private::emailHeaderCount(lines);
 }
 
@@ -391,7 +391,7 @@
 QString AlarmText::emailHeaders(const QString& text, bool subjectOnly)
 {
     const QStringList lines = text.split(QLatin1Char('\n'), 
QString::SkipEmptyParts);
-    int n = Private::emailHeaderCount(lines);
+    const int n = Private::emailHeaderCount(lines);
     if (!n)
         return QString();
     if (subjectOnly)
@@ -415,7 +415,7 @@
 {
     Private::initialise();
     const QStringList lines = text.split(QLatin1Char('\n'), 
QString::SkipEmptyParts);
-    int maxn = lines.count();
+    const int maxn = lines.count();
     if (maxn >= 4
     &&  lines[0].startsWith(Private::mFromPrefixEn)
     &&  lines[1].startsWith(Private::mToPrefixEn))
@@ -455,7 +455,7 @@
 {
     Private::setUpTranslations();
     const QStringList lines = text.split(QLatin1Char('\n'), 
QString::SkipEmptyParts);
-    int maxn = lines.count();
+    const int maxn = lines.count();
     if (maxn >= 4
     &&  lines[0].startsWith(Private::mFromPrefix)
     &&  lines[1].startsWith(Private::mToPrefix))
@@ -524,7 +524,7 @@
 int AlarmText::Private::emailHeaderCount(const QStringList& lines)
 {
     setUpTranslations();
-    int maxn = lines.count();
+    const int maxn = lines.count();
     if (maxn >= 4
     &&  lines[0].startsWith(mFromPrefix)
     &&  lines[1].startsWith(mToPrefix))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/kalarmcal/collectionattribute.cpp 
new/kdepimlibs-4.14.1/kalarmcal/collectionattribute.cpp
--- old/kdepimlibs-4.14.0/kalarmcal/collectionattribute.cpp     2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/kalarmcal/collectionattribute.cpp     2014-09-10 
22:48:29.000000000 +0200
@@ -206,7 +206,7 @@
     bool ok;
     int c[4];
     const QList<QByteArray> items = data.simplified().split(' ');
-    int count = items.count();
+    const int count = items.count();
     int index = 0;
     if (count > index)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kdepimlibs-4.14.0/kalarmcal/compatibilityattribute.cpp 
new/kdepimlibs-4.14.1/kalarmcal/compatibilityattribute.cpp
--- old/kdepimlibs-4.14.0/kalarmcal/compatibilityattribute.cpp  2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/kalarmcal/compatibilityattribute.cpp  2014-09-10 
22:48:29.000000000 +0200
@@ -102,8 +102,8 @@
 
 QByteArray CompatibilityAttribute::serialized() const
 {
-    QByteArray v = QByteArray::number(d->mCompatibility) + ' '
-                 + QByteArray::number(d->mVersion);
+    const QByteArray v = QByteArray::number(d->mCompatibility) + ' '
+                       + QByteArray::number(d->mVersion);
     kDebug() << v;
     return v;
 }
@@ -118,13 +118,13 @@
 
     bool ok;
     const QList<QByteArray> items = data.simplified().split(' ');
-    int count = items.count();
+    const int count = items.count();
     int index = 0;
     if (count > index)
     {
         // 0: calendar format compatibility
-        int c = items[index++].toInt(&ok);
-        KACalendar::Compat AllCompat(KACalendar::Current | 
KACalendar::Converted | KACalendar::Convertible | KACalendar::Incompatible | 
KACalendar::Unknown);
+        const int c = items[index++].toInt(&ok);
+        const KACalendar::Compat AllCompat(KACalendar::Current | 
KACalendar::Converted | KACalendar::Convertible | KACalendar::Incompatible | 
KACalendar::Unknown);
         if (!ok  ||  (c & AllCompat) != c)
         {
             kError() << "Invalid compatibility:" << c;
@@ -135,7 +135,7 @@
     if (count > index)
     {
         // 1: KAlarm calendar version number
-        int c = items[index++].toInt(&ok);
+        const int c = items[index++].toInt(&ok);
         if (!ok)
         {
             kError() << "Invalid version:" << c;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/kalarmcal/eventattribute.cpp 
new/kdepimlibs-4.14.1/kalarmcal/eventattribute.cpp
--- old/kdepimlibs-4.14.0/kalarmcal/eventattribute.cpp  2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/kalarmcal/eventattribute.cpp  2014-09-10 
22:48:29.000000000 +0200
@@ -84,7 +84,7 @@
 
 QByteArray EventAttribute::serialized() const
 {
-    QByteArray v = QByteArray::number(d->mCommandError);
+    const QByteArray v = QByteArray::number(d->mCommandError);
     kDebug() << v;
     return v;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/kalarmcal/kacalendar.cpp 
new/kdepimlibs-4.14.1/kalarmcal/kacalendar.cpp
--- old/kdepimlibs-4.14.0/kalarmcal/kacalendar.cpp      2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/kalarmcal/kacalendar.cpp      2014-09-10 
22:48:29.000000000 +0200
@@ -131,9 +131,9 @@
 {
     QString subVersion;
 #ifndef KALARMCAL_USE_KRESOURCES
-    int version = Private::readKAlarmVersion(fileStorage, subVersion, 
versionString);
+    const int version = Private::readKAlarmVersion(fileStorage, subVersion, 
versionString);
 #else
-    int version = Private::readKAlarmVersion(calendar, localFile, subVersion, 
versionString);
+    const int version = Private::readKAlarmVersion(calendar, localFile, 
subVersion, versionString);
 #endif
     if (version == CurrentFormat)
         return CurrentFormat;       // calendar is in the current KAlarm format
@@ -205,9 +205,9 @@
             // Check whether the calendar file is empty, in which case
             // it can be written to freely.
 #ifndef KALARMCAL_USE_KRESOURCES
-            QFileInfo fi(fileStorage->fileName());
+            const QFileInfo fi(fileStorage->fileName());
 #else
-            QFileInfo fi(localFile);
+            const QFileInfo fi(localFile);
 #endif
             if (!fi.size())
                 return KACalendar::CurrentFormat;
@@ -229,7 +229,7 @@
         // Extract the KAlarm version string
         versionString = prodid.mid(i + progname.length()).trimmed();
         i = versionString.indexOf(QLatin1Char('/'));
-        int j = versionString.indexOf(QLatin1Char(' '));
+        const int j = versionString.indexOf(QLatin1Char(' '));
         if (j >= 0  &&  j < i)
             i = j;
         if (i <= 0)
@@ -238,7 +238,7 @@
     }
     if (versionString == 
QLatin1String(KAEvent::currentCalendarVersionString()))
         return KACalendar::CurrentFormat;      // the calendar is in the 
current KAlarm format
-    int ver = KAlarmCal::getVersionNumber(versionString, &subVersion);
+    const int ver = KAlarmCal::getVersionNumber(versionString, &subVersion);
     if (ver == KAEvent::currentCalendarVersion())
         return KACalendar::CurrentFormat;      // the calendar is in the 
current KAlarm format
     return KAlarmCal::getVersionNumber(versionString, &subVersion);
@@ -258,7 +258,7 @@
         return false;
     QTextStream ts(&file);
     ts.setCodec("ISO 8859-1");
-    QByteArray text = ts.readAll().toLocal8Bit();
+    const QByteArray text = ts.readAll().toLocal8Bit();
     file.close();
 
     // Extract the CREATED property for the first VEVENT from the calendar
@@ -401,7 +401,7 @@
         param->clear();
     if (!event)
         return EMPTY;
-    Alarm::List alarms = event->alarms();
+    const Alarm::List alarms = event->alarms();
     if (alarms.isEmpty())
         return EMPTY;
 
@@ -413,7 +413,7 @@
         PropertyMap::ConstIterator it = properties.constFind(property);
         if (it != properties.constEnd())
             return it.value();
-        int i = property.indexOf(QLatin1Char(';'));
+        const int i = property.indexOf(QLatin1Char(';'));
         if (i < 0)
             return EMPTY;
         it = properties.constFind(property.left(i));
@@ -426,7 +426,7 @@
 
     // The event either wasn't written by KAlarm, or was written by a pre-2.0 
version.
     // Check first for an old KAlarm format, which indicated the event type in 
its UID.
-    QString uid = event->uid();
+    const QString uid = event->uid();
     if (uid.indexOf(staticStrings->ARCHIVED_UID) > 0)
         return ARCHIVED;
     if (uid.indexOf(staticStrings->TEMPLATE_UID) > 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/kalarmcal/karecurrence.cpp 
new/kdepimlibs-4.14.1/kalarmcal/karecurrence.cpp
--- old/kdepimlibs-4.14.0/kalarmcal/karecurrence.cpp    2014-08-13 
09:43:09.000000000 +0200
+++ new/kdepimlibs-4.14.1/kalarmcal/karecurrence.cpp    2014-09-10 
22:48:29.000000000 +0200
@@ -218,10 +218,10 @@
                                  const KDateTime& end)
 {
     clear();
-    Feb29Type feb29Type = (f29 == -1) ? mDefaultFeb29 : 
static_cast<Feb29Type>(f29);
+    const Feb29Type feb29Type = (f29 == -1) ? mDefaultFeb29 : 
static_cast<Feb29Type>(f29);
     if (count < -1)
         return false;
-    bool dateOnly = start.isDateOnly();
+    const bool dateOnly = start.isDateOnly();
     if (!count  &&  ((!dateOnly && !end.isValid())
                   || (dateOnly && !end.date().isValid())))
         return false;
@@ -274,7 +274,7 @@
 */
 bool KARecurrence::set(const QString& icalRRULE)
 {
-    static QString RRULE = QLatin1String("RRULE:");
+    static const QString RRULE = QLatin1String("RRULE:");
     d->clear();
     if (icalRRULE.isEmpty())
         return true;
@@ -314,14 +314,13 @@
     RecurrenceRule* rrules[2];
     const RecurrenceRule::List rrulelist = mRecurrence.rRules();
     int rri = 0;
-    int rrend = rrulelist.count();
+    const int rrend = rrulelist.count();
     for (int i = 0;  i < 2  &&  rri < rrend;  ++i, ++rri)
     {
         RecurrenceRule* rrule = rrulelist[rri];
         rrules[i] = rrule;
         bool stop = true;
-        int rtype = mRecurrence.recurrenceType(rrule);
-        switch (rtype)
+        switch (mRecurrence.recurrenceType(rrule))
         {
             case Recurrence::rHourly:
                 // Convert an hourly recurrence to a minutely one
@@ -356,7 +355,7 @@
                     ||  rrule->startDt()   != rrules[0]->startDt())
                         break;
                 }
-                QList<int> ds = rrule->byYearDays();
+                const QList<int> ds = rrule->byYearDays();
                 if (!ds.isEmpty()  &&  ds.first() == 60)
                 {
                     ++convert;    // this rule needs to be converted
@@ -390,7 +389,7 @@
                     if (day == -1)
                     {
                         // Last day of the month - only combine if it's 
February
-                        QList<int> months = rrule->byMonths();
+                        const QList<int> months = rrule->byMonths();
                         if (months.count() != 1  ||  months.first() != 2)
                             day = 0;
                     }
@@ -431,7 +430,7 @@
             RecurrenceRule* rr = rrules[0];
             rrules[0] = rrules[1];    // the 29th rule
             rrules[1] = rr;
-            int d = days[0];
+            const int d = days[0];
             days[0] = days[1];
             days[1] = d;        // the non-29th day
         }
@@ -513,10 +512,10 @@
             break;
         case ANNUAL_DATE:
         {
-            QList<int> months = rrule->byMonths();
-            QList<int> days   = mRecurrence.monthDays();
-            bool special = (mFeb29Type != Feb29_None  &&  !days.isEmpty()
-                            &&  days.first() == 29  &&  months.removeAll(2));
+            QList<int>     months = rrule->byMonths();
+            const QList<int> days = mRecurrence.monthDays();
+            const bool special = (mFeb29Type != Feb29_None  &&  !days.isEmpty()
+                                  &&  days.first() == 29  &&  
months.removeAll(2));
             RecurrenceRule* rrule1 = recur.defaultRRule();
             rrule1->setByMonths(months);
             rrule1->setByMonthDays(days);
@@ -575,15 +574,15 @@
                          * all. In that case, retain it so that the February 
29th characteristic
                          * is not lost should the user later change the 
recurrence count.
                          */
-                        KDateTime end = endDateTime();
-                        int count1 = rrule1->durationTo(end)
-                                     - 
(rrule1->recursOn(mRecurrence.startDate(), 
mRecurrence.startDateTime().timeSpec()) ? 0 : 1);
+                        const KDateTime end = endDateTime();
+                        const int count1 = rrule1->durationTo(end)
+                                           - 
(rrule1->recursOn(mRecurrence.startDate(), 
mRecurrence.startDateTime().timeSpec()) ? 0 : 1);
                         if (count1 > 0)
                             rrule1->setDuration(count1);
                         else
                             rrule1->setEndDt(mRecurrence.startDateTime());
-                        int count2 = rrule2->durationTo(end)
-                                     - 
(rrule2->recursOn(mRecurrence.startDate(), 
mRecurrence.startDateTime().timeSpec()) ? 0 : 1);
+                        const int count2 = rrule2->durationTo(end)
+                                           - 
(rrule2->recursOn(mRecurrence.startDate(), 
mRecurrence.startDateTime().timeSpec()) ? 0 : 1);
                         if (count2 > 0)
                             rrule2->setDuration(count2);
                         else
@@ -951,7 +950,7 @@
         // Swap the two rules to make rr1 have the earlier end date
         rr1 = rrule2;
         rr2 = rrule1;
-        KDateTime e = end1;
+        const KDateTime e = end1;
         end1 = end2;
         end2 = e;
     }
@@ -978,7 +977,7 @@
             end = end2.date();
             return count1 + count2;
         }
-        QDate prev2 = rr2->getPreviousDate(next1).date();
+        const QDate prev2 = rr2->getPreviousDate(next1).date();
         end = (prev2 > end1.date()) ? prev2 : end1.date();
     }
     if (count2)
@@ -992,7 +991,7 @@
 */
 Duration KARecurrence::longestInterval() const
 {
-    int freq = d->mRecurrence.frequency();
+    const int freq = d->mRecurrence.frequency();
     switch (type())
     {
         case MINUTELY:
@@ -1029,7 +1028,7 @@
                         last = i;
                     }
                 }
-                int wrap = freq*7 - last + first;
+                const int wrap = freq*7 - last + first;
                 if (wrap > maxgap)
                     maxgap = wrap;
                 return Duration(maxgap, Duration::Days);
@@ -1047,13 +1046,13 @@
         {
             // Find which days of the week it recurs on, and if on more than
             // one, reduce the maximum interval accordingly.
-            QBitArray ds = d->mRecurrence.days();
+            const QBitArray ds = d->mRecurrence.days();
             int first = -1;
             int last  = -1;
             int maxgap = 1;
             // Use the user's definition of the week, starting at the
             // day of the week specified by the user's locale.
-            int weekStart = KGlobal::locale()->weekStartDay() - 1;  // 
zero-based
+            const int weekStart = KGlobal::locale()->weekStartDay() - 1;  // 
zero-based
             for (int i = 0;  i < 7;  ++i)
             {
                 // Get the standard KDE day-of-week number (zero-based)
@@ -1069,7 +1068,7 @@
             }
             if (first < 0)
                 break;    // no days recur
-            int span = last - first;
+            const int span = last - first;
             if (freq > 1)
                 return Duration(freq*7 - span, Duration::Days);
             if (7 - span > maxgap)
@@ -1099,13 +1098,13 @@
                     first = months[i];
                 else
                 {
-                    int span = QDate(2001, last, 1).daysTo(QDate(2001, 
months[i], 1));
+                    const int span = QDate(2001, last, 1).daysTo(QDate(2001, 
months[i], 1));
                     if (span > maxgap)
                         maxgap = span;
                 }
                 last = months[i];
             }
-            int span = QDate(2001, first, 1).daysTo(QDate(2001, last, 1));
+            const int span = QDate(2001, first, 1).daysTo(QDate(2001, last, 
1));
             if (freq > 1)
                 return Duration(freq*365 - span, Duration::Days);
             if (365 - span > maxgap)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdepimlibs-4.14.0/kalarmcal/version.cpp 
new/kdepimlibs-4.14.1/kalarmcal/version.cpp
--- old/kdepimlibs-4.14.0/kalarmcal/version.cpp 2014-08-13 09:43:09.000000000 
+0200
+++ new/kdepimlibs-4.14.1/kalarmcal/version.cpp 2014-09-10 22:48:29.000000000 
+0200
@@ -42,7 +42,7 @@
     //      if the representation returned by this method changes.
     if (subVersion)
         subVersion->clear();
-    int count = version.count(QLatin1Char('.')) + 1;
+    const int count = version.count(QLatin1Char('.')) + 1;
     if (count < 2)
         return 0;
     bool ok;
@@ -57,7 +57,7 @@
     {
         // Issue number: allow other characters to follow the last digit
         const QString issue = version.section(QLatin1Char('.'), 2);
-        int n = issue.length();
+        const int n = issue.length();
         if (!n  ||  !issue[0].isDigit())
             return 0;
         int i;

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

Reply via email to