core: Clarify name of capsPendingNegotiation flag
authorShane Synan <digitalcircuit36939@gmail.com>
Mon, 27 Jan 2020 06:53:16 +0000 (01:53 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 12 Apr 2020 11:14:19 +0000 (13:14 +0200)
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.

src/core/corenetwork.cpp
src/core/corenetwork.h

index 8dccbd5..0dfb33b 100644 (file)
@@ -1267,7 +1267,7 @@ void CoreNetwork::retryCapsIndividually()
 
 void CoreNetwork::beginCapNegotiation()
 {
 
 void CoreNetwork::beginCapNegotiation()
 {
-    if (!capNegotiationInProgress()) {
+    if (!capsPendingNegotiation()) {
         // No capabilities are queued for request, determine the reason why
         QString capStatusMsg;
         if (caps().empty()) {
         // 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()
 {
 
 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())));
     }
         // Request the next set of capabilities and remove them from the list
         putRawLine(serverEncode(QString("CAP REQ :%1").arg(takeQueuedCaps())));
     }
index 2bd3451..510b5fb 100644 (file)
@@ -141,7 +141,7 @@ public:
      *
      * @returns True if in progress, otherwise false
      */
      *
      * @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.
 
     /**
      * Queues a capability to be requested.