Changeset View
Changeset View
Standalone View
Standalone View
src/core/kprotocolmanager.cpp
Show First 20 Lines • Show All 231 Lines • ▼ Show 20 Line(s) | 230 | if (address.isNull()) { | |||
---|---|---|---|---|---|
232 | QHostInfo info = KIO::HostInfo::lookupHost(host, 2000); | 232 | QHostInfo info = KIO::HostInfo::lookupHost(host, 2000); | ||
233 | const QList<QHostAddress> addresses = info.addresses(); | 233 | const QList<QHostAddress> addresses = info.addresses(); | ||
234 | if (!addresses.isEmpty()) { | 234 | if (!addresses.isEmpty()) { | ||
235 | address = addresses.first(); | 235 | address = addresses.first(); | ||
236 | } | 236 | } | ||
237 | } | 237 | } | ||
238 | 238 | | |||
239 | if (!address.isNull()) { | 239 | if (!address.isNull()) { | ||
240 | Q_FOREACH (const SubnetPair &subnet, noProxySubnets) { | 240 | for (const SubnetPair &subnet : qAsConst(noProxySubnets)) { | ||
241 | if (address.isInSubnet(subnet)) { | 241 | if (address.isInSubnet(subnet)) { | ||
242 | isMatch = true; | 242 | isMatch = true; | ||
243 | break; | 243 | break; | ||
244 | } | 244 | } | ||
245 | } | 245 | } | ||
246 | } | 246 | } | ||
247 | } | 247 | } | ||
248 | 248 | | |||
▲ Show 20 Lines • Show All 445 Lines • ▼ Show 20 Line(s) | 654 | #endif | |||
694 | } | 694 | } | ||
695 | 695 | | |||
696 | // The idea behind slave protocols is not applicable to http | 696 | // The idea behind slave protocols is not applicable to http | ||
697 | // and webdav protocols as well as protocols unknown to KDE. | 697 | // and webdav protocols as well as protocols unknown to KDE. | ||
698 | if (!proxyList.isEmpty() | 698 | if (!proxyList.isEmpty() | ||
699 | && !protocol.startsWith(QLatin1String("http")) | 699 | && !protocol.startsWith(QLatin1String("http")) | ||
700 | && !protocol.startsWith(QLatin1String("webdav")) | 700 | && !protocol.startsWith(QLatin1String("webdav")) | ||
701 | && KProtocolInfo::isKnownProtocol(protocol)) { | 701 | && KProtocolInfo::isKnownProtocol(protocol)) { | ||
702 | Q_FOREACH (const QString &proxy, proxyList) { | 702 | for (const QString &proxy : qAsConst(proxyList)) { | ||
703 | QUrl u(proxy); | 703 | QUrl u(proxy); | ||
704 | if (u.isValid() && KProtocolInfo::isKnownProtocol(u.scheme())) { | 704 | if (u.isValid() && KProtocolInfo::isKnownProtocol(u.scheme())) { | ||
705 | protocol = u.scheme(); | 705 | protocol = u.scheme(); | ||
706 | break; | 706 | break; | ||
707 | } | 707 | } | ||
708 | } | 708 | } | ||
709 | } | 709 | } | ||
710 | 710 | | |||
▲ Show 20 Lines • Show All 616 Lines • Show Last 20 Lines |