diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-11-18 17:01:26 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-11-20 19:43:38 +0100 |
commit | af2daafde72db02454d24b7d691aa6861525ab99 (patch) | |
tree | b59c47baf8af94a6ace5cbf4338944272e40e32b /src/network/access | |
parent | 8bc4ea1e97c138034d08c705a75f75763361400b (diff) |
Deprecate constructing QFlags from a pointer
This was used to support QFlags f = 0 initialization, but with 0 used
as a pointer literal now considered bad form, it had been changed many
places to QFlags f = nullptr, which is meaningless and confusing.
Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qspdyprotocolhandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/network/access/qspdyprotocolhandler.cpp b/src/network/access/qspdyprotocolhandler.cpp index f845235bf7..cc913ce760 100644 --- a/src/network/access/qspdyprotocolhandler.cpp +++ b/src/network/access/qspdyprotocolhandler.cpp @@ -613,7 +613,7 @@ void QSpdyProtocolHandler::sendSYN_STREAM(const HttpMessagePair &messagePair, QHttpNetworkRequest request = messagePair.first; QHttpNetworkReply *reply = messagePair.second; - ControlFrameFlags flags = 0; + ControlFrameFlags flags; if (!request.uploadByteDevice()) { // no upload -> this is the last frame, send the FIN flag @@ -675,14 +675,14 @@ void QSpdyProtocolHandler::sendRST_STREAM(qint32 streamID, RST_STREAM_STATUS_COD char wireData[8]; appendIntToFourBytes(wireData, streamID); appendIntToFourBytes(wireData + 4, statusCode); - sendControlFrame(FrameType_RST_STREAM, /* flags = */ 0, wireData, /* length = */ 8); + sendControlFrame(FrameType_RST_STREAM, /* flags = */ { }, wireData, /* length = */ 8); } void QSpdyProtocolHandler::sendPING(quint32 pingID) { char rawData[4]; appendIntToFourBytes(rawData, pingID); - sendControlFrame(FrameType_PING, /* flags = */ 0, rawData, /* length = */ 4); + sendControlFrame(FrameType_PING, /* flags = */ { }, rawData, /* length = */ 4); } bool QSpdyProtocolHandler::uploadData(qint32 streamID) @@ -724,7 +724,7 @@ bool QSpdyProtocolHandler::uploadData(qint32 streamID) // nothing to read currently, break the loop break; } else { - DataFrameFlags flags = 0; + DataFrameFlags flags; // we will send the FIN flag later if appropriate qint64 currentWriteSize = sendDataFrame(streamID, flags, currentReadSize, readPointer); if (currentWriteSize == -1 || currentWriteSize != currentReadSize) { @@ -774,7 +774,7 @@ void QSpdyProtocolHandler::sendWINDOW_UPDATE(qint32 streamID, quint32 deltaWindo appendIntToFourBytes(windowUpdateData, streamID); appendIntToFourBytes(windowUpdateData + 4, deltaWindowSize); - sendControlFrame(FrameType_WINDOW_UPDATE, /* flags = */ 0, windowUpdateData, /* length = */ 8); + sendControlFrame(FrameType_WINDOW_UPDATE, /* flags = */ { }, windowUpdateData, /* length = */ 8); } qint64 QSpdyProtocolHandler::sendDataFrame(qint32 streamID, DataFrameFlags flags, |