diff --git a/tests/qtgui/generichighlightertest.cpp b/tests/qtgui/generichighlightertest.cpp index 53b727cca9..8fab84e8ff 100644 --- a/tests/qtgui/generichighlightertest.cpp +++ b/tests/qtgui/generichighlightertest.cpp @@ -109,26 +109,17 @@ TEST(DISABLED_GenericHighlighterTest, exercise) QTextCharFormat format; GenericHighlighter::Rule& regexpRule = highlighter.addRule(); - regexpRule.addPattern( - QRegExp("^.*regexp.*$", Qt::CaseSensitive, QRegExp::RegExp)); + regexpRule.addPattern(QRegularExpression("^.*regexp.*$")); format.setForeground(Qt::blue); regexpRule.setFormat(format); GenericHighlighter::Rule& regexpCapRule = highlighter.addRule(); - regexpCapRule.addPattern( - QRegExp("^.*(this)[^\n]*(that).*$", Qt::CaseSensitive, QRegExp::RegExp)); + regexpCapRule.addPattern(QRegularExpression("^.*(this)[^\n]*(that).*$")); format.setForeground(Qt::yellow); regexpCapRule.setFormat(format); - GenericHighlighter::Rule& wildcardRule = highlighter.addRule(); - wildcardRule.addPattern( - QRegExp("A w*red.", Qt::CaseSensitive, QRegExp::Wildcard)); - format.setForeground(Qt::red); - wildcardRule.setFormat(format); - GenericHighlighter::Rule& stringRule = highlighter.addRule(); - stringRule.addPattern(QRegExp("This string will be green.", Qt::CaseSensitive, - QRegExp::FixedString)); + stringRule.addPattern(QRegularExpression("This string will be green.")); format.setForeground(Qt::green); stringRule.setFormat(format);