[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    tags/kdesupport-for-4.4/akonadi/libs
From:       Marc Mutz <mutz () kde ! org>
Date:       2010-07-06 10:15:33
Message-ID: 20100706101533.E8E7CAC85D () svn ! kde ! org
[Download RAW message or body]

SVN commit 1146660 by mutz:

ImapSet: add add(QVector) overload and deprecate add(QList)

This is part of the quest to eradicate usage of QList<T> with sizeof(T) > sizeof(void*).

 M  +6 -1      imapset.cpp  
 M  +6 -0      imapset_p.h  


--- tags/kdesupport-for-4.4/akonadi/libs/imapset.cpp #1146659:1146660
@@ -173,7 +173,12 @@
 
 void ImapSet::add(const QList<Id> & values)
 {
-  QList<Id> vals = values;
+  add( values.toVector() );
+}
+
+void ImapSet::add(const QVector<Id> & values)
+{
+  QVector<Id> vals = values;
   qSort( vals );
   for( int i = 0; i < vals.count(); ++i ) {
     const int begin = vals[i];
--- tags/kdesupport-for-4.4/akonadi/libs/imapset_p.h #1146659:1146660
@@ -166,6 +166,12 @@
       No interval merging is performed.
       @param values List of positive integer numbers in arbitrary order
     */
+    void add( const QVector<Id> &values );
+
+    /**
+       @overload
+       @deprecated Use the QVector version instead.
+    */
     void add( const QList<Id> &values );
 
     /**
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic