summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qhostinfo.cpp
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2020-08-21 13:54:29 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2020-08-24 17:43:46 +0200
commit4573d29f6430b8dcb7651d5809ddf4fe5fd608fa (patch)
tree94fecb48cf96b27b8f55c4e10f8ee72101d3751b /src/network/kernel/qhostinfo.cpp
parent467d215b32ba1a4e7ac97a61726127158898093a (diff)
QHostInfo: address a Qt 6 todo
Merged the two functions, required adding a friend declaration Change-Id: I86265da19e4b5f53d9e2dc54de3e252f0364225b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/network/kernel/qhostinfo.cpp')
-rw-r--r--src/network/kernel/qhostinfo.cpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index f71c6d8509..b3d6844e43 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -286,7 +286,7 @@ static int nextId()
*/
int QHostInfo::lookupHost(const QString &name, QObject *receiver, const char *member)
{
- return QHostInfoPrivate::lookupHostImpl(name, receiver, nullptr, member);
+ return QHostInfo::lookupHostImpl(name, receiver, nullptr, member);
}
/*!
@@ -773,14 +773,8 @@ QString QHostInfo::localHostName()
\sa hostName()
*/
-// ### Qt 6 merge with function below
-int QHostInfo::lookupHostImpl(const QString &name,
- const QObject *receiver,
- QtPrivate::QSlotObjectBase *slotObj)
-{
- return QHostInfoPrivate::lookupHostImpl(name, receiver, slotObj, nullptr);
-}
-/*
+/*!
+ \internal
Called by the various lookupHost overloads to perform the lookup.
Signals either the functor encapuslated in the \a slotObj in the context
@@ -788,13 +782,13 @@ int QHostInfo::lookupHostImpl(const QString &name,
\a receiver might be the nullptr, but only if a \a slotObj is provided.
*/
-int QHostInfoPrivate::lookupHostImpl(const QString &name,
- const QObject *receiver,
- QtPrivate::QSlotObjectBase *slotObj,
- const char *member)
+int QHostInfo::lookupHostImpl(const QString &name,
+ const QObject *receiver,
+ QtPrivate::QSlotObjectBase *slotObj,
+ const char *member)
{
#if defined QHOSTINFO_DEBUG
- qDebug("QHostInfoPrivate::lookupHostImpl(\"%s\", %p, %p, %s)",
+ qDebug("QHostInfo::lookupHostImpl(\"%s\", %p, %p, %s)",
name.toLatin1().constData(), receiver, slotObj, member ? member + 1 : 0);
#endif
Q_ASSERT(!member != !slotObj); // one of these must be set, but not both
@@ -1098,7 +1092,7 @@ QHostInfo qt_qhostinfo_lookup(const QString &name, QObject *receiver, const char
}
// was not in cache, trigger lookup
- *id = QHostInfoPrivate::lookupHostImpl(name, receiver, nullptr, member);
+ *id = QHostInfo::lookupHostImpl(name, receiver, nullptr, member);
// return empty response, valid==false
return QHostInfo();