diff options
author | alex1701c <alexkp12355@gmail.com> | 2019-12-06 21:52:44 +0100 |
---|---|---|
committer | alex1701c <alexkp12355@gmail.com> | 2019-12-06 21:52:44 +0100 |
commit | c0c88e97d182a52966a6cba6faf0024009f9c781 (patch) | |
tree | 3b6b832b406993105f782678b2783e89a3046b44 | |
parent | cd2987635b9483c4bd941cab048b493fdb8c67b3 (diff) |
Use contains instead of regex
-rw-r--r-- | pass.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -152,9 +152,8 @@ void Pass::match(Plasma::RunnerContext &context) QList<Plasma::QueryMatch> matches; lock.lockForRead(); - QRegularExpression re(".*" + input + ".*", QRegularExpression::CaseInsensitiveOption); for (const auto& password: passwords) { - if (re.match(password).hasMatch()) { + if (password.contains(input,Qt::CaseInsensitive)) { Plasma::QueryMatch match(this); match.setType(input.length() == password.length() ? Plasma::QueryMatch::ExactMatch : Plasma::QueryMatch::CompletionMatch); |