We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72545f1 commit e3b9704Copy full SHA for e3b9704
1 file changed
src/gui/UrlTools.cpp
@@ -26,23 +26,14 @@
26
27
const QString UrlTools::URL_WILDCARD = "1kpxcwc1";
28
29
-namespace {
30
- QUrl convertVariantToUrl(const QVariant& var)
31
- {
32
- QUrl url;
33
- if (var.canConvert<QUrl>()) {
34
- url = var.toUrl();
35
- }
36
- return url;
37
-
38
39
-}
40
41
#if defined(KPXC_FEATURE_NETWORK) || defined(KPXC_FEATURE_BROWSER)
42
QUrl UrlTools::getRedirectTarget(QNetworkReply* reply)
43
{
+ QUrl url;
44
QVariant var = reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
45
- QUrl url = convertVariantToUrl(var);
+ if (var.canConvert<QUrl>()) {
+ url = var.toUrl();
+ }
46
return url;
47
}
48
0 commit comments