summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-08-10 15:45:50 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-08-10 15:45:50 (GMT)
commit140a08bbf2e41df5150062d42bf32de012f6273c (patch)
tree8665d89844332f0422dfe8f813877f3007918b70
parent61f5816ecd53c3c62b9f290ede0fb5e09f4381dd (diff)
downloadkolab-utils-140a08bbf2e41df5150062d42bf32de012f6273c.tar.gz
make sure we set an error somewhere along the way, so we can have a proper return value
-rw-r--r--upgradetool/imapupgradejob.cpp9
-rw-r--r--upgradetool/upgradetool.cpp2
2 files changed, 6 insertions, 5 deletions
diff --git a/upgradetool/imapupgradejob.cpp b/upgradetool/imapupgradejob.cpp
index c8582aa..1d17354 100644
--- a/upgradetool/imapupgradejob.cpp
+++ b/upgradetool/imapupgradejob.cpp
@@ -96,8 +96,8 @@ void ImapUpgradeJob::onLoginDone( KJob *job )
KIMAP::LoginJob *login = static_cast<KIMAP::LoginJob*>( job );
if ( job->error() ) {
- Warning() << job->errorString();
- Warning() << "Login failed, job aborted";
+ Error() << job->errorString();
+ Error() << "Login failed, job aborted";
emitResult();
return;
}
@@ -105,6 +105,7 @@ void ImapUpgradeJob::onLoginDone( KJob *job )
if (m_requireEncryption && login->encryptionMode() == KIMAP::LoginJob::Unencrypted) {
setError(KJob::UserDefinedError);
setErrorText("failed to encrypt communication");
+ Error() << errorString();
emitResult();
return;
}
@@ -117,7 +118,7 @@ void ImapUpgradeJob::onLoginDone( KJob *job )
void ImapUpgradeJob::onProbeDone(KJob* job)
{
if ( job->error() ) {
- Warning() << job->errorString();
+ Error() << job->errorString();
emitResult();
return;
}
@@ -144,7 +145,7 @@ void ImapUpgradeJob::modifyDone( KJob *job )
{
Debug() << "all done";
if ( job->error() ) {
- Warning() << job->errorString();
+ Error() << job->errorString();
}
emitResult();
}
diff --git a/upgradetool/upgradetool.cpp b/upgradetool/upgradetool.cpp
index 7e25efb..15e8b5a 100644
--- a/upgradetool/upgradetool.cpp
+++ b/upgradetool/upgradetool.cpp
@@ -20,7 +20,7 @@
#include <QtCore/qfile.h>
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <errorhandler.h>
+#include <kolab/errorhandler.h>
#include "upgradeutilities.h"
#include "imapupgradejob.h"