summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3497660)
Modify queuedCapsDisplay to only add a ", " when both
_capsQueuedIndividual and _capsQueuedBundled are not empty. This
avoids adding a spurious ", " when there's only individual caps, e.g.
SASL. Though the docs don't mention it, QStringList.join() will only
add the separator when there's more than one item in the list.
Before:
* Negotiating capabilities (requesting: sasl, )...
After:
* Negotiating capabilities (requesting: sasl)...
See https://doc.qt.io/qt-5/qstringlist.html#join
Closes GH-334.
tr("Ready to negotiate (found: %1)").arg(caps().join(", ")));
// Build a list of queued capabilities, starting with individual, then bundled, only adding the
tr("Ready to negotiate (found: %1)").arg(caps().join(", ")));
// Build a list of queued capabilities, starting with individual, then bundled, only adding the
- // comma separator between the two if needed.
+ // comma separator between the two if needed (both individual and bundled caps exist).
QString queuedCapsDisplay =
QString queuedCapsDisplay =
- (!_capsQueuedIndividual.empty() ? _capsQueuedIndividual.join(", ") + ", " : "")
+ _capsQueuedIndividual.join(", ")
+ + ((!_capsQueuedIndividual.empty() && !_capsQueuedBundled.empty()) ? ", " : "")
+ _capsQueuedBundled.join(", ");
displayMsg(Message::Server, BufferInfo::StatusBuffer, "",
tr("Negotiating capabilities (requesting: %1)...").arg(queuedCapsDisplay));
+ _capsQueuedBundled.join(", ");
displayMsg(Message::Server, BufferInfo::StatusBuffer, "",
tr("Negotiating capabilities (requesting: %1)...").arg(queuedCapsDisplay));