qipaddress.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qipaddress.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 Intel Corporation.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtCore module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qipaddress_p.h"-
41#include "private/qlocale_tools_p.h"-
42#include "private/qtools_p.h"-
43#include "qvarlengtharray.h"-
44-
45QT_BEGIN_NAMESPACE-
46namespace QIPAddressUtils {-
47-
48static QString number(quint8 val, int base = 10)-
49{-
50 QChar zero(0x30);-
51 return val ? qulltoa(val, base, zero) : zero;
executed 15104 times by 31 tests: return val ? qulltoa(val, base, zero) : zero;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • ...
15104
52}-
53-
54typedef QVarLengthArray<char, 64> Buffer;-
55static const QChar *checkedToAscii(Buffer &buffer, const QChar *begin, const QChar *end)-
56{-
57 const ushort *const ubegin = reinterpret_cast<const ushort *>(begin);-
58 const ushort *const uend = reinterpret_cast<const ushort *>(end);-
59 const ushort *src = ubegin;-
60-
61 buffer.resize(uend - ubegin + 1);-
62 char *dst = buffer.data();-
63-
64 while (src != uend) {
src != uendDescription
TRUEevaluated 802927 times by 50 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFileSelector
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkAddressEntry
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • ...
FALSEevaluated 41034 times by 50 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFileSelector
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkAddressEntry
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • ...
41034-802927
65 if (*src >= 0x7f)
*src >= 0x7fDescription
TRUEevaluated 364 times by 3 tests
Evaluated by:
  • tst_QHostInfo
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 802563 times by 50 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFileSelector
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkAddressEntry
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • ...
364-802563
66 return reinterpret_cast<const QChar *>(src);
executed 364 times by 3 tests: return reinterpret_cast<const QChar *>(src);
Executed by:
  • tst_QHostInfo
  • tst_QUrl
  • tst_QUrlInternal
364
67 *dst++ = *src++;-
68 }
executed 802563 times by 50 tests: end of block
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFileSelector
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkAddressEntry
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • ...
802563
69 *dst = '\0';-
70 return 0;
executed 41034 times by 50 tests: return 0;
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFileSelector
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkAddressEntry
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • ...
41034
71}-
72-
73static bool parseIp4Internal(IPv4Address &address, const char *ptr, bool acceptLeadingZero);-
74bool parseIp4(IPv4Address &address, const QChar *begin, const QChar *end)-
75{-
76 Q_ASSERT(begin != end);-
77 Buffer buffer;-
78 if (checkedToAscii(buffer, begin, end))
checkedToAscii...r, begin, end)Description
TRUEevaluated 356 times by 3 tests
Evaluated by:
  • tst_QHostInfo
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 40373 times by 50 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFileSelector
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkAddressEntry
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • ...
356-40373
79 return false;
executed 356 times by 3 tests: return false;
Executed by:
  • tst_QHostInfo
  • tst_QUrl
  • tst_QUrlInternal
356
80-
81 const char *ptr = buffer.data();-
82 return parseIp4Internal(address, ptr, true);
executed 40373 times by 50 tests: return parseIp4Internal(address, ptr, true);
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFileSelector
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkAddressEntry
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • ...
40373
83}-
84-
85static bool parseIp4Internal(IPv4Address &address, const char *ptr, bool acceptLeadingZero)-
86{-
87 address = 0;-
88 int dotCount = 0;-
89 while (dotCount < 4) {
dotCount < 4Description
TRUEevaluated 54388 times by 50 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFileSelector
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkAddressEntry
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • ...
FALSEnever evaluated
0-54388
90 if (!acceptLeadingZero && *ptr == '0' &&
!acceptLeadingZeroDescription
TRUEevaluated 224 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
FALSEevaluated 54164 times by 50 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFileSelector
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkAddressEntry
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • ...
*ptr == '0'Description
TRUEevaluated 60 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
FALSEevaluated 164 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
60-54164
91 ptr[1] != '.' && ptr[1] != '\0')
ptr[1] != '.'Description
TRUEevaluated 10 times by 3 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
FALSEevaluated 50 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
ptr[1] != '\0'Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QIpAddress
FALSEevaluated 6 times by 3 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
4-50
92 return false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_QIpAddress
4
93-
94 const char *endptr;-
95 bool ok;-
96 quint64 ll = qstrtoull(ptr, &endptr, 0, &ok);-
97 quint32 x = ll;-
98 if (!ok || endptr == ptr || ll != x)
!okDescription
TRUEevaluated 35733 times by 42 tests
Evaluated by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileSelector
  • tst_QFtp
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIpAddress
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • ...
FALSEevaluated 18651 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
endptr == ptrDescription
TRUEnever evaluated
FALSEevaluated 18651 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
ll != xDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QIpAddress
FALSEevaluated 18650 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
0-35733
99 return false;
executed 35734 times by 42 tests: return false;
Executed by:
  • tst_Lancelot
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QDataUrl
  • tst_QFileSelector
  • tst_QFtp
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIpAddress
  • tst_QMetaType
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • ...
35734
100-
101 if (*endptr == '.' || dotCount == 3) {
*endptr == '.'Description
TRUEevaluated 13970 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
FALSEevaluated 4680 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
dotCount == 3Description
TRUEevaluated 4630 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
FALSEevaluated 50 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QUrl
50-13970
102 if (x & ~0xff)
x & ~0xffDescription
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
FALSEevaluated 18593 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
7-18593
103 return false;
executed 7 times by 2 tests: return false;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
7
104 address <<= 8;-
105 } else if (dotCount == 2) {
executed 18593 times by 30 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
dotCount == 2Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
FALSEevaluated 44 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QUrl
6-18593
106 if (x & ~0xffff)
x & ~0xffffDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QIpAddress
FALSEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
1-5
107 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_QIpAddress
1
108 address <<= 16;-
109 } else if (dotCount == 1) {
executed 5 times by 2 tests: end of block
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
dotCount == 1Description
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
FALSEevaluated 39 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QUrl
5-39
110 if (x & ~0xffffff)
x & ~0xffffffDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QIpAddress
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
1-4
111 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_QIpAddress
1
112 address <<= 24;-
113 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
4
114 address |= x;-
115-
116 if (dotCount == 3 && *endptr != '\0')
dotCount == 3Description
TRUEevaluated 4634 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
FALSEevaluated 14007 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
*endptr != '\0'Description
TRUEevaluated 9 times by 3 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
FALSEevaluated 4625 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
9-14007
117 return false;
executed 9 times by 3 tests: return false;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
9
118 else if (dotCount == 3 || *endptr == '\0')
dotCount == 3Description
TRUEevaluated 4625 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
FALSEevaluated 14007 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
*endptr == '\0'Description
TRUEevaluated 11 times by 3 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
FALSEevaluated 13996 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
11-14007
119 return true;
executed 4636 times by 30 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
4636
120 if (*endptr != '.')
*endptr != '.'Description
TRUEevaluated 37 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QUrl
FALSEevaluated 13959 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
37-13959
121 return false;
executed 37 times by 4 tests: return false;
Executed by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QUrl
37
122-
123 ++dotCount;-
124 ptr = endptr + 1;-
125 }
executed 13959 times by 30 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • ...
13959
126 return false;
never executed: return false;
0
127}-
128-
129void toString(QString &appendTo, IPv4Address address)-
130{-
131 // reconstructing is easy-
132 // use the fast operator% that pre-calculates the size-
133 appendTo += number(address >> 24)-
134 % QLatin1Char('.')-
135 % number(address >> 16)-
136 % QLatin1Char('.')-
137 % number(address >> 8)-
138 % QLatin1Char('.')-
139 % number(address);-
140}
executed 3776 times by 31 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiEventLoop
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImageReader
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • ...
3776
141-
142/*!-
143 \internal-
144 \since 5.0-
145-
146 Parses one IPv6 address from \a begin to \a end and stores the-
147 representation in \a address. Returns null if everything was parsed-
148 correctly, or the pointer to the first bad character where parsing failed.-
149 If the parsing failed for a reason not related to a particular character,-
150 returns \a end.-
151*/-
152const QChar *parseIp6(IPv6Address &address, const QChar *begin, const QChar *end)-
153{-
154 Q_ASSERT(begin != end);-
155 Buffer buffer;-
156 const QChar *ret = checkedToAscii(buffer, begin, end);-
157 if (ret)
retDescription
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 661 times by 16 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
  • tst_QUrlInternal
  • tst_Spdy
8-661
158 return ret;
executed 8 times by 2 tests: return ret;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
8
159-
160 const char *ptr = buffer.data();-
161-
162 // count the colons-
163 int colonCount = 0;-
164 int dotCount = 0;-
165 while (*ptr) {
*ptrDescription
TRUEevaluated 8925 times by 16 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
  • tst_QUrlInternal
  • tst_Spdy
FALSEevaluated 661 times by 16 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
  • tst_QUrlInternal
  • tst_Spdy
661-8925
166 if (*ptr == ':')
*ptr == ':'Description
TRUEevaluated 2143 times by 16 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
  • tst_QUrlInternal
  • tst_Spdy
FALSEevaluated 6782 times by 16 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
  • tst_QUrlInternal
  • tst_Spdy
2143-6782
167 ++colonCount;
executed 2143 times by 16 tests: ++colonCount;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
  • tst_QUrlInternal
  • tst_Spdy
2143
168 if (*ptr == '.')
*ptr == '.'Description
TRUEevaluated 325 times by 6 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_Spdy
FALSEevaluated 8600 times by 16 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
  • tst_QUrlInternal
  • tst_Spdy
325-8600
169 ++dotCount;
executed 325 times by 6 tests: ++dotCount;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_Spdy
325
170 ++ptr;-
171 }
executed 8925 times by 16 tests: end of block
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
  • tst_QUrlInternal
  • tst_Spdy
8925
172 // IPv4-in-IPv6 addresses are stricter in what they accept-
173 if (dotCount != 0 && dotCount != 3)
dotCount != 0Description
TRUEevaluated 144 times by 6 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_Spdy
FALSEevaluated 517 times by 15 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
  • tst_QUrlInternal
dotCount != 3Description
TRUEevaluated 68 times by 5 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkReply
  • tst_QUrl
  • tst_Spdy
FALSEevaluated 76 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
68-517
174 return end;
executed 68 times by 5 tests: return end;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkReply
  • tst_QUrl
  • tst_Spdy
68
175-
176 memset(address, 0, sizeof address);-
177 if (colonCount == 2 && end - begin == 2) // "::"
colonCount == 2Description
TRUEevaluated 230 times by 11 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 363 times by 12 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUrl
  • tst_QUrlInternal
end - begin == 2Description
TRUEevaluated 37 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpSocket
  • tst_QUrl
FALSEevaluated 193 times by 11 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
37-363
178 return 0;
executed 37 times by 4 tests: return 0;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpSocket
  • tst_QUrl
37
179-
180 // if there's a double colon ("::"), this is how many zeroes it means-
181 int zeroWordsToFill;-
182 ptr = buffer.data();-
183-
184 // there are two cases where 8 colons are allowed: at the ends-
185 // so test that before the colon-count test-
186 if ((ptr[0] == ':' && ptr[1] == ':') ||
ptr[0] == ':'Description
TRUEevaluated 185 times by 10 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 371 times by 13 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
  • tst_QUrlInternal
ptr[1] == ':'Description
TRUEevaluated 173 times by 10 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 12 times by 3 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
12-371
187 (ptr[end - begin - 2] == ':' && ptr[end - begin - 1] == ':')) {
ptr[end - begin - 2] == ':'Description
TRUEevaluated 186 times by 10 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 197 times by 10 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkProxyFactory
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
  • tst_QUrlInternal
ptr[end - begin - 1] == ':'Description
TRUEevaluated 84 times by 7 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 102 times by 7 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkCookieJar
  • tst_QTcpSocket
  • tst_QUrl
84-197
188 zeroWordsToFill = 9 - colonCount;-
189 } else if (colonCount < 2 || colonCount > 7) {
executed 257 times by 11 tests: end of block
Executed by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
colonCount < 2Description
TRUEevaluated 61 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 238 times by 12 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
colonCount > 7Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
FALSEevaluated 235 times by 12 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
3-257
190 return end;
executed 64 times by 4 tests: return end;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
  • tst_QUrlInternal
64
191 } else {-
192 zeroWordsToFill = 8 - colonCount;-
193 }
executed 235 times by 12 tests: end of block
Executed by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
235
194 if (dotCount)
dotCountDescription
TRUEevaluated 69 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
FALSEevaluated 423 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
69-423
195 --zeroWordsToFill;
executed 69 times by 4 tests: --zeroWordsToFill;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
69
196-
197 int pos = 0;-
198 while (pos < 15) {
pos < 15Description
TRUEevaluated 2118 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 73 times by 7 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
73-2118
199 if (*ptr == ':') {
*ptr == ':'Description
TRUEevaluated 394 times by 13 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 1724 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
394-1724
200 // empty field, we hope it's "::"-
201 if (zeroWordsToFill < 1)
zeroWordsToFill < 1Description
TRUEevaluated 26 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QUrl
FALSEevaluated 368 times by 13 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
26-368
202 return begin + (ptr - buffer.data());
executed 26 times by 4 tests: return begin + (ptr - buffer.data());
Executed by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QUrl
26
203 if (pos == 0 || pos == colonCount * 2) {
pos == 0Description
TRUEevaluated 181 times by 10 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 187 times by 11 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
pos == colonCount * 2Description
TRUEnever evaluated
FALSEevaluated 187 times by 11 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
0-187
204 if (ptr[0] == '\0' || ptr[1] != ':')
ptr[0] == '\0'Description
TRUEnever evaluated
FALSEevaluated 181 times by 10 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
ptr[1] != ':'Description
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
FALSEevaluated 173 times by 10 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
0-181
205 return begin + (ptr - buffer.data());
executed 8 times by 2 tests: return begin + (ptr - buffer.data());
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
8
206 ++ptr;-
207 }
executed 173 times by 10 tests: end of block
Executed by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
173
208 pos += zeroWordsToFill * 2;-
209 zeroWordsToFill = 0;-
210 ++ptr;-
211 continue;
executed 360 times by 13 tests: continue;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
360
212 }-
213-
214 const char *endptr;-
215 bool ok;-
216 quint64 ll = qstrtoull(ptr, &endptr, 16, &ok);-
217 quint16 x = ll;-
218-
219 if (!ok || ll != x)
!okDescription
TRUEevaluated 14 times by 3 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
FALSEevaluated 1710 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
ll != xDescription
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
FALSEevaluated 1705 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
5-1710
220 return begin + (ptr - buffer.data());
executed 19 times by 3 tests: return begin + (ptr - buffer.data());
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
19
221-
222 if (*endptr == '.') {
*endptr == '.'Description
TRUEevaluated 63 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
FALSEevaluated 1642 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
63-1642
223 // this could be an IPv4 address-
224 // it's only valid in the last element-
225 if (pos != 12)
pos != 12Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
FALSEevaluated 56 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
7-56
226 return begin + (ptr - buffer.data());
executed 7 times by 2 tests: return begin + (ptr - buffer.data());
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
7
227-
228 IPv4Address ip4;-
229 if (!parseIp4Internal(ip4, ptr, false))
!parseIp4Inter...4, ptr, false)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QIpAddress
FALSEevaluated 52 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
4-52
230 return begin + (ptr - buffer.data());
executed 4 times by 1 test: return begin + (ptr - buffer.data());
Executed by:
  • tst_QIpAddress
4
231-
232 address[12] = ip4 >> 24;-
233 address[13] = ip4 >> 16;-
234 address[14] = ip4 >> 8;-
235 address[15] = ip4;-
236 return 0;
executed 52 times by 4 tests: return 0;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
52
237 }-
238-
239 address[pos++] = x >> 8;-
240 address[pos++] = x & 0xff;-
241-
242 if (*endptr == '\0')
*endptr == '\0'Description
TRUEevaluated 294 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 1348 times by 12 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
294-1348
243 break;
executed 294 times by 14 tests: break;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
294
244 if (*endptr != ':')
*endptr != ':'Description
TRUEevaluated 9 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUrl
FALSEevaluated 1339 times by 12 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
9-1339
245 return begin + (endptr - buffer.data());
executed 9 times by 4 tests: return begin + (endptr - buffer.data());
Executed by:
  • tst_QHostAddress
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUrl
9
246 ptr = endptr + 1;-
247 }
executed 1339 times by 12 tests: end of block
Executed by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
1339
248 return pos == 16 ? 0 : end;
executed 367 times by 14 tests: return pos == 16 ? 0 : end;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSocks5SocketEngine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
367
249}-
250-
251static inline QChar toHex(uchar c)-
252{-
253 return QtMiscUtils::toHexLower(c);
executed 3406 times by 14 tests: return QtMiscUtils::toHexLower(c);
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
3406
254}-
255-
256void toString(QString &appendTo, IPv6Address address)-
257{-
258 // the longest IPv6 address possible is:-
259 // "1111:2222:3333:4444:5555:6666:255.255.255.255"-
260 // however, this function never generates that. The longest it does-
261 // generate without an IPv4 address is:-
262 // "1111:2222:3333:4444:5555:6666:7777:8888"-
263 // and the longest with an IPv4 address is:-
264 // "::ffff:255.255.255.255"-
265 static const int Ip6AddressMaxLen = sizeof "1111:2222:3333:4444:5555:6666:7777:8888";-
266 static const int Ip6WithIp4AddressMaxLen = sizeof "::ffff:255.255.255.255";-
267-
268 // check for the special cases-
269 const quint64 zeroes[] = { 0, 0 };-
270 bool embeddedIp4 = false;-
271-
272 // we consider embedded IPv4 for:-
273 // ::ffff:x.x.x.x-
274 // ::x.x.x.y except if the x are 0 too-
275 if (memcmp(address, zeroes, 10) == 0) {
memcmp(address...roes, 10) == 0Description
TRUEevaluated 166 times by 11 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 252 times by 11 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
166-252
276 if (address[10] == 0xff && address[11] == 0xff) {
address[10] == 0xffDescription
TRUEevaluated 22 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
FALSEevaluated 144 times by 11 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
address[11] == 0xffDescription
TRUEevaluated 22 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
FALSEnever evaluated
0-144
277 embeddedIp4 = true;-
278 } else if (address[10] == 0 && address[11] == 0) {
executed 22 times by 4 tests: end of block
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
address[10] == 0Description
TRUEevaluated 144 times by 11 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEnever evaluated
address[11] == 0Description
TRUEevaluated 144 times by 11 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEnever evaluated
0-144
279 if (address[12] != 0 || address[13] != 0 || address[14] != 0) {
address[12] != 0Description
TRUEevaluated 6 times by 3 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
FALSEevaluated 138 times by 11 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
address[13] != 0Description
TRUEnever evaluated
FALSEevaluated 138 times by 11 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
address[14] != 0Description
TRUEnever evaluated
FALSEevaluated 138 times by 11 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
0-138
280 embeddedIp4 = true;-
281 } else if (address[15] == 0) {
executed 6 times by 3 tests: end of block
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
address[15] == 0Description
TRUEevaluated 51 times by 7 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 87 times by 10 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
6-87
282 appendTo.append(QLatin1String("::"));-
283 return;
executed 51 times by 7 tests: return;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
51
284 }-
285 }
executed 93 times by 10 tests: end of block
Executed by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
93
286 }
executed 115 times by 10 tests: end of block
Executed by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
115
287-
288 // QString::reserve doesn't shrink, so it's fine to us-
289 appendTo.reserve(appendTo.size() +-
290 (embeddedIp4 ? Ip6WithIp4AddressMaxLen : Ip6AddressMaxLen));-
291-
292 // for finding where to place the "::"-
293 int zeroRunLength = 0; // in octets-
294 int zeroRunOffset = 0; // in octets-
295 for (int i = 0; i < 16; i += 2) {
i < 16Description
TRUEevaluated 1369 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 367 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
367-1369
296 if (address[i] == 0 && address[i + 1] == 0) {
address[i] == 0Description
TRUEevaluated 704 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 665 times by 11 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
address[i + 1] == 0Description
TRUEevaluated 376 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 328 times by 7 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkCookieJar
  • tst_QTcpServer
  • tst_QUrl
328-704
297 // found a zero, scan forward to see how many more there are-
298 int j;-
299 for (j = i; j < 16; j += 2) {
j < 16Description
TRUEevaluated 1968 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 94 times by 5 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkInterface
  • tst_QUrl
94-1968
300 if (address[j] != 0 || address[j+1] != 0)
address[j] != 0Description
TRUEevaluated 70 times by 8 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 1898 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
address[j+1] != 0Description
TRUEevaluated 212 times by 12 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 1686 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
70-1898
301 break;
executed 282 times by 13 tests: break;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
282
302 }
executed 1686 times by 14 tests: end of block
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
1686
303-
304 if (j - i > zeroRunLength) {
j - i > zeroRunLengthDescription
TRUEevaluated 348 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 28 times by 3 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
28-348
305 zeroRunLength = j - i;-
306 zeroRunOffset = i;-
307 i = j;-
308 }
executed 348 times by 14 tests: end of block
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
348
309 }
executed 376 times by 14 tests: end of block
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
376
310 }
executed 1369 times by 14 tests: end of block
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
1369
311-
312 const QChar colon = ushort(':');-
313 if (zeroRunLength < 4)
zeroRunLength < 4Description
TRUEevaluated 60 times by 6 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkInterface
  • tst_QUrl
FALSEevaluated 307 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
60-307
314 zeroRunOffset = -1;
executed 60 times by 6 tests: zeroRunOffset = -1;
Executed by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkInterface
  • tst_QUrl
60
315 else if (zeroRunOffset == 0)
zeroRunOffset == 0Description
TRUEevaluated 117 times by 10 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 190 times by 11 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
117-190
316 appendTo.append(colon);
executed 117 times by 10 tests: appendTo.append(colon);
Executed by:
  • tst_PlatformSocketEngine
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
117
317-
318 for (int i = 0; i < 16; i += 2) {
i < 16Description
TRUEevaluated 1616 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 339 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
339-1616
319 if (i == zeroRunOffset) {
i == zeroRunOffsetDescription
TRUEevaluated 307 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 1309 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
307-1309
320 appendTo.append(colon);-
321 i += zeroRunLength - 2;-
322 continue;
executed 307 times by 14 tests: continue;
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
307
323 }-
324-
325 if (i == 12 && embeddedIp4) {
i == 12Description
TRUEevaluated 160 times by 11 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 1149 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
embeddedIp4Description
TRUEevaluated 28 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
FALSEevaluated 132 times by 11 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
28-1149
326 IPv4Address ip4 = address[12] << 24 |-
327 address[13] << 16 |-
328 address[14] << 8 |-
329 address[15];-
330 toString(appendTo, ip4);-
331 return;
executed 28 times by 4 tests: return;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
28
332 }-
333-
334 if (address[i]) {
address[i]Description
TRUEevaluated 685 times by 11 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 596 times by 13 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
596-685
335 if (address[i] >> 4) {
address[i] >> 4Description
TRUEevaluated 560 times by 11 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 125 times by 10 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
125-560
336 appendTo.append(toHex(address[i] >> 4));-
337 appendTo.append(toHex(address[i] & 0xf));-
338 appendTo.append(toHex(address[i + 1] >> 4));-
339 appendTo.append(toHex(address[i + 1] & 0xf));-
340 } else if (address[i] & 0xf) {
executed 560 times by 11 tests: end of block
Executed by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
address[i] & 0xfDescription
TRUEevaluated 125 times by 10 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
FALSEnever evaluated
0-560
341 appendTo.append(toHex(address[i] & 0xf));-
342 appendTo.append(toHex(address[i + 1] >> 4));-
343 appendTo.append(toHex(address[i + 1] & 0xf));-
344 }
executed 125 times by 10 tests: end of block
Executed by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
125
345 } else if (address[i + 1] >> 4) {
executed 685 times by 11 tests: end of block
Executed by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
address[i + 1] >> 4Description
TRUEevaluated 195 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QUrl
FALSEevaluated 401 times by 13 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
195-685
346 appendTo.append(toHex(address[i + 1] >> 4));-
347 appendTo.append(toHex(address[i + 1] & 0xf));-
348 } else {
executed 195 times by 4 tests: end of block
Executed by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QUrl
195
349 appendTo.append(toHex(address[i + 1] & 0xf));-
350 }
executed 401 times by 13 tests: end of block
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
401
351-
352 if (i != 14)
i != 14Description
TRUEevaluated 1015 times by 11 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
FALSEevaluated 266 times by 14 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
266-1015
353 appendTo.append(colon);
executed 1015 times by 11 tests: appendTo.append(colon);
Executed by:
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QUrl
1015
354 }
executed 1281 times by 14 tests: end of block
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
1281
355}
executed 339 times by 14 tests: end of block
Executed by:
  • tst_PlatformSocketEngine
  • tst_QDnsLookup
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QNetworkCookieJar
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
339
356-
357}-
358QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9