Commit 384ef0bb authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Fix invalid regular expression

Simplify the regular expression that is used to split several match
contexts. The old regular expression contained "_-!" in a character set
which is invalid because '_' comes after '!'. QRegExp has accepted this
(but it's unclear what it made of the regular expression), but
QRegularExpression rejects it.

This fixes the warning
QString::split: invalid QRegularExpression object
parent 1f46bc24
Pipeline #204564 passed with stage
in 3 minutes and 16 seconds
......@@ -210,7 +210,7 @@ KConfigBasedKeyFilter::KConfigBasedKeyFilter(const KConfigGroup &config)
{"appearance", Appearance},
{"filtering", Filtering},
static const QRegularExpression reg(QRegularExpression(QLatin1String("[^a-zA-Z0-9_-!]+")));
static const QRegularExpression reg(QRegularExpression(QLatin1String("[^a-z!]+")));
const QStringList contexts = config.readEntry("match-contexts", "any").toLower().split(reg, Qt::SkipEmptyParts);
for (const QString &ctx : contexts) {
Supports Markdown
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