diff options
author | Tobias Markmann <tm@ayena.de> | 2016-11-23 07:09:39 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-11-23 11:30:02 (GMT) |
commit | e405ff3561be3d3c0bd79d7d5173923a8828cf02 (patch) | |
tree | 9118ef838ebfaec1df90ec24761944b5d833774c /Swift/QtUI/Roster/RosterTooltip.cpp | |
parent | 8a71b91be885652f37c5aab5e1ecf25af4599fbc (diff) | |
download | swift-e405ff3561be3d3c0bd79d7d5173923a8828cf02.zip swift-e405ff3561be3d3c0bd79d7d5173923a8828cf02.tar.bz2 |
Migrate remaining Swiften/Base/foreach.h use to range-based for loop
Test-Information:
Build on macOS 10.12.1 and all tests pass.
Change-Id: Iedaa3fa7e7672c77909fd0568bf30e9393cb87e0
Diffstat (limited to 'Swift/QtUI/Roster/RosterTooltip.cpp')
-rw-r--r-- | Swift/QtUI/Roster/RosterTooltip.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Swift/QtUI/Roster/RosterTooltip.cpp b/Swift/QtUI/Roster/RosterTooltip.cpp index 8d467fd..ea4c9cd 100644 --- a/Swift/QtUI/Roster/RosterTooltip.cpp +++ b/Swift/QtUI/Roster/RosterTooltip.cpp @@ -122,7 +122,7 @@ QString RosterTooltip::buildVCardSummary(VCard::ref vcard) { // star | name | content QString currentBlock; - foreach (const VCard::Telephone& tel, vcard->getTelephones()) { + for (const auto& tel : vcard->getTelephones()) { QString type = tel.isFax ? QObject::tr("Fax") : QObject::tr("Telephone"); QString field = buildVCardField(tel.isPreferred, type, htmlEscape(P2QSTRING(tel.number))); if (tel.isPreferred) { @@ -134,7 +134,7 @@ QString RosterTooltip::buildVCardSummary(VCard::ref vcard) { summary += currentBlock; currentBlock = ""; - foreach (const VCard::EMailAddress& mail, vcard->getEMailAddresses()) { + for (const auto& mail : vcard->getEMailAddresses()) { QString field = buildVCardField(mail.isPreferred, QObject::tr("E-Mail"), htmlEscape(P2QSTRING(mail.address))); if (mail.isPreferred) { currentBlock = field; @@ -145,14 +145,14 @@ QString RosterTooltip::buildVCardSummary(VCard::ref vcard) { summary += currentBlock; currentBlock = ""; - foreach (const VCard::Organization& org, vcard->getOrganizations()) { + for (const auto& org : vcard->getOrganizations()) { QString field = buildVCardField(false, QObject::tr("Organization"), htmlEscape(P2QSTRING(org.name))); currentBlock += field; } summary += currentBlock; currentBlock = ""; - foreach(const std::string& title, vcard->getTitles()) { + for (const auto& title : vcard->getTitles()) { QString field = buildVCardField(false, QObject::tr("Title"), htmlEscape(P2QSTRING(title))); currentBlock += field; } |