Checking whether the input contains '*', '?' or '[' alone will
not do since there can be files with '[' in their name.
REVIEW: 120986
BUG: 340470
FIXED-IN: 14.12
m_pattern = filter;
m_lowerCasePattern = filter.toLower();
- m_useRegExp = filter.contains('*') ||
- filter.contains('?') ||
- filter.contains('[');
- if (m_useRegExp) {
+ if (filter.contains('*') || filter.contains('?') || filter.contains('[')) {
if (!m_regExp) {
m_regExp = new QRegExp();
m_regExp->setCaseSensitivity(Qt::CaseInsensitive);
m_regExp->setPatternSyntax(QRegExp::WildcardUnix);
}
m_regExp->setPattern(filter);
+ m_useRegExp = m_regExp->isValid();
+ } else {
+ m_useRegExp = false;
}
}