From: Shane Synan Date: Mon, 27 Jan 2020 06:53:16 +0000 (-0500) Subject: core: Clarify name of capsPendingNegotiation flag X-Git-Tag: test-travis-01~3 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=d48c2331b38ae46732ac1ab9f35a3a0b85100f92 core: Clarify name of capsPendingNegotiation flag Rename "capNegotiationInProgress()" to "capsPendingNegotiation()" to better clarify the meaning of the function. This checks if any capabilities are queued for an ongoing negotiation; it does not represent whether or not "CAP LS" has been sent. --- diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 8dccbd5d..0dfb33b7 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -1267,7 +1267,7 @@ void CoreNetwork::retryCapsIndividually() void CoreNetwork::beginCapNegotiation() { - if (!capNegotiationInProgress()) { + if (!capsPendingNegotiation()) { // No capabilities are queued for request, determine the reason why QString capStatusMsg; if (caps().empty()) { @@ -1327,7 +1327,7 @@ void CoreNetwork::beginCapNegotiation() void CoreNetwork::sendNextCap() { - if (capNegotiationInProgress()) { + if (capsPendingNegotiation()) { // Request the next set of capabilities and remove them from the list putRawLine(serverEncode(QString("CAP REQ :%1").arg(takeQueuedCaps()))); } diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index 2bd34518..510b5fbc 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -141,7 +141,7 @@ public: * * @returns True if in progress, otherwise false */ - inline bool capNegotiationInProgress() const { return (!_capsQueuedIndividual.empty() || !_capsQueuedBundled.empty()); } + inline bool capsPendingNegotiation() const { return (!_capsQueuedIndividual.empty() || !_capsQueuedBundled.empty()); } /** * Queues a capability to be requested.