summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-03-20 07:05:27 +0100
committerLaurent Montel <[email protected]>2018-03-20 07:45:41 +0100
commitee9428a0844c0262223efa097c3f3a258b38e56b (patch)
treeb61c45d8d7ad85e462d918871909e51d138b4814
parent4697fd79c791482edac94124b354b6ad50f101ce (diff)
Don't assign invalid collection.v18.03.80
When kmail start CommonKernel can not be initialized => CommonKernel->sentCollectionFolder(); is invalid. => we can see correct collection in combobox but void ComposerViewBase::slotFccCollectionCheckResult(KJob *job) return an error => change to default collection name. But found by David (cherry picked from commit 574f5864307beb540aa10034ad284878bfb5ce5a)
-rw-r--r--src/editor/kmcomposerwin.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/editor/kmcomposerwin.cpp b/src/editor/kmcomposerwin.cpp
index a643b6f..1a884b2 100644
--- a/src/editor/kmcomposerwin.cpp
+++ b/src/editor/kmcomposerwin.cpp
@@ -619,6 +619,7 @@ void KMComposerWin::readConfig(bool reload /* = false */)
if (!ident.fcc().isEmpty()) {
fccName = ident.fcc();
}
+ qDebug() <<" fccName" << fccName;
setFcc(fccName);
}
@@ -1618,6 +1619,7 @@ void KMComposerWin::setMessage(const KMime::Message::Ptr &newMsg, bool lastSignS
if (auto hdr = mMsg->headerByType("X-KMail-Fcc")) {
kmailFcc = hdr->asUnicodeString();
}
+ qDebug() << "sssssssssssssssssssssssssss22222222" << kmailFcc;
if (kmailFcc.isEmpty()) {
setFcc(ident.fcc());
} else {
@@ -1703,9 +1705,10 @@ void KMComposerWin::setFcc(const QString &idString)
} else {
col = Akonadi::Collection(idString.toLongLong());
}
-
- mComposerBase->setFcc(col);
- mFccFolder->setCollection(col);
+ if (col.isValid()) {
+ mComposerBase->setFcc(col);
+ mFccFolder->setCollection(col);
+ }
}
bool KMComposerWin::isComposerModified() const