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) 2012 Intel Corporation-
4** Contact: http://www.qt.io/licensing/-
5**-
6** This file is part of the QtCore module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL21$-
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 http://www.qt.io/terms-conditions. For further-
15** information use the contact form at http://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 2.1 or version 3 as published by the Free-
20** Software Foundation and appearing in the file LICENSE.LGPLv21 and-
21** LICENSE.LGPLv3 included in the packaging of this file. Please review the-
22** following information to ensure the GNU Lesser General Public License-
23** requirements will be met: https://www.gnu.org/licenses/lgpl.html and-
24** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.-
25**-
26** As a special exception, The Qt Company gives you certain additional-
27** rights. These rights are described in The Qt Company LGPL Exception-
28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.-
29**-
30** $QT_END_LICENSE$-
31**-
32****************************************************************************/-
33-
34#include "qipaddress_p.h"-
35#include "private/qlocale_tools_p.h"-
36#include "private/qtools_p.h"-
37#include "qvarlengtharray.h"-
38-
39QT_BEGIN_NAMESPACE-
40namespace QIPAddressUtils {-
41-
42static QString number(quint8 val, int base = 10)-
43{-
44 QChar zero(0x30);-
45 return val ? qulltoa(val, base, zero) : zero;
executed 15052 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
  • ...
valDescription
TRUEevaluated 11906 times by 31 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_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • ...
FALSEevaluated 3146 times by 27 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_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QObject
  • tst_QSocketNotifier
  • tst_QSslSocket
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
  • ...
3146-15052
46}-
47-
48typedef QVarLengthArray<char, 64> Buffer;-
49static const QChar *checkedToAscii(Buffer &buffer, const QChar *begin, const QChar *end)-
50{-
51 const ushort *const ubegin = reinterpret_cast<const ushort *>(begin);-
52 const ushort *const uend = reinterpret_cast<const ushort *>(end);-
53 const ushort *src = ubegin;-
54-
55 buffer.resize(uend - ubegin + 1);-
56 char *dst = buffer.data();-
57-
58 while (src != uend) {
src != uendDescription
TRUEevaluated 821263 times by 51 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 40987 times by 51 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
  • ...
40987-821263
59 if (*src >= 0x7f)
*src >= 0x7fDescription
TRUEevaluated 390 times by 3 tests
Evaluated by:
  • tst_QHostInfo
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 820873 times by 51 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
  • ...
390-820873
60 return reinterpret_cast<const QChar *>(src);
executed 390 times by 3 tests: return reinterpret_cast<const QChar *>(src);
Executed by:
  • tst_QHostInfo
  • tst_QUrl
  • tst_QUrlInternal
390
61 *dst++ = *src++;-
62 }
executed 820873 times by 51 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
  • ...
820873
63 *dst = '\0';-
64 return 0;
executed 40987 times by 51 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
  • ...
40987
65}-
66-
67static bool parseIp4Internal(IPv4Address &address, const char *ptr, bool acceptLeadingZero);-
68bool parseIp4(IPv4Address &address, const QChar *begin, const QChar *end)-
69{-
70 Q_ASSERT(begin != end);-
71 Buffer buffer;-
72 if (checkedToAscii(buffer, begin, end))
checkedToAscii...r, begin, end)Description
TRUEevaluated 382 times by 3 tests
Evaluated by:
  • tst_QHostInfo
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 40326 times by 51 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
  • ...
382-40326
73 return false;
executed 382 times by 3 tests: return false;
Executed by:
  • tst_QHostInfo
  • tst_QUrl
  • tst_QUrlInternal
382
74-
75 const char *ptr = buffer.data();-
76 return parseIp4Internal(address, ptr, true);
executed 40326 times by 51 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
  • ...
40326
77}-
78-
79static bool parseIp4Internal(IPv4Address &address, const char *ptr, bool acceptLeadingZero)-
80{-
81 address = 0;-
82 int dotCount = 0;-
83 while (dotCount < 4) {
dotCount < 4Description
TRUEevaluated 54251 times by 51 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-54251
84 if (!acceptLeadingZero && *ptr == '0' &&
!acceptLeadingZeroDescription
TRUEevaluated 224 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
FALSEevaluated 54027 times by 51 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-54027
85 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
86 return false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_QIpAddress
4
87-
88 const char *endptr;-
89 bool ok;-
90 quint64 ll = qstrtoull(ptr, &endptr, 0, &ok);-
91 quint32 x = ll;-
92 if (!ok || endptr == ptr || ll != x)
!okDescription
TRUEevaluated 35716 times by 43 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 18531 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 18531 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 18530 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-35716
93 return false;
executed 35717 times by 43 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
  • ...
35717
94-
95 if (*endptr == '.' || dotCount == 3) {
*endptr == '.'Description
TRUEevaluated 13880 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 4650 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 4600 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-13880
96 if (x & ~0xff)
x & ~0xffDescription
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
FALSEevaluated 18473 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-18473
97 return false;
executed 7 times by 2 tests: return false;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
7
98 address <<= 8;-
99 } else if (dotCount == 2) {
executed 18473 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-18473
100 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
101 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_QIpAddress
1
102 address <<= 16;-
103 } 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
104 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
105 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_QIpAddress
1
106 address <<= 24;-
107 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
4
108 address |= x;-
109-
110 if (dotCount == 3 && *endptr != '\0')
dotCount == 3Description
TRUEevaluated 4604 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 13917 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 4595 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-13917
111 return false;
executed 9 times by 3 tests: return false;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
9
112 else if (dotCount == 3 || *endptr == '\0')
dotCount == 3Description
TRUEevaluated 4595 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 13917 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 13906 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-13917
113 return true;
executed 4606 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
  • ...
4606
114 if (*endptr != '.')
*endptr != '.'Description
TRUEevaluated 37 times by 4 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QUrl
FALSEevaluated 13869 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-13869
115 return false;
executed 37 times by 4 tests: return false;
Executed by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QUrl
37
116-
117 ++dotCount;-
118 ptr = endptr + 1;-
119 }
executed 13869 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
  • ...
13869
120 return false;
never executed: return false;
0
121}-
122-
123void toString(QString &appendTo, IPv4Address address)-
124{-
125 // reconstructing is easy-
126 // use the fast operator% that pre-calculates the size-
127 appendTo += number(address >> 24)-
128 % QLatin1Char('.')-
129 % number(address >> 16)-
130 % QLatin1Char('.')-
131 % number(address >> 8)-
132 % QLatin1Char('.')-
133 % number(address);-
134}
executed 3763 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
  • ...
3763
135-
136/*!-
137 \internal-
138 \since 5.0-
139-
140 Parses one IPv6 address from \a begin to \a end and stores the-
141 representation in \a address. Returns null if everything was parsed-
142 correctly, or the pointer to the first bad character where parsing failed.-
143 If the parsing failed for a reason not related to a particular character,-
144 returns \a end.-
145*/-
146const QChar *parseIp6(IPv6Address &address, const QChar *begin, const QChar *end)-
147{-
148 Q_ASSERT(begin != end);-
149 Buffer buffer;-
150 const QChar *ret = checkedToAscii(buffer, begin, end);-
151 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
152 return ret;
executed 8 times by 2 tests: return ret;
Executed by:
  • tst_QUrl
  • tst_QUrlInternal
8
153-
154 const char *ptr = buffer.data();-
155-
156 // count the colons-
157 int colonCount = 0;-
158 int dotCount = 0;-
159 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
160 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
161 ++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
162 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
163 ++dotCount;
executed 325 times by 6 tests: ++dotCount;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUrl
  • tst_Spdy
325
164 ++ptr;-
165 }
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
166 // IPv4-in-IPv6 addresses are stricter in what they accept-
167 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
168 return end;
executed 68 times by 5 tests: return end;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkReply
  • tst_QUrl
  • tst_Spdy
68
169-
170 memset(address, 0, sizeof address);-
171 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
172 return 0;
executed 37 times by 4 tests: return 0;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpSocket
  • tst_QUrl
37
173-
174 // if there's a double colon ("::"), this is how many zeroes it means-
175 int zeroWordsToFill;-
176 ptr = buffer.data();-
177-
178 // there are two cases where 8 colons are allowed: at the ends-
179 // so test that before the colon-count test-
180 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
181 (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
182 zeroWordsToFill = 9 - colonCount;-
183 } 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
184 return end;
executed 64 times by 4 tests: return end;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QUrl
  • tst_QUrlInternal
64
185 } else {-
186 zeroWordsToFill = 8 - colonCount;-
187 }
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
188 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
189 --zeroWordsToFill;
executed 69 times by 4 tests: --zeroWordsToFill;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
69
190-
191 int pos = 0;-
192 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
193 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
194 // empty field, we hope it's "::"-
195 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
196 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
197 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
198 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
199 return begin + (ptr - buffer.data());
executed 8 times by 2 tests: return begin + (ptr - buffer.data());
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
8
200 ++ptr;-
201 }
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
202 pos += zeroWordsToFill * 2;-
203 zeroWordsToFill = 0;-
204 ++ptr;-
205 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
206 }-
207-
208 const char *endptr;-
209 bool ok;-
210 quint64 ll = qstrtoull(ptr, &endptr, 16, &ok);-
211 quint16 x = ll;-
212-
213 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
214 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
215-
216 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
217 // this could be an IPv4 address-
218 // it's only valid in the last element-
219 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
220 return begin + (ptr - buffer.data());
executed 7 times by 2 tests: return begin + (ptr - buffer.data());
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
7
221-
222 IPv4Address ip4;-
223 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
224 return begin + (ptr - buffer.data());
executed 4 times by 1 test: return begin + (ptr - buffer.data());
Executed by:
  • tst_QIpAddress
