summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qnetworkproxy_mac.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-04-09 10:18:48 +0200
committerLars Knoll <lars.knoll@qt.io>2020-04-15 19:54:09 +0200
commite80544ebca7bc3083df460607931bb4ea55d6a6a (patch)
treec2417bbf9e6d53412e52eff9381e8fc3c10c65f7 /src/network/kernel/qnetworkproxy_mac.cpp
parent30f69f7ff6ecea94aa72365d1fb769329d122a02 (diff)
Port QNetworkProxy over to use QRegularExpression
The windows and macOS implementations where still using QRegExp in one place. Change-Id: Iaf6c6ead10f7f061ff0edce889abe18751b9d308 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/network/kernel/qnetworkproxy_mac.cpp')
-rw-r--r--src/network/kernel/qnetworkproxy_mac.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/network/kernel/qnetworkproxy_mac.cpp b/src/network/kernel/qnetworkproxy_mac.cpp
index 67fda24ea6..4c582bfa71 100644
--- a/src/network/kernel/qnetworkproxy_mac.cpp
+++ b/src/network/kernel/qnetworkproxy_mac.cpp
@@ -45,7 +45,7 @@
#include <CoreFoundation/CoreFoundation.h>
#include <SystemConfiguration/SystemConfiguration.h>
-#include <QtCore/QRegExp>
+#include <QtCore/QRegularExpression>
#include <QtCore/QStringList>
#include <QtCore/QUrl>
#include <QtCore/qendian.h>
@@ -110,8 +110,9 @@ static bool isHostExcluded(CFDictionaryRef dict, const QString &host)
return true; // excluded
} else {
// do wildcard matching
- QRegExp rx(entry, Qt::CaseInsensitive, QRegExp::Wildcard);
- if (rx.exactMatch(host))
+ QRegularExpression rx(QRegularExpression::wildcardToRegularExpression(entry),
+ QRegularExpression::CaseInsensitiveOption);
+ if (rx.match(host).hasMatch())
return true;
}
}