diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2021-03-11 13:50:56 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2021-03-18 19:53:56 -0800 |
commit | 8614491aa1a19973f2039c5c5f2e5551cc535b8c (patch) | |
tree | 3e07fe80161487b79a11e67d6dc6de1b54f1c383 /tests/auto/network/kernel | |
parent | 180f78d12680f1954f9ea3f4b00200ecfa1a853e (diff) |
QAbstractSocket: fake a bind(QHostAddress::SpecialAddress)
Because this is misleading:
socket.bind(QHostAddress::AnyIPv4);
The conversion of enum to int has preference over the construction of
QHostAddress from enum, so that ends up calling bind(6), which attempts
to bind to privileged port 6 and just returns with error. Meanwhile,
socket.bind(QHostAddress::AnyIPv4, 0);
does construct the QHostAddress because that is preferred to converting
the int to the BindMode enum.
Ideally we'd simply add the overload to QAbstractSocket but we can't do
that because QHostAddress depends on QAbstractSocket. So I've added a
Qt7 task to invert that dependency.
Change-Id: I26b8286f61534f88b649fffd166b683266597796
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/network/kernel')
0 files changed, 0 insertions, 0 deletions