diff options
Diffstat (limited to 'src/nam.cpp')
-rw-r--r-- | src/nam.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nam.cpp b/src/nam.cpp index 2f3fdd1..798a8e6 100644 --- a/src/nam.cpp +++ b/src/nam.cpp @@ -33,7 +33,14 @@ QNetworkReply* SlxNetworkAccessManager::createRequest(QNetworkAccessManager::Ope } else if (url.host().isEmpty()) { ok = true; } else { - ok = (_list.match(url.toDisplayString(QUrl::NormalizePathSegments)).hasMatch() == _isWhitelist); + auto str = url.toDisplayString(QUrl::NormalizePathSegments); + if (_white.isValid() && _white.match(str).hasMatch()) { + ok = true; + } else if (_black.isValid() && _black.match(str).hasMatch()) { + ok = false; + } else { + ok = true; + } } if (!ok) { return new SlxDisabledNetworkReply(this, req, op); |