diff options
author | Giuseppe D'Angelo <[email protected]> | 2023-09-04 20:14:57 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <[email protected]> | 2023-09-05 15:00:38 +0200 |
commit | 4367abb75a8ce07344006efd17317d5ad8e03f5f (patch) | |
tree | af14c5fb24c740792f1233669f04350567346a6f | |
parent | c8be7c6a6c8bdefea523428163fe03186fd42ce5 (diff) |
QHostInfo::lookupHost: enable QT_NO_CONTEXTLESS_CONNECT
QHostInfo::lookupHost uses some QObject private APIs in order to have a
invoke a slot/function when the lookup is finished. The overload that
simply takes a function (and not a context object) was still available
even under QT_NO_CONTEXTLESS_CONNECT, because indeed the implementation
bypasses the public QObject::connect API. Hence, explicitly the overload
that doesn't take a context object.
Change-Id: Ibf5b0efc49b7f9c8d045862ae061f4e05ee1b769
Reviewed-by: Thiago Macieira <[email protected]>
-rw-r--r-- | src/network/kernel/qhostinfo.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/kernel/qhostinfo.h b/src/network/kernel/qhostinfo.h index 600e97d80af..b4b66f43fe2 100644 --- a/src/network/kernel/qhostinfo.h +++ b/src/network/kernel/qhostinfo.h @@ -73,12 +73,14 @@ public: } #endif // Q_QDOC +#ifndef QT_NO_CONTEXTLESS_CONNECT // lookupHost to a callable (without context) template <typename Functor> static inline int lookupHost(const QString &name, Functor &&slot) { return lookupHost(name, nullptr, std::forward<Functor>(slot)); } +#endif // QT_NO_CONTEXTLESS_CONNECT private: QHostInfoPrivate *d_ptr; |