4
225-
226 address[12] = ip4 >> 24;-
227 address[13] = ip4 >> 16;-
228 address[14] = ip4 >> 8;-
229 address[15] = ip4;-
230 return 0;
executed 52 times by 4 tests: return 0;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
52
231 }-
232-
233 address[pos++] = x >> 8;-
234 address[pos++] = x & 0xff;-
235-
236 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
237 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
238 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
239 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
240 ptr = endptr + 1;-
241 }
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
242 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
pos == 16Description
TRUEevaluated 360 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 7 times by 2 tests
Evaluated by:
  • tst_QHostAddress
  • tst_QIpAddress
7-367
243}-
244-
245static inline QChar toHex(uchar c)-
246{-
247 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
248}-
249-
250void toString(QString &appendTo, IPv6Address address)-
251{-
252 // the longest IPv6 address possible is:-
253 // "1111:2222:3333:4444:5555:6666:255.255.255.255"-
254 // however, this function never generates that. The longest it does-
255 // generate without an IPv4 address is:-
256 // "1111:2222:3333:4444:5555:6666:7777:8888"-
257 // and the longest with an IPv4 address is:-
258 // "::ffff:255.255.255.255"-
259 static const int Ip6AddressMaxLen = sizeof "1111:2222:3333:4444:5555:6666:7777:8888";-
260 static const int Ip6WithIp4AddressMaxLen = sizeof "::ffff:255.255.255.255";-
261-
262 // check for the special cases-
263 const quint64 zeroes[] = { 0, 0 };-
264 bool embeddedIp4 = false;-
265-
266 // we consider embedded IPv4 for:-
267 // ::ffff:x.x.x.x-
268 // ::x.x.x.y except if the x are 0 too-
269 if (memcmp(address, zeroes, 10) == 0) {
memcmp(address...roes, 10) == 0Description
TRUEevaluated 177 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
177-252
270 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 155 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-155
271 embeddedIp4 = true;-
272 } 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 155 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 155 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-155
273 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 149 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 149 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 149 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-149
274 embeddedIp4 = true;-
275 } 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 62 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
276 appendTo.append(QLatin1String("::"));-
277 return;
executed 62 times by 7 tests: return;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QNetworkAddressEntry
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_QUrl
62
278 }-
279 }
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
280 }
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
281-
282 // QString::reserve doesn't shrink, so it's fine to us-
283 appendTo.reserve(appendTo.size() +-
284 (embeddedIp4 ? Ip6WithIp4AddressMaxLen : Ip6AddressMaxLen));-
285-
286 // for finding where to place the "::"-
287 int zeroRunLength = 0; // in octets-
288 int zeroRunOffset = 0; // in octets-
289 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
290 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
291 // found a zero, scan forward to see how many more there are-
292 int j;-
293 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
294 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
295 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
296 }
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
297-
298 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
299 zeroRunLength = j - i;-
300 zeroRunOffset = i;-
301 i = j;-
302 }
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
303 }
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
304 }
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
305-
306 const QChar colon = ushort(':');-
307 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
308 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
309 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
310 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
311-
312 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
313 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
314 appendTo.append(colon);-
315 i += zeroRunLength - 2;-
316 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
317 }-
318-
319 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
320 IPv4Address ip4 = address[12] << 24 |-
321 address[13] << 16 |-
322 address[14] << 8 |-
323 address[15];-
324 toString(appendTo, ip4);-
325 return;
executed 28 times by 4 tests: return;
Executed by:
  • tst_QHostAddress
  • tst_QIpAddress
  • tst_QTcpServer
  • tst_QUrl
28
326 }-
327-
328 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
329 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
330 appendTo.append(toHex(address[i] >> 4));-
331 appendTo.append(toHex(address[i] & 0xf));-
332 appendTo.append(toHex(address[i + 1] >> 4));-
333 appendTo.append(toHex(address[i + 1] & 0xf));-
334 } 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
335 appendTo.append(toHex(address[i] & 0xf));-
336 appendTo.append(toHex(address[i + 1] >> 4));-
337 appendTo.append(toHex(address[i + 1] & 0xf));-
338 }
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
339 } 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
340 appendTo.append(toHex(address[i + 1] >> 4));-
341 appendTo.append(toHex(address[i + 1] & 0xf));-
342 } else {
executed 195 times by 4 tests: end of block
Executed by:
  • tst_QHostAddress
  • tst_QHostInfo
  • tst_QIpAddress
  • tst_QUrl
195
343 appendTo.append(toHex(address[i + 1] & 0xf));-
344 }
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
345-
346 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
347 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
348 }
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
349}
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
350-
351}-
352QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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