summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/embedded/flightinfo/flightinfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/embedded/flightinfo/flightinfo.cpp b/examples/embedded/flightinfo/flightinfo.cpp
index 8ad1e5c0c0..e91277db58 100644
--- a/examples/embedded/flightinfo/flightinfo.cpp
+++ b/examples/embedded/flightinfo/flightinfo.cpp
@@ -239,9 +239,9 @@ private:
int i = data.indexOf("a href=\"?view=detail");
if (i > 0) {
QString href = data.mid(i, data.indexOf('\"', i + 8) - i + 1);
- QRegExp regex("dpap=([A-Za-z0-9]+)");
- regex.indexIn(href);
- QString airport = regex.cap(1);
+ QRegularExpression regex("dpap=([A-Za-z0-9]+)");
+ QRegularExpressionMatch match = regex.match(href);
+ QString airport = match.captured(1);
QUrlQuery query(m_url);
query.addQueryItem("dpap", airport);
m_url.setQuery(query);