akonadi
20 #include "entitydeletedattribute.h"
22 #include "imapparser_p.h"
24 #include <QtCore/QByteArray>
25 #include <QtCore/QString>
27 using namespace Akonadi;
29 class EntityDeletedAttribute::EntityDeletedAttributePrivate
32 EntityDeletedAttributePrivate() {};
42 : d_ptr( new EntityDeletedAttributePrivate() )
56 kWarning() <<
"invalid collection" << collection;
58 Q_ASSERT( collection.
isValid() );
59 d->restoreCollection = collection;
60 if ( collection.
resource().isEmpty() ) {
61 kWarning() <<
"no resource set";
63 d->restoreResource = collection.
resource();
69 return d->restoreCollection;
75 return d->restoreResource;
97 l << ImapParser::quote( d->restoreResource.toUtf8() );
98 QList<QByteArray> components;
99 components << QByteArray::number( d->restoreCollection.id() );
101 l <<
'(' + ImapParser::join( components,
" " ) +
')';
102 return '(' + ImapParser::join( l,
" " ) +
')';
110 ImapParser::parseParenthesizedList( data, l );
111 if ( l.size() != 2 ) {
112 kWarning() <<
"invalid size";
115 d->restoreResource = QString::fromUtf8( l[0] );
117 if ( !l[1].isEmpty() ) {
118 QList<QByteArray> componentData;
119 ImapParser::parseParenthesizedList( l[1], componentData );
120 if ( componentData.size() != 1 ) {
123 QList<int> components;
125 for (
int i = 0; i < 1; ++i ) {
126 components << componentData.at( i ).toInt( &ok );
131 d->restoreCollection =
Collection( components.at( 0 ) );
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:35 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.