summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpprotocolhandler.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-06-27 15:43:33 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-08-19 18:38:53 +0000
commit9f888d2fde9c5413e5519e0914e9b13638760985 (patch)
tree7e211a2ae70c272ea8041d5100f0c9a67b32de1b /src/network/access/qhttpprotocolhandler.cpp
parent25dd9c521fc064a71db63b110b7973225ee20c02 (diff)
Support C++17 fallthrough attribute
Replaces our mix of comments for annotating intended absence of break in switches with the C++17 attribute [[fallthrough]], or its earlier a clang extension counterpart. Change-Id: I4b2d0b9b5e4425819c7f1bf01608093c536b6d14 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/access/qhttpprotocolhandler.cpp')
-rw-r--r--src/network/access/qhttpprotocolhandler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/network/access/qhttpprotocolhandler.cpp b/src/network/access/qhttpprotocolhandler.cpp
index b486b75449..37e8b9bed8 100644
--- a/src/network/access/qhttpprotocolhandler.cpp
+++ b/src/network/access/qhttpprotocolhandler.cpp
@@ -99,7 +99,7 @@ void QHttpProtocolHandler::_q_receiveReply()
switch (state) {
case QHttpNetworkReplyPrivate::NothingDoneState: {
m_reply->d_func()->state = QHttpNetworkReplyPrivate::ReadingStatusState;
- // fallthrough
+ Q_FALLTHROUGH();
}
case QHttpNetworkReplyPrivate::ReadingStatusState: {
qint64 statusBytes = m_reply->d_func()->readStatus(m_socket);
@@ -213,7 +213,8 @@ void QHttpProtocolHandler::_q_receiveReply()
if (replyPrivate->state == QHttpNetworkReplyPrivate::ReadingDataState)
break;
- // everything done, fall through
+ // everything done
+ Q_FALLTHROUGH();
}
case QHttpNetworkReplyPrivate::AllDoneState:
m_channel->allDone();
@@ -428,7 +429,7 @@ bool QHttpProtocolHandler::sendRequest()
}
case QHttpNetworkConnectionChannel::ReadingState:
// ignore _q_bytesWritten in these states
- // fall through
+ Q_FALLTHROUGH();
default:
break;
}