diff options
author | Samuel Gaist <samuel.gaist@idiap.ch> | 2018-07-03 00:36:14 +0200 |
---|---|---|
committer | Samuel Gaist <samuel.gaist@idiap.ch> | 2018-07-16 21:38:58 +0000 |
commit | dd8128e177df2d3a74c11daaa8c833d055afc5af (patch) | |
tree | 7c805d05ccd6c7b67518271f7595f0c7157e90da /src | |
parent | f71bd1863a1f29f4f19d5be05bc0f422e5cbffb0 (diff) |
Migrate HunspellBuildSuggestionsTask to QRegularExpression
This patch updates the HunspellBuildSuggestionsTask class to use
QRegularExpression in place of QRegExp which is to be considered
deprecated.
Change-Id: I6db18a46b380a27fff0970baec2809192555a984
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/virtualkeyboard/hunspellworker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/virtualkeyboard/hunspellworker.cpp b/src/virtualkeyboard/hunspellworker.cpp index f2e502ad..fee4b939 100644 --- a/src/virtualkeyboard/hunspellworker.cpp +++ b/src/virtualkeyboard/hunspellworker.cpp @@ -32,7 +32,7 @@ #include <QVector> #include <QTextCodec> #include <QFileInfo> -#include <QRegExp> +#include <QRegularExpression> #include <QTime> namespace QtVirtualKeyboard { @@ -197,7 +197,7 @@ bool HunspellBuildSuggestionsTask::spellCheck(const QString &word) { if (!hunspell) return false; - if (word.contains(QRegExp("[0-9]"))) + if (word.contains(QRegularExpression("[0-9]"))) return true; return Hunspell_spell(hunspell, textCodec->fromUnicode(word).constData()) != 0; } |