test: migrate QStateMachine test to QRegularExpression

This is part of the migration of qtbase from QRexExp to
QRegularExpression.

Task-number: QTBUG-72587
Change-Id: If5d5a9d1c3f094d554110ada3b259f4d863e7121
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Samuel Gaist 2019-06-10 09:09:03 +02:00
parent fd58792ef8
commit 4aec51e39f
1 changed files with 2 additions and 2 deletions

View File

@ -1737,13 +1737,13 @@ protected:
if (e->type() != QEvent::Type(QEvent::User+2))
return false;
StringEvent *se = static_cast<StringEvent*>(e);
return (m_value == se->value) && (!m_cond.isValid() || (m_cond.indexIn(m_value) != -1));
return (m_value == se->value) && (!m_cond.isValid() || m_cond.match(m_value).hasMatch());
}
virtual void onTransition(QEvent *) {}
private:
QString m_value;
QRegExp m_cond;
QRegularExpression m_cond;
};
class StringEventPoster : public QState