Use NSDMI to initialize the member variables of QIpPacketHeader

While adding senderPort to the initializer list of the constructor we
have decided that NSDMI would be a better approach for the member
variables.

Task-number: QTBUG-125026
Pick-to: 6.8 6.7 6.5
Change-Id: Ibc65251f99a66f1d7ee0c3570e608c2b534aa8b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
Mate Barany 2024-07-12 11:25:50 +02:00
parent b294927a12
commit 5e2635e345

View File

@ -24,9 +24,7 @@ class QIpPacketHeader
{
public:
QIpPacketHeader(const QHostAddress &dstAddr = QHostAddress(), quint16 port = 0)
: destinationAddress(dstAddr), ifindex(0), hopLimit(-1), streamNumber(-1),
senderPort(0),
destinationPort(port), endOfRecord(false)
: destinationAddress(dstAddr), destinationPort(port)
{}
void clear()
@ -42,12 +40,12 @@ public:
QHostAddress senderAddress;
QHostAddress destinationAddress;
uint ifindex;
int hopLimit;
int streamNumber;
quint16 senderPort;
uint ifindex = 0;
int hopLimit = -1;
int streamNumber = -1;
quint16 senderPort = 0;
quint16 destinationPort;
bool endOfRecord;
bool endOfRecord = false;
};
class QNetworkDatagramPrivate