diff options
Diffstat (limited to 'src/modules/logview/LogViewWindow.cpp')
| -rw-r--r-- | src/modules/logview/LogViewWindow.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/modules/logview/LogViewWindow.cpp b/src/modules/logview/LogViewWindow.cpp index 0c5f0b9d6..68d02d51f 100644 --- a/src/modules/logview/LogViewWindow.cpp +++ b/src/modules/logview/LogViewWindow.cpp @@ -211,7 +211,7 @@ LogViewWindow::LogViewWindow() LogViewWindow::~LogViewWindow() { - g_pLogViewWindow = 0; + g_pLogViewWindow = nullptr; } void LogViewWindow::keyPressEvent(QKeyEvent * pEvent) @@ -286,8 +286,8 @@ void LogViewWindow::setupItemList() m_pProgressBar->setRange(0, m_logList.count()); m_pProgressBar->setValue(0); - m_pLastCategory = 0; - m_pLastGroupItem = 0; + m_pLastCategory = nullptr; + m_pLastGroupItem = nullptr; m_logList.first(); m_pTimer->start(); //singleshot } @@ -344,7 +344,7 @@ void LogViewWindow::filterNext() { if(m_pLastCategory->m_eType != pFile->type()) { - m_pLastCategory = 0; + m_pLastCategory = nullptr; for(int i = 0; i < m_pListView->topLevelItemCount(); ++i) { LogListViewItemType * pTmp = (LogListViewItemType *)m_pListView->topLevelItem(i); @@ -368,7 +368,7 @@ void LogViewWindow::filterNext() if(m_szLastGroup != szCurGroup) { m_szLastGroup = szCurGroup; - m_pLastGroupItem = 0; + m_pLastGroupItem = nullptr; for(int i = 0; i < m_pLastCategory->childCount(); ++i) { LogListViewItemFolder * pTmp = (LogListViewItemFolder *)m_pLastCategory->child(i); @@ -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(); } @@ -474,7 +474,7 @@ void LogViewWindow::deleteCurrent() this, __tr2qs_ctx("Confirm Current User Log Deletion", "log"), __tr2qs_ctx("Do you really wish to delete this log?", "log"), - __tr2qs("Yes"), __tr2qs("No"), 0, 1) + __tr2qs("Yes"), __tr2qs("No"), nullptr, 1) != 0) return; @@ -492,7 +492,7 @@ void LogViewWindow::deleteCurrent() this, __tr2qs_ctx("Confirm Current User Logs Deletion", "log"), __tr2qs_ctx("Do you really wish to delete all these logs?", "log"), - __tr2qs("Yes"), __tr2qs("No"), 0, 1) + __tr2qs("Yes"), __tr2qs("No"), nullptr, 1) != 0) return; KviPointerList<LogListViewItem> itemsList; @@ -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); |
