18#include <QtNetwork/private/qtnetworkglobal_p.h>
19#include "QtCore/qcoreapplication.h"
20#include "private/qcoreapplication_p.h"
21#include "private/qmetaobject_p.h"
22#include "QtNetwork/qhostinfo.h"
23#include "QtCore/qmutex.h"
24#include "QtCore/qwaitcondition.h"
25#include "QtCore/qobject.h"
26#include "QtCore/qpointer.h"
27#include "QtCore/qthread.h"
29#include "QtCore/qthreadpool.h"
31#include "QtCore/qrunnable.h"
32#include "QtCore/qlist.h"
33#include "QtCore/qqueue.h"
34#include <QElapsedTimer>
47 : receiver(receiver), slotObj(slotObj),
48 withContextObject(slotObj && receiver)
64 : receiver(
other->receiver), slotObj(
other->slotObj),
65 withContextObject(
other->withContextObject)
76 const bool withContextObject =
false;
131 struct QHostInfoCacheElement {
190 void rescheduleWithMutexHeld();
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
void aboutToQuit(QPrivateSignal)
This signal is emitted when the application is about to quit the main event loop, e....
The QHostAddress class provides an IP address.
static QHostInfo lookup(const QString &hostName)
static QHostInfo reverseLookup(const QHostAddress &address)
static QHostInfo fromName(const QString &hostName)
QHostInfo get(const QString &name, bool *valid)
void put(const QString &name, const QHostInfo &info)
~QHostInfoLookupManager()
QQueue< QHostInfoRunnable * > scheduledLookups
void lookupFinished(QHostInfoRunnable *r)
void scheduleLookup(QHostInfoRunnable *r)
QList< int > abortedLookups
QList< QHostInfoRunnable * > finishedLookups
static int lookupHostImpl(const QString &name, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, const char *member)
QList< QHostAddress > addrs
QHostInfo::HostInfoError err
void resultsReady(const QHostInfo &info)
void postResultsReady(const QHostInfo &info)
QHostInfoResult(const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj)
void run() override
Implement this pure virtual function in your subclass.
QHostInfoResult resultEmitter
The QHostInfo class provides static functions for host name lookups.
HostInfoError
This enum describes the various errors that can occur when trying to resolve a host name.
void moveToThread(QThread *thread)
Changes the thread affinity for this object and its children.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
QThread * thread() const
Returns the thread in which the object lives.
void deleteLater()
\threadsafe
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
void Q_AUTOTEST_EXPORT qt_qhostinfo_clear_cache()
void Q_AUTOTEST_EXPORT qt_qhostinfo_enable_cache(bool e)
QHostInfo Q_NETWORK_EXPORT qt_qhostinfo_lookup(const QString &name, QObject *receiver, const char *member, bool *valid, int *id)
void Q_AUTOTEST_EXPORT qt_qhostinfo_cache_inject(const QString &hostname, const QHostInfo &resolution)
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLuint GLuint64EXT address
#define Q_AUTOTEST_EXPORT
#define QT_TRANSLATE_NOOP(scope, x)
QFileInfo info(fileName)
[8]