From kde-commits Mon Aug 30 07:35:56 2010 From: Jakub Stachowski Date: Mon, 30 Aug 2010 07:35:56 +0000 To: kde-commits Subject: kdesupport/akonadi/server Message-Id: <20100830073556.9C5A4AC871 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=128315356030987 SVN commit 1169872 by qbast: ANCESTORS items needs to be quoted just like REMOTEID is. This fixes "RID mismatch" warnings caused by imap account with slash in username M +3 -3 src/handlerhelper.cpp M +7 -0 tests/unittest/handlerhelpertest.cpp --- trunk/kdesupport/akonadi/server/src/handlerhelper.cpp #1169871:1169872 @@ -247,9 +247,9 @@ } b += '('; const Collection c = ancestors.pop(); - b += QByteArray::number( c.id() ) + " \""; - b += c.remoteId().toUtf8(); - b += "\")"; + b += QByteArray::number( c.id() ) + " "; + b += ImapParser::quote( c.remoteId().toUtf8() ); + b += ")"; if ( i != ancestorDepth - 1 ) b += ' '; } --- trunk/kdesupport/akonadi/server/tests/unittest/handlerhelpertest.cpp #1169871:1169872 @@ -69,6 +69,13 @@ QStack ancestors; Collection c; + + c.setId( 10 ); + c.setRemoteId( "sl\\ash" ); + ancestors.push ( c ); + QTest::newRow( "slash" ) << 1 << ancestors << QByteArray( "ANCESTORS ((10 \"sl\\\\ash\"))" ); + + ancestors.clear(); c.setId( 1 ); c.setRemoteId( "r1" ); ancestors.push( c );