Commit eac0dbd5 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Remove colon (:) prefix when looking up dictionary word

The dictionary engine lets us specify a server and dictionary but we don't need any of that,
and the engine can deal with just a word (these days?).
More importantly, the key inserted into the m_lockers map is without a colon and since sourceRemoved is also called without it,
the wait condition is never met and we time out eventually.
The colon has been in there forever but from current dictionary engine code I don't see why it would be neccessary.

CHANGELOG: Fixed dictionary runner not finding any definitions

BUG: 376905
FIXED-IN: 5.16.4

Differential Revision:

(cherry picked from commit cda996df)
parent 8db06d15
......@@ -37,7 +37,7 @@ QString DictionaryMatchEngine::lookupWord(const QString &word)
m_lockers.insert(word, &data);
QMetaObject::invokeMethod(this, "sourceAdded", Qt::QueuedConnection, Q_ARG(const QString&, QLatin1Char(':') + word));
QMetaObject::invokeMethod(this, "sourceAdded", Qt::QueuedConnection, Q_ARG(const QString&, word));
QMutexLocker locker(&data.mutex);
if (!data.waitCondition.wait(&data.mutex, 30 * 1000)) // Timeout after 30 seconds
qDebug() << "The dictionary data engine timed out (word:" << word << ")";
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