diff --git a/src/network/kernel/qnetworkproxy_mac.cpp b/src/network/kernel/qnetworkproxy_mac.cpp index 67fda24ea6e..4c582bfa715 100644 --- a/src/network/kernel/qnetworkproxy_mac.cpp +++ b/src/network/kernel/qnetworkproxy_mac.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include #include @@ -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 56397814b08..dffc0adf8fd 100644 --- a/src/network/kernel/qnetworkproxy_win.cpp +++ b/src/network/kernel/qnetworkproxy_win.cpp @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include #include @@ -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; } }