diff options
Diffstat (limited to 'accounts/imap/imapsettings.cpp')
-rw-r--r-- | accounts/imap/imapsettings.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/accounts/imap/imapsettings.cpp b/accounts/imap/imapsettings.cpp index 6e45b197..fcef8971 100644 --- a/accounts/imap/imapsettings.cpp +++ b/accounts/imap/imapsettings.cpp | |||
@@ -222,7 +222,7 @@ void ImapSettings::save() | |||
222 | 222 | ||
223 | void ImapSettings::remove() | 223 | void ImapSettings::remove() |
224 | { | 224 | { |
225 | if (mIdentifier.isEmpty()) { | 225 | if (mMailtransportIdentifier.isEmpty()) { |
226 | qWarning() << "We're missing an identifier"; | 226 | qWarning() << "We're missing an identifier"; |
227 | } else { | 227 | } else { |
228 | Sink::ApplicationDomain::SinkResource mailTransportResource("", mMailtransportIdentifier, 0, QSharedPointer<Sink::ApplicationDomain::MemoryBufferAdaptor>::create()); | 228 | Sink::ApplicationDomain::SinkResource mailTransportResource("", mMailtransportIdentifier, 0, QSharedPointer<Sink::ApplicationDomain::MemoryBufferAdaptor>::create()); |
@@ -231,14 +231,22 @@ void ImapSettings::remove() | |||
231 | qWarning() << "Error while removing resource: " << errorMessage; | 231 | qWarning() << "Error while removing resource: " << errorMessage; |
232 | }) | 232 | }) |
233 | .exec(); | 233 | .exec(); |
234 | } | ||
234 | 235 | ||
236 | if (mIdentifier.isEmpty()) { | ||
237 | qWarning() << "We're missing an identifier"; | ||
238 | } else { | ||
235 | Sink::ApplicationDomain::SinkResource resource("", mIdentifier, 0, QSharedPointer<Sink::ApplicationDomain::MemoryBufferAdaptor>::create()); | 239 | Sink::ApplicationDomain::SinkResource resource("", mIdentifier, 0, QSharedPointer<Sink::ApplicationDomain::MemoryBufferAdaptor>::create()); |
236 | Sink::Store::remove(resource).then<void>([]() {}, | 240 | Sink::Store::remove(resource).then<void>([]() {}, |
237 | [](int errorCode, const QString &errorMessage) { | 241 | [](int errorCode, const QString &errorMessage) { |
238 | qWarning() << "Error while removing resource: " << errorMessage; | 242 | qWarning() << "Error while removing resource: " << errorMessage; |
239 | }) | 243 | }) |
240 | .exec(); | 244 | .exec(); |
245 | } | ||
241 | 246 | ||
247 | if (mAccountIdentifier.isEmpty()) { | ||
248 | qWarning() << "We're missing an identifier"; | ||
249 | } else { | ||
242 | Sink::ApplicationDomain::SinkAccount account("", mAccountIdentifier, 0, QSharedPointer<Sink::ApplicationDomain::MemoryBufferAdaptor>::create()); | 250 | Sink::ApplicationDomain::SinkAccount account("", mAccountIdentifier, 0, QSharedPointer<Sink::ApplicationDomain::MemoryBufferAdaptor>::create()); |
243 | Sink::Store::remove(account).then<void>([]() {}, | 251 | Sink::Store::remove(account).then<void>([]() {}, |
244 | [](int errorCode, const QString &errorMessage) { | 252 | [](int errorCode, const QString &errorMessage) { |