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

List:       kde-commits
Subject:    kdesupport/akonadi/server
From:       Jakub Stachowski <qbast () go2 ! pl>
Date:       2010-08-30 7:35:56
Message-ID: 20100830073556.9C5A4AC871 () svn ! kde ! org
[Download RAW message or body]

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<Collection> 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 );
[prev in list] [next in list] [prev in thread] [next in thread] 

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