Use contains instead of regex

master
alex1701c 6 years ago
parent cd2987635b
commit c0c88e97d1
  1. 3
      pass.cpp

@ -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);

Loading…
Cancel
Save