mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
Editor: fix hang bug in QTextEdit's find()
This commit is contained in:
parent
3f5ccf6b6e
commit
a96c23fff1
@ -616,6 +616,12 @@ bool VEditor::findTextHelper(const QString &p_text,
|
|||||||
QRegExp exp;
|
QRegExp exp;
|
||||||
if (p_options & FindOption::RegularExpression) {
|
if (p_options & FindOption::RegularExpression) {
|
||||||
useRegExp = true;
|
useRegExp = true;
|
||||||
|
// FIXME: hang bug in Qt's find().
|
||||||
|
QRegExp test("[$^]+");
|
||||||
|
if (test.exactMatch(p_text)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
exp = QRegExp(p_text,
|
exp = QRegExp(p_text,
|
||||||
caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive);
|
caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user