[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/akonadi/server
From: Tobias Koenig <tokoe () kde ! org>
Date: 2010-07-21 16:25:16
Message-ID: 20100721162516.ABD8AAC76D () svn ! kde ! org
[Download RAW message or body]
SVN commit 1152641 by tokoe:
Use uppercase names for standard flags
M +2 -2 src/handler/akappend.cpp
M +2 -2 src/handler/append.cpp
M +2 -2 src/handler/expunge.cpp
M +1 -1 src/handler/select.cpp
M +1 -1 src/handler/status.cpp
M +1 -1 src/handlerhelper.cpp
M +6 -6 src/storage/akonadidb.xml
M +1 -1 src/storage/datastore.cpp
M +1 -1 src/storage/datastore.h
M +4 -0 src/storage/dbupdate.xml
M +8 -4 tests/unittest/dbupdatertest.cpp
--- trunk/kdesupport/akonadi/server/src/handler/akappend.cpp #1152640:1152641
@@ -160,8 +160,8 @@
// parse optional flag parenthesized list
// Syntax:
// flag-list = "(" [flag *(SP flag)] ")"
- // flag = "\Answered" / "\Flagged" / "\Deleted" / "\Seen" /
- // "\Draft" / flag-keyword / flag-extension
+ // flag = "\ANSWERED" / "\FLAGGED" / "\DELETED" / "\SEEN" /
+ // "\DRAFT" / flag-keyword / flag-extension
// ; Does not include "\Recent"
// flag-extension = "\" atom
// flag-keyword = atom
--- trunk/kdesupport/akonadi/server/src/handler/append.cpp #1152640:1152641
@@ -225,8 +225,8 @@
// parse optional flag parenthesized list
// Syntax:
// flag-list = "(" [flag *(SP flag)] ")"
- // flag = "\Answered" / "\Flagged" / "\Deleted" / "\Seen" /
- // "\Draft" / flag-keyword / flag-extension
+ // flag = "\ANSWERED" / "\FLAGGED" / "\DELETED" / "\SEEN" /
+ // "\DRAFT" / flag-keyword / flag-extension
// ; Does not include "\Recent"
// flag-extension = "\" atom
// flag-keyword = atom
--- trunk/kdesupport/akonadi/server/src/handler/expunge.cpp #1152640:1152641
@@ -45,10 +45,10 @@
DataStore *store = connection()->storageBackend();
Transaction transaction( store );
- Flag flag = Flag::retrieveByName( QLatin1String("\\Deleted") );
+ Flag flag = Flag::retrieveByName( QLatin1String("\\DELETED") );
if ( !flag.isValid() ) {
response.setError();
- response.setString( "\\Deleted flag unknown" );
+ response.setString( "\\DELETED flag unknown" );
emit responseAvailable( response );
return true;
--- trunk/kdesupport/akonadi/server/src/handler/select.cpp #1152640:1152641
@@ -107,7 +107,7 @@
response.setString( QByteArray::number( count ) + " RECENT" );
emit responseAvailable( response );
- count = HandlerHelper::itemWithoutFlagCount( col, QLatin1String( "\\Seen" ) );
+ count = HandlerHelper::itemWithoutFlagCount( col, QLatin1String( "\\SEEN" ) );
if ( count < 0 )
return failureResponse( "Unable to retrieve unseen count" );
response.setString( "OK [UNSEEN " + QByteArray::number( count ) + "] Message 0 \
is first unseen" );
--- trunk/kdesupport/akonadi/server/src/handler/status.cpp #1152640:1152641
@@ -106,7 +106,7 @@
else
statusResponse += "UNSEEN ";
- const int count = HandlerHelper::itemWithoutFlagCount( col, QLatin1String( \
"\\Seen" ) ); + const int count = HandlerHelper::itemWithoutFlagCount( col, \
QLatin1String( "\\SEEN" ) ); if ( count < 0 )
return failureResponse( "Unable to retrieve unread count" );
statusResponse += QByteArray::number( count );
--- trunk/kdesupport/akonadi/server/src/handlerhelper.cpp #1152640:1152641
@@ -203,7 +203,7 @@
if ( includeStatistics ) {
b += "MESSAGES " + QByteArray::number( HandlerHelper::itemCount( col ) ) + ' \
';
- b += "UNSEEN " + QByteArray::number( HandlerHelper::itemWithoutFlagCount( col, \
QLatin1String( "\\Seen" ) ) ) + ' '; + b += "UNSEEN " + QByteArray::number( \
HandlerHelper::itemWithoutFlagCount( col, QLatin1String( "\\SEEN" ) ) \
) + ' ';
b += "SIZE " + QByteArray::number( HandlerHelper::itemsTotalSize( col ) ) + ' \
'; }
--- trunk/kdesupport/akonadi/server/src/storage/akonadidb.xml #1152640:1152641
@@ -65,7 +65,7 @@
<table name="SchemaVersion">
<comment>Contains the schema version of the database.</comment>
<column name="version" type="int" default="0" allowNull="false"/>
- <data columns="version" values="18"/>
+ <data columns="version" values="19"/>
</table>
<table name="Resource">
@@ -137,11 +137,11 @@
<data columns="name" values="'important'"/>
<data columns="name" values="'has_attachment'"/>
<data columns="name" values="'spam'"/>
- <data columns="name" values="'\Answered'"/>
- <data columns="name" values="'\Flagged'"/>
- <data columns="name" values="'\Deleted'"/>
- <data columns="name" values="'\Seen'"/>
- <data columns="name" values="'\Draft'"/>
+ <data columns="name" values="'\ANSWERED'"/>
+ <data columns="name" values="'\FLAGGED'"/>
+ <data columns="name" values="'\DELETED'"/>
+ <data columns="name" values="'\SEEN'"/>
+ <data columns="name" values="'\DRAFT'"/>
</table>
<table name="Part">
--- trunk/kdesupport/akonadi/server/src/storage/datastore.cpp #1152640:1152641
@@ -495,7 +495,7 @@
qb.addColumn( PimItemFlagRelation::leftFullColumnName() );
- qb.addValueCondition( Flag::nameFullColumnName(), Query::Equals, \
QLatin1String("\\Deleted") ); + qb.addValueCondition( Flag::nameFullColumnName(), \
Query::Equals, QLatin1String("\\DELETED") ); qb.addValueCondition( \
PimItem::collectionIdFullColumnName(), Query::Equals, collection.id() );
if ( !qb.exec() )
--- trunk/kdesupport/akonadi/server/src/storage/datastore.h #1152640:1152641
@@ -162,7 +162,7 @@
bool cleanupPimItem( const PimItem &item );
/**
- * Cleanups all items which have the '\\Deleted' flag set
+ * Cleanups all items which have the '\\DELETED' flag set
*/
bool cleanupPimItems( const Collection &collection );
--- trunk/kdesupport/akonadi/server/src/storage/dbupdate.xml #1152640:1152641
@@ -141,4 +141,8 @@
<raw-sql backends="mysql">ALTER TABLE FlagTable CHANGE name name VARBINARY(255) \
UNIQUE;</raw-sql>
<raw-sql backends="mysql">ALTER TABLE PartTable CHANGE name name \
VARBINARY(255);</raw-sql> </update>
+ <update version="19" abortOnFailure="false">
+ <raw-sql backends="mysql,psql,sqlite,odbc">UPDATE pimitemflagrelation SET \
Flag_id=(SELECT id FROM flagtable WHERE name='\\SEEN') WHERE Flag_id=(SELECT id FROM \
flagtable WHERE name='\\Seen');</raw-sql> + <raw-sql \
backends="mysql,psql,sqlite,odbc">DELETE FROM flagtable WHERE \
name='\\Seen';</raw-sql> + </update>
</updates>
--- trunk/kdesupport/akonadi/server/tests/unittest/dbupdatertest.cpp #1152640:1152641
@@ -46,7 +46,8 @@
QVERIFY( updateSets.contains( 16 ) );
QVERIFY( updateSets.contains( 17 ) );
QVERIFY( updateSets.contains( 18 ) );
- QCOMPARE( updateSets.count(), 12 );
+ QVERIFY( updateSets.contains( 19 ) );
+ QCOMPARE( updateSets.count(), 13 );
updateSets.clear();
QVERIFY( updater.parseUpdateSets( 13, updateSets ) );
@@ -62,7 +63,8 @@
QVERIFY( updateSets.contains( 16 ) );
QVERIFY( updateSets.contains( 17 ) );
QVERIFY( updateSets.contains( 18 ) );
- QCOMPARE( updateSets.count(), 5 );
+ QVERIFY( updateSets.contains( 19 ) );
+ QCOMPARE( updateSets.count(), 6 );
QCOMPARE( updateSets.value( 14 ).statements.count(), 2 );
QCOMPARE( updateSets.value( 16 ).statements.count(), 11 );
@@ -87,7 +89,8 @@
QVERIFY( updateSets.contains( 16 ) );
QVERIFY( updateSets.contains( 17 ) );
QVERIFY( updateSets.contains( 18 ) );
- QCOMPARE( updateSets.count(), 12 );
+ QVERIFY( updateSets.contains( 19 ) );
+ QCOMPARE( updateSets.count(), 13 );
updateSets.clear();
QVERIFY( updater.parseUpdateSets( 13, updateSets ) );
@@ -103,7 +106,8 @@
QVERIFY( updateSets.contains( 16 ) );
QVERIFY( updateSets.contains( 17 ) );
QVERIFY( updateSets.contains( 18 ) );
- QCOMPARE( updateSets.count(), 5 );
+ QVERIFY( updateSets.contains( 19 ) );
+ QCOMPARE( updateSets.count(), 6 );
QCOMPARE( updateSets.value( 14 ).statements.count(), 2 );
QCOMPARE( updateSets.value( 16 ).statements.count(), 11 );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic