When binding with the DefaultForPlatform bindmode, then don't set
options on the socket related to sharability, leave them at the
platform default.
This restores compatiblity with Qt 4
Change-Id: I612a3acb976f08446b4eef03ccdcdf84b3477c3c
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
return false;
}
+ if (mode != DefaultForPlatform) {
#ifdef Q_OS_UNIX
if ((mode & ShareAddress) || (mode & ReuseAddressHint))
d->socketEngine->setOption(QAbstractSocketEngine::AddressReusable, 1);
else
d->socketEngine->setOption(QAbstractSocketEngine::BindExclusively, 0);
#endif
+ }
bool result = d->socketEngine->bind(address, port);
d->cachedSocketDescriptor = d->socketEngine->socketDescriptor();