Auto-Type: Only require a substring match for regex.

This matches the behavior of KeePass.

Refs #357
This commit is contained in:
Felix Geyer 2015-10-10 17:36:08 +02:00
parent 862941abf6
commit 820941fd40
3 changed files with 45 additions and 3 deletions

View file

@ -575,7 +575,7 @@ bool AutoType::windowMatches(const QString& windowTitle, const QString& windowPa
{
if (windowPattern.startsWith("//") && windowPattern.endsWith("//") && windowPattern.size() >= 4) {
QRegExp regExp(windowPattern.mid(2, windowPattern.size() - 4), Qt::CaseInsensitive, QRegExp::RegExp2);
return regExp.exactMatch(windowTitle);
return (regExp.indexIn(windowTitle) != -1);
}
else {
return WildcardMatcher(windowTitle).match(windowPattern);