summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/network/kernel/qnetworkproxy_mac.cpp7
-rw-r--r--src/network/kernel/qnetworkproxy_win.cpp7
2 files changed, 8 insertions, 6 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;
}
}
diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp
index 56397814b0..dffc0adf8f 100644
--- a/src/network/kernel/qnetworkproxy_win.cpp
+++ b/src/network/kernel/qnetworkproxy_win.cpp
@@ -43,7 +43,7 @@
#include <qmutex.h>
#include <qstringlist.h>
-#include <qregexp.h>
+#include <qregularexpression.h>
#include <qurl.h>
#include <private/qsystemlibrary_p.h>
#include <qnetworkinterface.h>
@@ -212,8 +212,9 @@ static bool isBypassed(const QString &host, const QStringList &bypassList)
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;
}
}