From 97ecdf6a1b7f95bc1b342b3eaf141cd460249680 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 30 Apr 2016 18:48:40 +0100 Subject: Apply clang-tidy: modernize-loop-convert --- src/modules/channelsjoin/ChannelsJoinDialog.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/modules/channelsjoin/ChannelsJoinDialog.cpp') diff --git a/src/modules/channelsjoin/ChannelsJoinDialog.cpp b/src/modules/channelsjoin/ChannelsJoinDialog.cpp index 6e89eb6c0..6055c8703 100644 --- a/src/modules/channelsjoin/ChannelsJoinDialog.cpp +++ b/src/modules/channelsjoin/ChannelsJoinDialog.cpp @@ -209,10 +209,10 @@ void ChannelsJoinDialog::fillListView() hdr->setText(0, __tr2qs("Current Network")); hdr->setExpanded(true); - for(QStringList::Iterator it = pList->begin(); it != pList->end(); ++it) + for(auto & it : *pList) { chld = new QTreeWidgetItem(hdr, RecentChannelItem); - chld->setText(0, *it); + chld->setText(0, it); chld->setIcon(0, *(g_pIconManager->getSmallIcon(KviIconManager::Channel))); } hdr->sortChildren(0, Qt::AscendingOrder); @@ -234,9 +234,8 @@ void ChannelsJoinDialog::fillListView() for(QStringList * pChans = pDict->first(); pChans; pChans = pDict->next()) { - for(QStringList::Iterator it = pChans->begin(); it != pChans->end(); ++it) + for(auto chan : *pChans) { - QString chan = *it; if(hNoDuplicates.contains(chan.toLower())) continue; hNoDuplicates.insert(chan.toLower(), 1); -- cgit v1.3.1-10-gc9f91