From c0c88e97d182a52966a6cba6faf0024009f9c781 Mon Sep 17 00:00:00 2001 From: alex1701c Date: Fri, 6 Dec 2019 21:52:44 +0100 Subject: [PATCH] Use contains instead of regex --- pass.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pass.cpp b/pass.cpp index 4ab38a6..ed84bd1 100644 --- a/pass.cpp +++ b/pass.cpp @@ -152,9 +152,8 @@ void Pass::match(Plasma::RunnerContext &context) QList 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);