summaryrefslogtreecommitdiff
path: root/kimap/setquotajob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kimap/setquotajob.cpp')
-rw-r--r--kimap/setquotajob.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kimap/setquotajob.cpp b/kimap/setquotajob.cpp
index 347aeee..9dedddd 100644
--- a/kimap/setquotajob.cpp
+++ b/kimap/setquotajob.cpp
@@ -19,8 +19,8 @@
#include "setquotajob.h"
-#include <KDE/KLocalizedString>
-#include <KDE/KDebug>
+#include <klocale.h>
+#include <kdebug.h>
#include "quotajobbase_p.h"
#include "message_p.h"
@@ -31,7 +31,7 @@ namespace KIMAP
class SetQuotaJobPrivate : public QuotaJobBasePrivate
{
public:
- SetQuotaJobPrivate( Session *session, const QString& name ) : QuotaJobBasePrivate( session, name ) { }
+ SetQuotaJobPrivate( Session *session, const QString& name ) : QuotaJobBasePrivate(session, name) { }
~SetQuotaJobPrivate() { }
QMap<QByteArray, qint64> setList;
@@ -42,7 +42,7 @@ namespace KIMAP
using namespace KIMAP;
SetQuotaJob::SetQuotaJob( Session *session )
- : QuotaJobBase( *new SetQuotaJobPrivate( session, i18n( "SetQuota" ) ) )
+ : QuotaJobBase( *new SetQuotaJobPrivate(session, i18n("SetQuota")) )
{
}
@@ -52,54 +52,54 @@ SetQuotaJob::~SetQuotaJob()
void SetQuotaJob::doStart()
{
- Q_D( SetQuotaJob );
+ Q_D(SetQuotaJob);
QByteArray s;
s += '(';
- for ( QMap<QByteArray, qint64>::ConstIterator it = d->setList.constBegin(); it != d->setList.constEnd(); ++it ) {
- s += it.key() + ' ' + QByteArray::number( it.value() ) + ' ';
+ for (QMap<QByteArray, qint64>::ConstIterator it = d->setList.constBegin(); it != d->setList.constEnd(); ++it ) {
+ s += it.key() + ' ' + QByteArray::number(it.value()) + ' ';
}
- if ( d->setList.isEmpty() ) {
+ if (d->setList.isEmpty()) {
s += ')';
} else {
s[s.length() - 1] = ')';
}
- kDebug() << "SETQUOTA " << '\"' + d->root + "\" " + s;
+ qDebug() << "SETQUOTA " << '\"' + d->root + "\" " + s;
//XXX: [alexmerry, 2010-07-24]: should d->root be quoted properly?
- d->tags << d->sessionInternal()->sendCommand( "SETQUOTA", '\"' + d->root + "\" " + s );
+ d->tags << d->sessionInternal()->sendCommand( "SETQUOTA", '\"' + d->root + "\" " + s);
}
void SetQuotaJob::handleResponse(const Message &response)
{
- Q_D( SetQuotaJob );
- if ( handleErrorReplies( response ) == NotHandled ) {
- if ( response.content.size() >= 4 &&
- response.content[1].toString() == "QUOTA" ) {
- d->quota = d->readQuota( response.content[3] );
+ Q_D(SetQuotaJob);
+ if (handleErrorReplies(response) == NotHandled) {
+ if ( response.content.size() >= 4
+ && response.content[1].toString() == "QUOTA" ) {
+ d->quota = d->readQuota(response.content[3]);
}
}
}
+
void SetQuotaJob::setQuota(const QByteArray &resource, qint64 limit)
{
- Q_D( SetQuotaJob );
+ Q_D(SetQuotaJob);
d->setList[resource.toUpper()] = limit;
}
void SetQuotaJob::setRoot(const QByteArray& root)
{
- Q_D( SetQuotaJob );
+ Q_D(SetQuotaJob);
d->root = root;
}
QByteArray SetQuotaJob::root() const
{
- Q_D( const SetQuotaJob );
+ Q_D(const SetQuotaJob);
return d->root;
}
#include "setquotajob.moc"
-