The config key has been moved to a separate file, some foreach have been refactored, the QRegExp occurrences have been ported to QRegularExpression and are now reused.
Furthermore unnecessary functions/function calls have been removed and the code is formatted.
WIP: Currently the way the matches look is not very good, because there is far too much text displayed for example:
And with a crappy kwin rule which increases the width:
My Idea would be to make the definition, example sentence and synonyms customizable.
By default the word type, definition and synonyms would be shown for example:
n trying something to find out about it [syn: trial, trial run, test, tryout]
And also an action which shows a dialog with all the available information and maybe some copy buttons for the synonyms.
Because this patch is refactoring/cleanup I consider making a new patch for these feature and would appreciate feedback for the ideas :-).