aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/list/ListWindow.cpp
diff options
context:
space:
mode:
authorGravatar Alexey Sokolov2016-05-01 16:16:09 +0100
committerGravatar Alexey Sokolov2016-05-01 16:16:09 +0100
commitfe375f69972cd912739c0d68fa4951d35de90e5e (patch)
tree71bd2c2b59d6be62d7c18588a417e5aa39ab233c /src/modules/list/ListWindow.cpp
parentlibkvidcc: fix $dcc.currentSpeed documentation add missing @short and fix rig... (diff)
parentApply clang-tidy: modernize-loop-convert (diff)
downloadKVIrc-fe375f69972cd912739c0d68fa4951d35de90e5e.tar.gz
KVIrc-fe375f69972cd912739c0d68fa4951d35de90e5e.tar.bz2
KVIrc-fe375f69972cd912739c0d68fa4951d35de90e5e.zip
Merge pull request #1962 from DarthGandalf/modernize
Apply several fixes of clang-tidy
Diffstat (limited to 'src/modules/list/ListWindow.cpp')
-rw-r--r--src/modules/list/ListWindow.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/modules/list/ListWindow.cpp b/src/modules/list/ListWindow.cpp
index c323d12cd..a39703c36 100644
--- a/src/modules/list/ListWindow.cpp
+++ b/src/modules/list/ListWindow.cpp
@@ -63,8 +63,7 @@ ChannelTreeWidgetItemData::ChannelTreeWidgetItemData(const QString & szChan, con
}
ChannelTreeWidgetItemData::~ChannelTreeWidgetItemData()
-{
-}
+ = default;
ChannelTreeWidgetItem::ChannelTreeWidgetItem(ChannelTreeWidgetItemData * pData)
: QTreeWidgetItem(), m_pData(pData)
@@ -75,8 +74,7 @@ ChannelTreeWidgetItem::ChannelTreeWidgetItem(ChannelTreeWidgetItemData * pData)
}
ChannelTreeWidgetItem::~ChannelTreeWidgetItem()
-{
-}
+ = default;
bool ChannelTreeWidgetItem::operator<(const QTreeWidgetItem & other) const
{
@@ -104,8 +102,7 @@ ChannelTreeWidgetItemDelegate::ChannelTreeWidgetItemDelegate(QTreeWidget * pWidg
}
ChannelTreeWidgetItemDelegate::~ChannelTreeWidgetItemDelegate()
-{
-}
+ = default;
#define BORDER 2
@@ -176,7 +173,7 @@ ListWindow::ListWindow(KviConsoleWindow * lpConsole)
{
g_pListWindowList->append(this);
- m_pFlushTimer = 0;
+ m_pFlushTimer = nullptr;
m_pItemList = new KviPointerList<ChannelTreeWidgetItemData>;
m_pItemList->setAutoDelete(false);
@@ -270,7 +267,7 @@ ListWindow::ListWindow(KviConsoleWindow * lpConsole)
ListWindow::~ListWindow()
{
g_pListWindowList->removeRef(this);
- m_pConsole->context()->setListWindowPointer(0);
+ m_pConsole->context()->setListWindowPointer(nullptr);
if(m_pFlushTimer)
delete m_pFlushTimer;
@@ -366,7 +363,7 @@ void ListWindow::exportList()
{
if(!m_pTreeWidget->topLevelItemCount())
{
- QMessageBox::warning(0, __tr2qs("Warning While Exporting - KVIrc"), __tr2qs("You can't export an empty list!"));
+ QMessageBox::warning(nullptr, __tr2qs("Warning While Exporting - KVIrc"), __tr2qs("You can't export an empty list!"));
return;
}
@@ -472,7 +469,7 @@ void ListWindow::endOfList()
if(m_pFlushTimer)
{
delete m_pFlushTimer;
- m_pFlushTimer = 0;
+ m_pFlushTimer = nullptr;
}
m_pRequestButton->setEnabled(true);
outputNoFmt(KVI_OUT_SYSTEMMESSAGE, __tr2qs("Channels list download finished"));
@@ -494,7 +491,7 @@ void ListWindow::liveSearch(const QString & szText)
{
QRegExp res(szText, Qt::CaseInsensitive, QRegExp::Wildcard);
- ChannelTreeWidgetItem * pItem = 0;
+ ChannelTreeWidgetItem * pItem = nullptr;
for(int i = 0; i < m_pTreeWidget->topLevelItemCount(); i++)
{
pItem = (ChannelTreeWidgetItem *)m_pTreeWidget->topLevelItem(i);