Commit 88875128 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix Bug 424776 - Kontact hangs when typing in recipient email addresses

BUG: 424776
FIXED-IN: 5.15.0
parent ba874b38
Pipeline #29021 passed with stage
in 22 minutes and 3 seconds
...@@ -102,6 +102,7 @@ QStringList ContactCompleter::complete() ...@@ -102,6 +102,7 @@ QStringList ContactCompleter::complete()
// TODO: extend the indexer to use value slots for the normalized email address so that // TODO: extend the indexer to use value slots for the normalized email address so that
// duplicates can be collapsed by Xapian::Enquire::set_collapse_key() // duplicates can be collapsed by Xapian::Enquire::set_collapse_key()
int retryCount = 0;
Q_FOREVER { Q_FOREVER {
try { try {
return processEnquire(enq, m_limit); return processEnquire(enq, m_limit);
...@@ -110,6 +111,11 @@ QStringList ContactCompleter::complete() ...@@ -110,6 +111,11 @@ QStringList ContactCompleter::complete()
return QStringList(); return QStringList();
} catch (const Xapian::DatabaseModifiedError &e) { } catch (const Xapian::DatabaseModifiedError &e) {
db.reopen(); db.reopen();
retryCount++;
if (retryCount > 3) {
qCWarning(AKONADI_SEARCH_PIM_LOG) << "The emailContacts Xapian database seems broken:" << QString::fromStdString(e.get_description());
return QStringList();
}
continue; // try again continue; // try again
} }
} }
......
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