summaryrefslogtreecommitdiff
path: root/lib/kolabaccount.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2013-03-13 12:51:15 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2013-03-13 12:51:15 (GMT)
commit0c6eaf53efac8916ec7b7de288c63b426f374fbe (patch)
treeb101d8cb8c89e9028f8da0205bc9936d8c7aa033 /lib/kolabaccount.cpp
parent549fa26a274f62e6c63241e408428a536aa457d0 (diff)
downloadkolab-utils-0c6eaf53efac8916ec7b7de288c63b426f374fbe.tar.gz
Made wiping of target folders optional.
Diffstat (limited to 'lib/kolabaccount.cpp')
-rw-r--r--lib/kolabaccount.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/kolabaccount.cpp b/lib/kolabaccount.cpp
index 312af42..ced770b 100644
--- a/lib/kolabaccount.cpp
+++ b/lib/kolabaccount.cpp
@@ -43,6 +43,7 @@ KolabAccount::KolabAccount(QObject* parent)
mEncryptionMode(KIMAP::LoginJob::TlsV1),
mAuthenticationMode(KIMAP::LoginJob::Plain),
mDryRun(false),
+ mWipeTargetFolders(false),
mVersion(Kolab::KolabV3)
{
@@ -81,6 +82,11 @@ void KolabAccount::setDryRun(bool enable)
mDryRun = enable;
}
+void KolabAccount::setWipeTargetFolders(bool enable)
+{
+ mWipeTargetFolders = enable;
+}
+
bool KolabAccount::init()
{
if (mSession) {
@@ -203,6 +209,10 @@ const char* FlagDeleted2 = "\\Deleted";
void KolabAccount::cleanAccount()
{
+ if (!mWipeTargetFolders) {
+ Debug() << "wiping of target folders disabled";
+ return;
+ }
Q_ASSERT(mSession);
KIMAP::ListJob *listJob = new KIMAP::ListJob(mSession);
listJob->setOption(KIMAP::ListJob::IncludeUnsubscribed);