mirror of
https://github.com/OpenMW/openmw.git
synced 2025-07-13 13:11:45 +00:00
Suppress a warnings spam when user entered an invalid regular expression
This commit is contained in:
parent
7c709167d9
commit
7c8fb79745
1 changed files with 4 additions and 0 deletions
|
@ -46,6 +46,10 @@ void CSMTools::Search::searchTextCell(const CSMWorld::IdTableBase* model, const
|
||||||
void CSMTools::Search::searchRegExCell(const CSMWorld::IdTableBase* model, const QModelIndex& index,
|
void CSMTools::Search::searchRegExCell(const CSMWorld::IdTableBase* model, const QModelIndex& index,
|
||||||
const CSMWorld::UniversalId& id, bool writable, CSMDoc::Messages& messages) const
|
const CSMWorld::UniversalId& id, bool writable, CSMDoc::Messages& messages) const
|
||||||
{
|
{
|
||||||
|
// TODO: verify regular expression before starting a search
|
||||||
|
if (!mRegExp.isValid())
|
||||||
|
return;
|
||||||
|
|
||||||
QString text = model->data(index).toString();
|
QString text = model->data(index).toString();
|
||||||
|
|
||||||
QRegularExpressionMatchIterator i = mRegExp.globalMatch(text);
|
QRegularExpressionMatchIterator i = mRegExp.globalMatch(text);
|
||||||
|
|
Loading…
Reference in a new issue