| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| 12 | namespace { namespace Q_QGS_theHostInfoLookupManager { typedef QHostInfoLookupManager Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized) guard.store(QtGlobalStatic::Destroyed); } }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return &holder.value; } } } static QGlobalStatic<QHostInfoLookupManager, Q_QGS_theHostInfoLookupManager::innerFunction, Q_QGS_theHostInfoLookupManager::guard> theHostInfoLookupManager; | - |
| 13 | | - |
| 14 | namespace { | - |
| 15 | struct ToBeLookedUpEquals { | - |
| 16 | typedef bool result_type; | - |
| 17 | explicit ToBeLookedUpEquals(const QString &toBeLookedUp) noexcept : m_toBeLookedUp(toBeLookedUp) {}executed 22925 times by 18 tests: end of blockExecuted by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 22925 |
| 18 | result_type operator()(QHostInfoRunnable* lookup) const noexcept | - |
| 19 | { | - |
| 20 | returnexecuted 45527 times by 4 tests: return m_toBeLookedUp == lookup->toBeLookedUp;Executed by:- tst_QHostInfo
- tst_qobject - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
m_toBeLookedUp == lookup->toBeLookedUp;executed 45527 times by 4 tests: return m_toBeLookedUp == lookup->toBeLookedUp;Executed by:- tst_QHostInfo
- tst_qobject - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
| 45527 |
| 21 | } | - |
| 22 | private: | - |
| 23 | QString m_toBeLookedUp; | - |
| 24 | }; | - |
| 25 | | - |
| 26 | | - |
| 27 | template<class InputIt, class UnaryPredicate> | - |
| 28 | bool any_of(InputIt first, InputIt last, UnaryPredicate p) | - |
| 29 | { | - |
| 30 | returnexecuted 22720 times by 18 tests: return std::find_if(first, last, p) != last;Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
std::find_if(first, last, p) != last;executed 22720 times by 18 tests: return std::find_if(first, last, p) != last;Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 22720 |
| 31 | } | - |
| 32 | | - |
| 33 | template <typename InputIt, typename OutputIt1, typename OutputIt2, typename UnaryPredicate> | - |
| 34 | std::pair<OutputIt1, OutputIt2> separate_if(InputIt first, InputIt last, OutputIt1 dest1, OutputIt2 dest2, UnaryPredicate p) | - |
| 35 | { | - |
| 36 | while (first != last| TRUE | evaluated 22720 times by 18 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | evaluated 8148 times by 19 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
|
) { | 8148-22720 |
| 37 | if (p(*first)| TRUE | evaluated 22262 times by 4 testsEvaluated by:- tst_QHostInfo
- tst_qobject - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | evaluated 458 times by 18 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
|
) { | 458-22262 |
| 38 | *dest1 = *first; | - |
| 39 | ++dest1; | - |
| 40 | }executed 22262 times by 4 tests: end of blockExecuted by:- tst_QHostInfo
- tst_qobject - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
else { | 22262 |
| 41 | *dest2 = *first; | - |
| 42 | ++dest2; | - |
| 43 | }executed 458 times by 18 tests: end of blockExecuted by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 458 |
| 44 | ++first; | - |
| 45 | }executed 22720 times by 18 tests: end of blockExecuted by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 22720 |
| 46 | returnexecuted 8148 times by 19 tests: return std::make_pair(dest1, dest2);Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
std::make_pair(dest1, dest2);executed 8148 times by 19 tests: return std::make_pair(dest1, dest2);Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
| 8148 |
| 47 | } | - |
| 48 | } | - |
| 49 | static QBasicAtomicInt theIdCounter = { 1 }; | - |
| 50 | int QHostInfo::lookupHost(const QString &name, QObject *receiver, | - |
| 51 | const char *member) | - |
| 52 | { | - |
| 53 | | - |
| 54 | | - |
| 55 | | - |
| 56 | | - |
| 57 | | - |
| 58 | if (!QAbstractEventDispatcher::instance(QThread::currentThread())) { | - |
| 59 | QMessageLogger(__FILE__, 150194, __PRETTY_FUNCTION__).warning("QHostInfo::lookupHost() called with no event dispatcher"); | - |
| 60 | return -1; | - |
| 61 | } | - |
| 62 | | - |
| 63 | qRegisterMetaType<QHostInfo>(); | - |
| 64 | | - |
| 65 | int id = theIdCounter.fetchAndAddRelaxed(1); | - |
| 66 | | - |
| 67 | if (name.isEmpty()) { | - |
| 68 | if (!receiver) | - |
| 69 | return -1; | - |
| 70 | | - |
| 71 | QHostInfo hostInfo(id); | - |
| 72 | hostInfo.setError(QHostInfo::HostNotFound); | - |
| 73 | hostInfo.setErrorString(QCoreApplication::translate("QHostInfo", "No host name given")); | - |
| 74 | QScopedPointer<QHostInfoResult> result(new QHostInfoResult); | - |
| 75 | QObject::connect(result.data(), qFlagLocation("2""resultsReady(QHostInfo)" "\0" __FILE__ ":" "166""210"), | - |
| 76 | receiver, member, Qt::QueuedConnection); | - |
| 77 | result.data()->emitResultsReady(hostInfo); | - |
| 78 | return id; | - |
| 79 | } | - |
| 80 | | - |
| 81 | QHostInfoLookupManager *manager = theHostInfoLookupManager(); | - |
| 82 | | - |
| 83 | if (manager) { | - |
| 84 | | - |
| 85 | if (manager->cache.isEnabled()) { | - |
| 86 | | - |
| 87 | bool valid = false; | - |
| 88 | QHostInfo info = manager->cache.get(name, &valid); | - |
| 89 | if (valid) { | - |
| 90 | if (!receiver) | - |
| 91 | return -1; | - |
| 92 | | - |
| 93 | info.setLookupId(id); | - |
| 94 | QHostInfoResult result; | - |
| 95 | QObject::connect(&result, qFlagLocation("2""resultsReady(QHostInfo)" "\0" __FILE__ ":" "186""230"), receiver, member, Qt::QueuedConnection); | - |
| 96 | result.emitResultsReady(info); | - |
| 97 | return id; | - |
| 98 | } | - |
| 99 | } | - |
| 100 | | - |
| 101 | | - |
| 102 | QHostInfoRunnable* runnable = new QHostInfoRunnable(name, id); | - |
| 103 | if (receiver) | - |
| 104 | QObject::connect(&runnable->resultEmitter, qFlagLocation("2""resultsReady(QHostInfo)" "\0" __FILE__ ":" "195""239"), receiver, member, Qt::QueuedConnection); | - |
| 105 | manager->scheduleLookup(runnable); | - |
| 106 | } | - |
| 107 | return id; | - |
| 108 | } | - |
| 109 | | - |
| 110 | | - |
| 111 | | - |
| 112 | | - |
| 113 | | - |
| 114 | | - |
| 115 | void QHostInfo::abortHostLookup(int id) | - |
| 116 | { | - |
| 117 | theHostInfoLookupManager()->abortLookup(id); | - |
| 118 | } | - |
| 119 | QHostInfo QHostInfo::fromName(const QString &name) | - |
| 120 | { | - |
| 121 | | - |
| 122 | | - |
| 123 | | - |
| 124 | | - |
| 125 | QHostInfo hostInfo = QHostInfoAgent::fromName(name); | - |
| 126 | QAbstractHostInfoLookupManager* manager = theHostInfoLookupManager(); | - |
| 127 | manager->cache.put(name, hostInfo); | - |
| 128 | return hostInfo; | - |
| 129 | } | - |
| 130 | | - |
| 131 | | - |
| 132 | QHostInfo QHostInfoPrivate::fromName(const QString &name, QSharedPointer<QNetworkSession> session) | - |
| 133 | { | - |
| 134 | | - |
| 135 | | - |
| 136 | | - |
| 137 | | - |
| 138 | QHostInfo hostInfo = QHostInfoAgent::fromName(name, session); | - |
| 139 | QAbstractHostInfoLookupManager* manager = theHostInfoLookupManager(); | - |
| 140 | manager->cache.put(name, hostInfo); | - |
| 141 | return hostInfo; | - |
| 142 | } | - |
| 143 | | - |
| 144 | | - |
| 145 | | - |
| 146 | QHostInfo QHostInfoAgent::fromName(const QString &hostName, QSharedPointer<QNetworkSession>) | - |
| 147 | { | - |
| 148 | return QHostInfoAgent::fromName(hostName); | - |
| 149 | } | - |
| 150 | QHostInfo::QHostInfo(int id) | - |
| 151 | : d(new QHostInfoPrivate) | - |
| 152 | { | - |
| 153 | d->lookupId = id; | - |
| 154 | } | - |
| 155 | | - |
| 156 | | - |
| 157 | | - |
| 158 | | - |
| 159 | QHostInfo::QHostInfo(const QHostInfo &other) | - |
| 160 | : d(new QHostInfoPrivate(*other.d.data())) | - |
| 161 | { | - |
| 162 | } | - |
| 163 | | - |
| 164 | | - |
| 165 | | - |
| 166 | | - |
| 167 | | - |
| 168 | QHostInfo &QHostInfo::operator=(const QHostInfo &other) | - |
| 169 | { | - |
| 170 | *d.data() = *other.d.data(); | - |
| 171 | return *this; | - |
| 172 | } | - |
| 173 | | - |
| 174 | | - |
| 175 | | - |
| 176 | | - |
| 177 | QHostInfo::~QHostInfo() | - |
| 178 | { | - |
| 179 | } | - |
| 180 | QList<QHostAddress> QHostInfo::addresses() const | - |
| 181 | { | - |
| 182 | return d->addrs; | - |
| 183 | } | - |
| 184 | | - |
| 185 | | - |
| 186 | | - |
| 187 | | - |
| 188 | | - |
| 189 | | - |
| 190 | void QHostInfo::setAddresses(const QList<QHostAddress> &addresses) | - |
| 191 | { | - |
| 192 | d->addrs = addresses; | - |
| 193 | } | - |
| 194 | | - |
| 195 | | - |
| 196 | | - |
| 197 | | - |
| 198 | | - |
| 199 | | - |
| 200 | QString QHostInfo::hostName() const | - |
| 201 | { | - |
| 202 | return d->hostName; | - |
| 203 | } | - |
| 204 | | - |
| 205 | | - |
| 206 | | - |
| 207 | | - |
| 208 | | - |
| 209 | | - |
| 210 | void QHostInfo::setHostName(const QString &hostName) | - |
| 211 | { | - |
| 212 | d->hostName = hostName; | - |
| 213 | } | - |
| 214 | | - |
| 215 | | - |
| 216 | | - |
| 217 | | - |
| 218 | | - |
| 219 | | - |
| 220 | | - |
| 221 | QHostInfo::HostInfoError QHostInfo::error() const | - |
| 222 | { | - |
| 223 | return d->err; | - |
| 224 | } | - |
| 225 | | - |
| 226 | | - |
| 227 | | - |
| 228 | | - |
| 229 | | - |
| 230 | | - |
| 231 | void QHostInfo::setError(HostInfoError error) | - |
| 232 | { | - |
| 233 | d->err = error; | - |
| 234 | } | - |
| 235 | | - |
| 236 | | - |
| 237 | | - |
| 238 | | - |
| 239 | | - |
| 240 | | - |
| 241 | int QHostInfo::lookupId() const | - |
| 242 | { | - |
| 243 | return d->lookupId; | - |
| 244 | } | - |
| 245 | | - |
| 246 | | - |
| 247 | | - |
| 248 | | - |
| 249 | | - |
| 250 | | - |
| 251 | void QHostInfo::setLookupId(int id) | - |
| 252 | { | - |
| 253 | d->lookupId = id; | - |
| 254 | } | - |
| 255 | | - |
| 256 | | - |
| 257 | | - |
| 258 | | - |
| 259 | | - |
| 260 | | - |
| 261 | | - |
| 262 | QString QHostInfo::errorString() const | - |
| 263 | { | - |
| 264 | return d->errorStr; | - |
| 265 | } | - |
| 266 | | - |
| 267 | | - |
| 268 | | - |
| 269 | | - |
| 270 | | - |
| 271 | | - |
| 272 | | - |
| 273 | void QHostInfo::setErrorString(const QString &str) | - |
| 274 | { | - |
| 275 | d->errorStr = str; | - |
| 276 | } | - |
| 277 | QString QHostInfo::localHostName() | - |
| 278 | { | - |
| 279 | return QSysInfo::machineHostName(); | - |
| 280 | } | - |
| 281 | QHostInfoRunnable::QHostInfoRunnable(const QString &hn, int i) : toBeLookedUp(hn), id(i) | - |
| 282 | { | - |
| 283 | setAutoDelete(true); | - |
| 284 | } | - |
| 285 | | - |
| 286 | | - |
| 287 | void QHostInfoRunnable::run() | - |
| 288 | { | - |
| 289 | QHostInfoLookupManager *manager = theHostInfoLookupManager(); | - |
| 290 | | - |
| 291 | if (manager->wasAborted(id)| TRUE | evaluated 107 times by 9 testsEvaluated by:- tst_QHostInfo
- tst_QTcpServer
- tst_QUdpSocket
- tst_lancelot - unknown status
- tst_qobject - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | evaluated 329 times by 14 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QUdpSocket
- tst_Spdy
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
|
) { | 107-329 |
| 292 | manager->lookupFinished(this); | - |
| 293 | return;executed 107 times by 9 tests: return;Executed by:- tst_QHostInfo
- tst_QTcpServer
- tst_QUdpSocket
- tst_lancelot - unknown status
- tst_qobject - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 107 |
| 294 | } | - |
| 295 | | - |
| 296 | QHostInfo hostInfo; | - |
| 297 | | - |
| 298 | | - |
| 299 | | - |
| 300 | | - |
| 301 | if (manager->cache.isEnabled()| TRUE | evaluated 151 times by 14 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QUdpSocket
- tst_Spdy
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | evaluated 178 times by 1 test |
) { | 151-178 |
| 302 | | - |
| 303 | bool valid = false; | - |
| 304 | hostInfo = manager->cache.get(toBeLookedUp, &valid); | - |
| 305 | if (!valid| TRUE | evaluated 151 times by 14 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QUdpSocket
- tst_Spdy
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | never evaluated |
) { | 0-151 |
| 306 | | - |
| 307 | hostInfo = QHostInfoAgent::fromName(toBeLookedUp); | - |
| 308 | manager->cache.put(toBeLookedUp, hostInfo); | - |
| 309 | }executed 151 times by 14 tests: end of blockExecuted by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_Spdy
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
| 151 |
| 310 | }executed 151 times by 14 tests: end of blockExecuted by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_Spdy
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
else { | 151 |
| 311 | | - |
| 312 | hostInfo = QHostInfoAgent::fromName(toBeLookedUp); | - |
| 313 | }executed 178 times by 1 test: end of block | 178 |
| 314 | | - |
| 315 | | - |
| 316 | if (manager->wasAborted(id)| TRUE | evaluated 124 times by 4 testsEvaluated by:- tst_QHostInfo
- tst_qobject - unknown status
- tst_qsslsocket - unknown status
- tst_qudpsocket - unknown status
| | FALSE | evaluated 205 times by 12 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_Spdy
- tst_qhttpsocketengine - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
|
) { | 124-205 |
| 317 | manager->lookupFinished(this); | - |
| 318 | return;executed 124 times by 4 tests: return;Executed by:- tst_QHostInfo
- tst_qobject - unknown status
- tst_qsslsocket - unknown status
- tst_qudpsocket - unknown status
| 124 |
| 319 | } | - |
| 320 | | - |
| 321 | | - |
| 322 | hostInfo.setLookupId(id); | - |
| 323 | resultEmitter.emitResultsReady(hostInfo); | - |
| 324 | | - |
| 325 | | - |
| 326 | { | - |
| 327 | QMutexLocker locker(&manager->mutex); | - |
| 328 | QMutableListIterator<QHostInfoRunnable*> iteratorconst auto partitionBegin = std::stable_partition(manager->postponedLookups); | - |
| while (iterator.hasNext()) { | |
| QHostInfoRunnable* postponed = iteratorrbegin(), manager->postponedLookups.next(); | |
| ifrend(), | |
| 329 | ToBeLookedUpEquals(toBeLookedUp== postponed)).base(); | - |
| 330 | const auto partitionEnd = manager->toBeLookedUp) { | - |
| | |
| iteratorpostponedLookups.removeend(); | |
| 331 | for (auto it = partitionBegin; it != partitionEnd| TRUE | evaluated 475 times by 2 testsEvaluated by:- tst_QHostInfo
- tst_qtcpsocket - unknown status
| | FALSE | evaluated 205 times by 12 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_Spdy
- tst_qhttpsocketengine - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
|
; ++it) { | 205-475 |
| 332 | QHostInfoRunnable* postponed = *it; | - |
| 333 | | - |
| 334 | hostInfo.setLookupId(postponed->id); | - |
| 335 | postponed->resultEmitter.emitResultsReady(hostInfo); | - |
| 336 | delete postponed; | - |
| 337 | }}executed 475 times by 2 tests: end of blockExecuted by:- tst_QHostInfo
- tst_qtcpsocket - unknown status
| 475 |
| 338 | manager->postponedLookups.erase(partitionBegin, partitionEnd); | - |
| 339 | } | - |
| 340 | | - |
| 341 | manager->lookupFinished(this); | - |
| 342 | | - |
| 343 | | - |
| 344 | }executed 205 times by 12 tests: end of blockExecuted by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_Spdy
- tst_qhttpsocketengine - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qtcpsocket - unknown status
| 205 |
| 345 | | - |
| 346 | QHostInfoLookupManager::QHostInfoLookupManager() : mutex(QMutex::Recursive), wasDeleted(false) | - |
| 347 | { | - |
| 348 | moveToThread(QCoreApplicationPrivate::mainThread()); | - |
| 349 | connect(QCoreApplication::instance(), qFlagLocation("2""destroyed()" "\0" __FILE__ ":" "514""558"), qFlagLocation("1""waitForThreadPoolDone()" "\0" __FILE__ ":" "514""558"), Qt::DirectConnection); | - |
| 350 | threadPool.setMaxThreadCount(20); | - |
| 351 | } | - |
| 352 | | - |
| 353 | QHostInfoLookupManager::~QHostInfoLookupManager() | - |
| 354 | { | - |
| 355 | wasDeleted = true; | - |
| 356 | | - |
| 357 | | - |
| 358 | clear(); | - |
| 359 | } | - |
| 360 | | - |
| 361 | void QHostInfoLookupManager::clear() | - |
| 362 | { | - |
| 363 | { | - |
| 364 | QMutexLocker locker(&mutex); | - |
| 365 | qDeleteAll(postponedLookups); | - |
| 366 | qDeleteAll(scheduledLookups); | - |
| 367 | qDeleteAll(finishedLookups); | - |
| 368 | postponedLookups.clear(); | - |
| 369 | scheduledLookups.clear(); | - |
| 370 | finishedLookups.clear(); | - |
| 371 | } | - |
| 372 | | - |
| 373 | threadPool.waitForDone(); | - |
| 374 | cache.clear(); | - |
| 375 | } | - |
| 376 | | - |
| 377 | void QHostInfoLookupManager::work() | - |
| 378 | { | - |
| 379 | if (wasDeleted| TRUE | never evaluated | | FALSE | evaluated 4074 times by 19 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
|
) | 0-4074 |
| 380 | return; never executed: return; | 0 |
| 381 | | - |
| 382 | | - |
| 383 | | - |
| 384 | | - |
| 385 | | - |
| 386 | QMutexLocker locker(&mutex); | - |
| 387 | | - |
| 388 | if (!finishedLookups.isEmpty()| TRUE | evaluated 436 times by 19 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
| | FALSE | evaluated 3638 times by 18 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
|
) { | 436-3638 |
| 389 | | - |
| 390 | for (int i = 0; i < finishedLookups.length()| TRUE | evaluated 436 times by 19 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
| | FALSE | evaluated 436 times by 19 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
|
; i++) { | 436 |
| 391 | abortedLookups.removeAll(finishedLookups.at(i)->id); | - |
| 392 | }executed 436 times by 19 tests: end of blockExecuted by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
| 436 |
| 393 | | - |
| 394 | finishedLookups.clear(); | - |
| 395 | }executed 436 times by 19 tests: end of blockExecuted by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
| 436 |
| 396 | | - |
| 397 | if (!postponedLookups.isEmpty()) { | - |
| | |
| | |
| QMutableListIterator<QHostInfoRunnable*> iterator(postponedLookups); | |
| while (iterator.hasNext()) {auto isAlreadyRunning = [this](QHostInfoRunnable *postponed = iterator.next(); | |
| | |
| | |
| bool alreadyRunning = false; | |
| forlookup) { | |
| 398 | returnexecuted 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
any_ofexecuted 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
executed 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
(int i = 0; i <currentLookups.length(); i++) {executed 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 22720 |
| if (executed 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
executed 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
cbegin(), currentLookups.atcend(), ToBeLookedUpEquals(i)->toBeLookedUp == postponedlookup->toBeLookedUp) {executed 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| |
| alreadyRunning = true;executed 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| |
| break;executed 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| |
| }executed 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| |
| }executed 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| |
| if (!alreadyRunning) {executed 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| |
| iteratorexecuted 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
executed 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
));executed 22720 times by 18 tests: return any_of(currentLookups.cbegin(), currentLookups.cend(), ToBeLookedUpEquals(lookup->toBeLookedUp));Executed by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| |
| 399 | }; | - |
| 400 | | - |
| 401 | | - |
| 402 | postponedLookups.remove(); | - |
| scheduledLookupserase(separate_if(postponedLookups.prependbegin(), | |
| 403 | postponedLookups.end(), | - |
| 404 | postponedLookups.begin(), | - |
| 405 | std::front_inserter(postponed); | - |
| } | |
| } | |
| } | |
| | |
| if (!scheduledLookups), | |
| 406 | isAlreadyRunning).first, | - |
| 407 | postponedLookups.isEmpty()) { | - |
| | |
| QMutableListIterator<QHostInfoRunnable*> iterator(end()); | |
| 408 | | - |
| 409 | | - |
| 410 | scheduledLookups); | - |
| while.erase(iteratorseparate_if(scheduledLookups.hasNext()) { | |
| QHostInfoRunnable *scheduled = iteratorbegin(), | |
| 411 | scheduledLookups.next(); | - |
| | |
| | |
| forend(), | |
| 412 | std::back_inserter(postponedLookups), | - |
| 413 | scheduledLookups.begin(), | - |
| 414 | isAlreadyRunning).second, | - |
| 415 | scheduledLookups.end()); | - |
| 416 | | - |
| 417 | const int iavailableThreads = 0; i <threadPool.maxThreadCount() - currentLookups.size(); | - |
| 418 | i++) {if (currentLookups.at(i)->toBeLookedUp == scheduled->toBeLookedUpavailableThreads > 0| TRUE | evaluated 4074 times by 19 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
| | FALSE | never evaluated |
) { | 0-4074 |
| 419 | iterator.remove(); | - |
| postponedLookups.append(scheduled); | |
| scheduledint readyToStartCount = 0; | |
| break; | |
| } | |
| } | |
| | |
| ifqMin(scheduled && currentLookupsavailableThreads, scheduledLookups.size() < threadPool()); | |
| 420 | auto it = scheduledLookups.maxThreadCount())begin(); | - |
| 421 | while (readyToStartCount--| TRUE | evaluated 436 times by 18 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| | FALSE | evaluated 4074 times by 19 testsEvaluated by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
|
) { | 436-4074 |
| 422 | | - |
| 423 | threadPool.start(scheduled(*it); | - |
| 424 | iterator.remove();currentLookups.appendpush_back(scheduled); | - |
| } else { | |
| | |
| continuestd::move(*it)); | |
| 425 | ++it; | - |
| 426 | }executed 436 times by 18 tests: end of blockExecuted by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 436 |
| 427 | };scheduledLookups.erase(scheduledLookups.begin(), it); | - |
| 428 | }executed 4074 times by 19 tests: end of blockExecuted by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
| 4074 |
| 429 | }executed 4074 times by 19 tests: end of blockExecuted by:- tst_QFtp
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QTcpServer
- tst_QUdpSocket
- tst_Spdy
- tst_lancelot - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qobject - unknown status
- tst_qprocess - unknown status
- tst_qsocks5socketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qudpsocket - unknown status
| 4074 |
| 430 | | - |
| 431 | | - |
| 432 | void QHostInfoLookupManager::scheduleLookup(QHostInfoRunnable *r) | - |
| 433 | { | - |
| 434 | if (wasDeleted) | - |
| 435 | return; | - |
| 436 | | - |
| 437 | QMutexLocker locker(&this->mutex); | - |
| 438 | scheduledLookups.enqueue(r); | - |
| 439 | work(); | - |
| 440 | } | - |
| 441 | | - |
| 442 | | - |
| 443 | void QHostInfoLookupManager::abortLookup(int id) | - |
| 444 | { | - |
| 445 | if (wasDeleted) | - |
| 446 | return; | - |
| 447 | | - |
| 448 | QMutexLocker locker(&this->mutex); | - |
| 449 | | - |
| 450 | | - |
| 451 | for (int i = 0; i < postponedLookups.length(); i++) { | - |
| 452 | if (postponedLookups.at(i)->id == id) { | - |
| 453 | delete postponedLookups.takeAt(i); | - |
| 454 | return; | - |
| 455 | } | - |
| 456 | } | - |
| 457 | | - |
| 458 | | - |
| 459 | for (int i = 0; i < scheduledLookups.length(); i++) { | - |
| 460 | if (scheduledLookups.at(i)->id == id) { | - |
| 461 | delete scheduledLookups.takeAt(i); | - |
| 462 | return; | - |
| 463 | } | - |
| 464 | } | - |
| 465 | | - |
| 466 | if (!abortedLookups.contains(id)) | - |
| 467 | abortedLookups.append(id); | - |
| 468 | } | - |
| 469 | | - |
| 470 | | - |
| 471 | bool QHostInfoLookupManager::wasAborted(int id) | - |
| 472 | { | - |
| 473 | if (wasDeleted) | - |
| 474 | return true; | - |
| 475 | | - |
| 476 | QMutexLocker locker(&this->mutex); | - |
| 477 | return abortedLookups.contains(id); | - |
| 478 | } | - |
| 479 | | - |
| 480 | | - |
| 481 | void QHostInfoLookupManager::lookupFinished(QHostInfoRunnable *r) | - |
| 482 | { | - |
| 483 | if (wasDeleted) | - |
| 484 | return; | - |
| 485 | | - |
| 486 | QMutexLocker locker(&this->mutex); | - |
| 487 | currentLookups.removeOne(r); | - |
| 488 | finishedLookups.append(r); | - |
| 489 | work(); | - |
| 490 | } | - |
| 491 | | - |
| 492 | | - |
| 493 | QHostInfo qt_qhostinfo_lookup(const QString &name, QObject *receiver, const char *member, bool *valid, int *id) | - |
| 494 | { | - |
| 495 | *valid = false; | - |
| 496 | *id = -1; | - |
| 497 | | - |
| 498 | | - |
| 499 | QAbstractHostInfoLookupManager* manager = theHostInfoLookupManager(); | - |
| 500 | if (manager && manager->cache.isEnabled()) { | - |
| 501 | QHostInfo info = manager->cache.get(name, valid); | - |
| 502 | if (*valid) { | - |
| 503 | return info; | - |
| 504 | } | - |
| 505 | } | - |
| 506 | | - |
| 507 | | - |
| 508 | *id = QHostInfo::lookupHost(name, receiver, member); | - |
| 509 | | - |
| 510 | | - |
| 511 | return QHostInfo(); | - |
| 512 | } | - |
| 513 | | - |
| 514 | void qt_qhostinfo_clear_cache() | - |
| 515 | { | - |
| 516 | QAbstractHostInfoLookupManager* manager = theHostInfoLookupManager(); | - |
| 517 | if (manager) { | - |
| 518 | manager->clear(); | - |
| 519 | } | - |
| 520 | } | - |
| 521 | | - |
| 522 | | - |
| 523 | void __attribute__((visibility("default"))) qt_qhostinfo_enable_cache(bool e) | - |
| 524 | { | - |
| 525 | QAbstractHostInfoLookupManager* manager = theHostInfoLookupManager(); | - |
| 526 | if (manager) { | - |
| 527 | manager->cache.setEnabled(e); | - |
| 528 | } | - |
| 529 | } | - |
| 530 | | - |
| 531 | void qt_qhostinfo_cache_inject(const QString &hostname, const QHostInfo &resolution) | - |
| 532 | { | - |
| 533 | QAbstractHostInfoLookupManager* manager = theHostInfoLookupManager(); | - |
| 534 | if (!manager || !manager->cache.isEnabled()) | - |
| 535 | return; | - |
| 536 | | - |
| 537 | manager->cache.put(hostname, resolution); | - |
| 538 | } | - |
| 539 | | - |
| 540 | | - |
| 541 | | - |
| 542 | | - |
| 543 | QHostInfoCache::QHostInfoCache() : max_age(60), enabled(true), cache(128) | - |
| 544 | { | - |
| 545 | | - |
| 546 | | - |
| 547 | | - |
| 548 | } | - |
| 549 | | - |
| 550 | bool QHostInfoCache::isEnabled() | - |
| 551 | { | - |
| 552 | return enabled; | - |
| 553 | } | - |
| 554 | | - |
| 555 | | - |
| 556 | | - |
| 557 | void QHostInfoCache::setEnabled(bool e) | - |
| 558 | { | - |
| 559 | enabled = e; | - |
| 560 | } | - |
| 561 | | - |
| 562 | | - |
| 563 | QHostInfo QHostInfoCache::get(const QString &name, bool *valid) | - |
| 564 | { | - |
| 565 | QMutexLocker locker(&this->mutex); | - |
| 566 | | - |
| 567 | *valid = false; | - |
| 568 | if (QHostInfoCacheElement *element = cache.object(name)) { | - |
| 569 | if (element->age.elapsed() < max_age*1000) | - |
| 570 | *valid = true; | - |
| 571 | return element->info; | - |
| 572 | | - |
| 573 | | - |
| 574 | | - |
| 575 | | - |
| 576 | } | - |
| 577 | | - |
| 578 | return QHostInfo(); | - |
| 579 | } | - |
| 580 | | - |
| 581 | void QHostInfoCache::put(const QString &name, const QHostInfo &info) | - |
| 582 | { | - |
| 583 | | - |
| 584 | if (info.error() != QHostInfo::NoError) | - |
| 585 | return; | - |
| 586 | | - |
| 587 | QHostInfoCacheElement* element = new QHostInfoCacheElement(); | - |
| 588 | element->info = info; | - |
| 589 | element->age = QElapsedTimer(); | - |
| 590 | element->age.start(); | - |
| 591 | | - |
| 592 | QMutexLocker locker(&this->mutex); | - |
| 593 | cache.insert(name, element); | - |
| 594 | } | - |
| 595 | | - |
| 596 | void QHostInfoCache::clear() | - |
| 597 | { | - |
| 598 | QMutexLocker locker(&this->mutex); | - |
| 599 | cache.clear(); | - |
| 600 | } | - |
| 601 | | - |
| 602 | QAbstractHostInfoLookupManager* QAbstractHostInfoLookupManager::globalInstance() | - |
| 603 | { | - |
| 604 | return theHostInfoLookupManager(); | - |
| 605 | } | - |
| 606 | | - |
| 607 | | - |
| | |