Commit 4a986f69 authored by Sandro Knauß's avatar Sandro Knauß
Browse files

MessageComposer: return ContactPreferences, if already available.

If ContactPreferences are set explitly and not loaded via Akonadi this
function cannot lock. So it is safe to move the #if.
parent acc349cd
......@@ -1850,12 +1850,12 @@ void Kleo::KeyResolver::addKeys(const std::vector<Item> &items)
Kleo::KeyResolver::ContactPreferences Kleo::KeyResolver::lookupContactPreferences(const QString &address) const
{
#ifdef HAVE_A_FIX_FOR_LOCK
const Private::ContactPreferencesMap::iterator it = d->mContactPreferencesMap.find(address);
if (it != d->mContactPreferencesMap.end()) {
return it->second;
}
#ifdef HAVE_A_FIX_FOR_LOCK
Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob();
job->setLimit(1);
job->setQuery(Akonadi::ContactSearchJob::Email, address);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment