diff options
| author | 2016-04-30 18:48:40 +0100 | |
|---|---|---|
| committer | 2016-04-30 18:50:45 +0100 | |
| commit | 97ecdf6a1b7f95bc1b342b3eaf141cd460249680 (patch) | |
| tree | dfa139170f95eeda51f241580cc019ab0f4684d8 /src/modules/logview/LogViewWindow.cpp | |
| parent | Apply clang-tidy: modernize-use-default (diff) | |
| download | KVIrc-97ecdf6a1b7f95bc1b342b3eaf141cd460249680.tar.gz KVIrc-97ecdf6a1b7f95bc1b342b3eaf141cd460249680.tar.bz2 KVIrc-97ecdf6a1b7f95bc1b342b3eaf141cd460249680.zip | |
Apply clang-tidy: modernize-loop-convert
Diffstat (limited to 'src/modules/logview/LogViewWindow.cpp')
| -rw-r--r-- | src/modules/logview/LogViewWindow.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/logview/LogViewWindow.cpp b/src/modules/logview/LogViewWindow.cpp index 287c2c513..68d02d51f 100644 --- a/src/modules/logview/LogViewWindow.cpp +++ b/src/modules/logview/LogViewWindow.cpp @@ -425,16 +425,16 @@ void LogViewWindow::itemSelected(QTreeWidgetItem * it, QTreeWidgetItem *) QStringList lines = szText.split('\n'); bool bOk; int iMsgType; - for(QStringList::Iterator it = lines.begin(); it != lines.end(); ++it) + for(auto & line : lines) { - QString szNum = (*it).section(' ', 0, 0); + QString szNum = line.section(' ', 0, 0); iMsgType = szNum.toInt(&bOk); if(iMsgType < 0 || iMsgType > (KVI_NUM_MSGTYPE_OPTIONS - 1)) iMsgType = 0; if(bOk) - outputNoFmt(iMsgType, (*it).section(' ', 1), KviIrcView::NoRepaint | KviIrcView::NoTimestamp); + outputNoFmt(iMsgType, line.section(' ', 1), KviIrcView::NoRepaint | KviIrcView::NoTimestamp); else - outputNoFmt(0, *it, KviIrcView::NoRepaint | KviIrcView::NoTimestamp); + outputNoFmt(0, line, KviIrcView::NoRepaint | KviIrcView::NoTimestamp); } m_pIrcView->repaint(); } @@ -633,9 +633,9 @@ void LogViewWindow::createLog(LogFile * pLog, int iId, QString * pszFile) szLog += ".txt"; // Scan the file - for(QStringList::Iterator it = lines.begin(); it != lines.end(); ++it) + for(auto & line : lines) { - szTmp = (*it); + szTmp = line; szLine = KviControlCodes::stripControlBytes(szTmp); // Remove icons' code @@ -710,9 +710,9 @@ void LogViewWindow::createLog(LogFile * pLog, int iId, QString * pszFile) szOutputBuffer += "<h2>" + szTitle + "</h2>\n<h3>Date: " + szDate + "</h3>\n"; // Scan the file - for(QStringList::Iterator it = lines.begin(); it != lines.end(); ++it) + for(auto & line : lines) { - szTmp = (*it); + szTmp = line; // Find who has talked QString szTmpNick = szTmp.section(" ", 2, 2); |
