UDP: Protect call to UDP API based on feature

Fails to compile in some qtlite setup

Pick-to: 6.7 6.6 6.5
Change-Id: If04c1ca3f1b4eb59517902b8caab167f4627391b
Reviewed-by: Jari Helaakoski <jari.helaakoski@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Mårten Nordheim 2024-03-20 10:39:18 +01:00
parent 08cb919aa5
commit 505e7ec37d
1 changed files with 5 additions and 1 deletions

View File

@ -643,7 +643,11 @@ bool QAbstractSocketPrivate::canReadNotification()
socketEngine->setReadNotificationEnabled(false);
return true;
}
if (!isUdpSocket || socketEngine->hasPendingDatagrams()) {
if (!isUdpSocket
#if QT_CONFIG(udpsocket)
|| socketEngine->hasPendingDatagrams()
#endif
) {
hasPendingData = true;
hasPendingDatagram = isUdpSocket;
}