Pre Qt v5.11 compatibility

This commit is contained in:
Bill Somerville 2020-11-03 23:07:38 +00:00
parent ced3b523ea
commit ff6f01c6b5
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -117,6 +117,16 @@ namespace std
}
#endif
inline
bool is_broadcast_address (QHostAddress const& host_addr)
{
#if QT_VERSION >= 0x051100
return host_addr.isBroadcast ();
#else
bool ok;
return host_addr.toIPv4Address (&ok) == 0xffffffffu && ok;
#endif
}
inline
bool is_multicast_address (QHostAddress const& host_addr)