797edbc58c
The 3-arg QObject::connect() overload (the "contextless" one) simply forwards to the 4-arg overload, using the sender object as both the sender and the receiver/context. QHostInfo does not use connect() directly in order to emit notifications that a lookup is finished. Instead, it uses some of QObject private plumbing. When handling a lookup request that specifies a function to call when done, but no context object, QHostInfo passes nullptr as context/receiver. Change QHostInfoResult's behavior to always have a "receiver": in case the caller didn't specify one, use `this` (= the sender). As a drive-by, this allows to streamline some code. Change-Id: Ic2e63ac18ba36269036950b6f6b7fecea51d0c99 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake |