From 751f2c82c4121d28d0740bffb29a4fb273ec55c5 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 21 Jun 2016 22:19:15 +0200 Subject: Catch errors --- examples/imapresource/imapserverproxy.cpp | 2 +- examples/maildirresource/maildirresource.cpp | 1 - examples/mailtransportresource/mailtransport.cpp | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/imapresource/imapserverproxy.cpp b/examples/imapresource/imapserverproxy.cpp index a82e3ac..703caca 100644 --- a/examples/imapresource/imapserverproxy.cpp +++ b/examples/imapresource/imapserverproxy.cpp @@ -87,7 +87,7 @@ class SessionUiProxy : public KIMAP::SessionUiProxy { } }; -ImapServerProxy::ImapServerProxy(const QString &serverUrl, int port) : mSession(new KIMAP::Session(serverUrl, port)) +ImapServerProxy::ImapServerProxy(const QString &serverUrl, int port) : mSession(new KIMAP::Session(serverUrl, qint16(port))) { mSession->setUiProxy(SessionUiProxy::Ptr(new SessionUiProxy)); mSession->setTimeout(10); diff --git a/examples/maildirresource/maildirresource.cpp b/examples/maildirresource/maildirresource.cpp index 23e25c4..ea780cc 100644 --- a/examples/maildirresource/maildirresource.cpp +++ b/examples/maildirresource/maildirresource.cpp @@ -164,7 +164,6 @@ public: auto identifier = oldMaildir.moveEntryTo(oldIdentifier, maildir); return path + "/" + identifier; } - return oldPath; } void newEntity(const QByteArray &uid, qint64 revision, Sink::ApplicationDomain::BufferAdaptor &newEntity, Sink::Storage::Transaction &transaction) Q_DECL_OVERRIDE diff --git a/examples/mailtransportresource/mailtransport.cpp b/examples/mailtransportresource/mailtransport.cpp index 5985562..4f7e59b 100644 --- a/examples/mailtransportresource/mailtransport.cpp +++ b/examples/mailtransportresource/mailtransport.cpp @@ -48,7 +48,7 @@ static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp) if (len > size * nmemb) { len = size * nmemb; } - fprintf(stderr, "read n bytes: %d\n",len); + fprintf(stderr, "read n bytes: %d\n", int(len)); memcpy(ptr, data, len); upload_ctx->offset += len; return len; -- cgit v1.2.3