aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/addon
diff options
context:
space:
mode:
authorGravatar Alexey Sokolov2016-04-30 18:23:42 +0100
committerGravatar Alexey Sokolov2016-04-30 18:50:44 +0100
commit505d0768f8392e3c4775425dd97f41e1c829ef44 (patch)
tree55dfa35f2e180b4186baf00ffbfd2ee38c0f1c18 /src/modules/addon
parentUpdate my clang-format to 3.8.0 (diff)
downloadKVIrc-505d0768f8392e3c4775425dd97f41e1c829ef44.tar.gz
KVIrc-505d0768f8392e3c4775425dd97f41e1c829ef44.tar.bz2
KVIrc-505d0768f8392e3c4775425dd97f41e1c829ef44.zip
Apply clang-tidy: modernize-use-nullptr
Diffstat (limited to 'src/modules/addon')
-rw-r--r--src/modules/addon/AddonFunctions.cpp6
-rw-r--r--src/modules/addon/AddonManagementDialog.cpp20
2 files changed, 13 insertions, 13 deletions
diff --git a/src/modules/addon/AddonFunctions.cpp b/src/modules/addon/AddonFunctions.cpp
index 487681942..88a7b0fdd 100644
--- a/src/modules/addon/AddonFunctions.cpp
+++ b/src/modules/addon/AddonFunctions.cpp
@@ -102,7 +102,7 @@ namespace AddonFunctions
// load its picture
pByteArray = r.binaryInfoFields()->find("Image");
if(pByteArray)
- pix.loadFromData(*pByteArray, 0, 0);
+ pix.loadFromData(*pByteArray, nullptr, nullptr);
if(pix.isNull())
{
@@ -241,7 +241,7 @@ namespace AddonFunctions
}
if(!KviFileUtils::deleteDir(szUnpackPath))
- QMessageBox::warning(NULL, __tr2qs_ctx("Warning While Unpacking Addon - KVIrc", "addon"), __tr2qs_ctx("Failed to delete the directory '%1'", "addon").arg(szUnpackPath));
+ QMessageBox::warning(nullptr, __tr2qs_ctx("Warning While Unpacking Addon - KVIrc", "addon"), __tr2qs_ctx("Failed to delete the directory '%1'", "addon").arg(szUnpackPath));
return true;
}
@@ -323,7 +323,7 @@ namespace AddonFunctions
}
QByteArray * pba = new QByteArray();
- QBuffer bufferz(pba, 0);
+ QBuffer bufferz(pba, nullptr);
bufferz.open(QIODevice::WriteOnly);
pix.save(&bufferz, "PNG");
diff --git a/src/modules/addon/AddonManagementDialog.cpp b/src/modules/addon/AddonManagementDialog.cpp
index 3b96e47c4..754ef6ad7 100644
--- a/src/modules/addon/AddonManagementDialog.cpp
+++ b/src/modules/addon/AddonManagementDialog.cpp
@@ -60,7 +60,7 @@
#include "WebAddonInterfaceDialog.h"
#endif //COMPILE_WEBKIT_SUPPORT
-AddonManagementDialog * AddonManagementDialog::m_pInstance = 0;
+AddonManagementDialog * AddonManagementDialog::m_pInstance = nullptr;
extern QRect g_rectManagementDialogGeometry;
AddonListViewItem::AddonListViewItem(KviTalListWidget * v, KviKvsScriptAddon * a)
@@ -99,7 +99,7 @@ AddonManagementDialog::AddonManagementDialog(QWidget * p)
setWindowIcon(*(g_pIconManager->getSmallIcon(KviIconManager::Addons)));
#ifdef COMPILE_WEBKIT_SUPPORT
- m_pWebInterfaceDialog = NULL;
+ m_pWebInterfaceDialog = nullptr;
#endif //COMPILE_WEBKIT_SUPPORT
m_pInstance = this;
@@ -172,7 +172,7 @@ AddonManagementDialog::AddonManagementDialog(QWidget * p)
fillListView();
- currentChanged(0, 0);
+ currentChanged(nullptr, nullptr);
connect(m_pListWidget, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), this, SLOT(currentChanged(QListWidgetItem *, QListWidgetItem *)));
m_pListWidget->setCurrentItem(m_pListWidget->item(0));
@@ -205,7 +205,7 @@ AddonManagementDialog::~AddonManagementDialog()
delete m_pWebInterfaceDialog;
#endif //COMPILE_WEBKIT_SUPPORT
g_rectManagementDialogGeometry = QRect(pos().x(), pos().y(), size().width(), size().height());
- m_pInstance = NULL;
+ m_pInstance = nullptr;
}
void AddonManagementDialog::fillListView()
@@ -280,14 +280,14 @@ void AddonManagementDialog::uninstallScript()
if(QMessageBox::question(
this,
__tr2qs_ctx("Confirm Addon Uninstallation - KVIrc", "addon"),
- txt, __tr2qs_ctx("Yes", "addon"), __tr2qs_ctx("No", "addon"), 0, 1)
+ txt, __tr2qs_ctx("Yes", "addon"), __tr2qs_ctx("No", "addon"), nullptr, 1)
!= 0)
return;
KviKvsScriptAddonManager::instance()->unregisterAddon(it->addon()->name(), g_pActiveWindow);
fillListView();
- currentChanged(0, 0);
+ currentChanged(nullptr, nullptr);
}
void AddonManagementDialog::getMoreScripts()
@@ -344,7 +344,7 @@ void AddonManagementDialog::installScript()
}
fillListView();
- currentChanged(0, 0);
+ currentChanged(nullptr, nullptr);
//m_pListWidget->publicUpdateContents();
//m_pListWidget->triggerUpdate();
@@ -360,7 +360,7 @@ void AddonManagementDialog::cleanup()
if(!m_pInstance)
return;
delete m_pInstance;
- m_pInstance = 0;
+ m_pInstance = nullptr;
}
void AddonManagementDialog::display(bool bTopLevel)
@@ -371,7 +371,7 @@ void AddonManagementDialog::display(bool bTopLevel)
{
if(m_pInstance->parent())
{
- m_pInstance->setParent(0);
+ m_pInstance->setParent(nullptr);
}
}
else
@@ -386,7 +386,7 @@ void AddonManagementDialog::display(bool bTopLevel)
{
if(bTopLevel)
{
- m_pInstance = new AddonManagementDialog(0);
+ m_pInstance = new AddonManagementDialog(nullptr);
}
else
{