aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/pythoncore/kvircmodule.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/pythoncore/kvircmodule.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/pythoncore/kvircmodule.cpp')
-rw-r--r--src/modules/pythoncore/kvircmodule.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/modules/pythoncore/kvircmodule.cpp b/src/modules/pythoncore/kvircmodule.cpp
index f35589143..235e3545a 100644
--- a/src/modules/pythoncore/kvircmodule.cpp
+++ b/src/modules/pythoncore/kvircmodule.cpp
@@ -76,11 +76,11 @@ static PyObject * PyKVIrc_echo(PyObject * pSelf, PyObject * pArgs)
if(QThread::currentThread() != g_pApp->thread())
{
qDebug("[pythoncore][ERROR] KVIrc module functions must be called from the main KVIrc thread");
- return 0; // Sorry, we're NOT thread safe
+ return nullptr; // Sorry, we're NOT thread safe
}
if(!PyArg_ParseTuple(pArgs, "s|is", &pcText, &iColorSet, &pcWinId))
- return 0;
+ return nullptr;
if(pcText)
{
@@ -113,11 +113,11 @@ static PyObject * PyKVIrc_say(PyObject * pSelf, PyObject * pArgs)
if(QThread::currentThread() != g_pApp->thread())
{
qDebug("[pythoncore][ERROR] KVIrc module functions must be called from the main KVIrc thread");
- return 0; // Sorry, we're NOT thread safe
+ return nullptr; // Sorry, we're NOT thread safe
}
if(!PyArg_ParseTuple(pArgs, "s|s", &pcText, &pcWinId))
- return 0;
+ return nullptr;
if(pcText)
{
@@ -151,11 +151,11 @@ static PyObject * PyKVIrc_warning(PyObject * pSelf, PyObject * pArgs)
if(QThread::currentThread() != g_pApp->thread())
{
qDebug("[pythoncore][ERROR] KVIrc module functions must be called from the main KVIrc thread");
- return 0; // Sorry, we're NOT thread safe
+ return nullptr; // Sorry, we're NOT thread safe
}
if(!PyArg_ParseTuple(pArgs, "s", &pcText))
- return 0;
+ return nullptr;
if(pcText && !g_bExecuteQuiet)
{
@@ -175,11 +175,11 @@ static PyObject * PyKVIrc_getLocal(PyObject * pSelf, PyObject * pArgs)
if(QThread::currentThread() != g_pApp->thread())
{
qDebug("[pythoncore][ERROR] KVIrc module functions must be called from the main KVIrc thread");
- return 0; // Sorry, we're NOT thread safe
+ return nullptr; // Sorry, we're NOT thread safe
}
if(!PyArg_ParseTuple(pArgs, "s", &szVarName))
- return 0;
+ return nullptr;
if(g_pCurrentKvsContext)
{
@@ -194,7 +194,7 @@ static PyObject * PyKVIrc_getLocal(PyObject * pSelf, PyObject * pArgs)
return Py_BuildValue("s", "");
}
}
- return 0;
+ return nullptr;
}
static PyObject * PyKVIrc_setLocal(PyObject * pSelf, PyObject * pArgs)
@@ -206,11 +206,11 @@ static PyObject * PyKVIrc_setLocal(PyObject * pSelf, PyObject * pArgs)
if(QThread::currentThread() != g_pApp->thread())
{
qDebug("[pythoncore][ERROR] KVIrc module functions must be called from the main KVIrc thread");
- return 0; // Sorry, we're NOT thread safe
+ return nullptr; // Sorry, we're NOT thread safe
}
if(!PyArg_ParseTuple(pArgs, "ss", &szVarName, &szVarValue))
- return 0;
+ return nullptr;
if(g_pCurrentKvsContext)
{
@@ -225,7 +225,7 @@ static PyObject * PyKVIrc_setLocal(PyObject * pSelf, PyObject * pArgs)
}
return Py_BuildValue("i", 1);
}
- return 0;
+ return nullptr;
}
static PyObject * PyKVIrc_getGlobal(PyObject * pSelf, PyObject * pArgs)
@@ -237,11 +237,11 @@ static PyObject * PyKVIrc_getGlobal(PyObject * pSelf, PyObject * pArgs)
if(QThread::currentThread() != g_pApp->thread())
{
qDebug("[pythoncore][ERROR] KVIrc module functions must be called from the main KVIrc thread");
- return 0; // Sorry, we're NOT thread safe
+ return nullptr; // Sorry, we're NOT thread safe
}
if(!PyArg_ParseTuple(pArgs, "s", &szVarName))
- return 0;
+ return nullptr;
if(g_pCurrentKvsContext)
{
@@ -256,7 +256,7 @@ static PyObject * PyKVIrc_getGlobal(PyObject * pSelf, PyObject * pArgs)
return Py_BuildValue("s", "");
}
}
- return 0;
+ return nullptr;
}
static PyObject * PyKVIrc_setGlobal(PyObject * pSelf, PyObject * pArgs)
@@ -268,11 +268,11 @@ static PyObject * PyKVIrc_setGlobal(PyObject * pSelf, PyObject * pArgs)
if(QThread::currentThread() != g_pApp->thread())
{
qDebug("[pythoncore][ERROR] KVIrc module functions must be called from the main KVIrc thread");
- return 0; // Sorry, we're NOT thread safe
+ return nullptr; // Sorry, we're NOT thread safe
}
if(!PyArg_ParseTuple(pArgs, "ss", &szVarName, &szVarValue))
- return 0;
+ return nullptr;
if(g_pCurrentKvsContext)
{
@@ -287,7 +287,7 @@ static PyObject * PyKVIrc_setGlobal(PyObject * pSelf, PyObject * pArgs)
}
return Py_BuildValue("i", 1);
}
- return 0;
+ return nullptr;
}
static PyObject * PyKVIrc_eval(PyObject * pSelf, PyObject * pArgs)
@@ -300,11 +300,11 @@ static PyObject * PyKVIrc_eval(PyObject * pSelf, PyObject * pArgs)
if(QThread::currentThread() != g_pApp->thread())
{
qDebug("[pythoncore][ERROR] KVIrc module functions must be called from the main KVIrc thread");
- return 0; // Sorry, we're NOT thread safe
+ return nullptr; // Sorry, we're NOT thread safe
}
if(!PyArg_ParseTuple(pArgs, "s", &pcCode))
- return 0;
+ return nullptr;
if(pcCode)
{
@@ -319,7 +319,7 @@ static PyObject * PyKVIrc_eval(PyObject * pSelf, PyObject * pArgs)
{
KviKvsVariant ret;
QString szRet;
- if(KviKvsScript::run(QString::fromUtf8(pcCode), pWnd, 0, &ret))
+ if(KviKvsScript::run(QString::fromUtf8(pcCode), pWnd, nullptr, &ret))
{
ret.asString(szRet);
pcRetVal = szRet.toUtf8().data();
@@ -338,11 +338,11 @@ static PyObject * PyKVIrc_internalWarning(PyObject * pSelf, PyObject * pArgs)
if(QThread::currentThread() != g_pApp->thread())
{
qDebug("[pythoncore][ERROR] KVIrc module functions must be called from the main KVIrc thread");
- return 0; // Sorry, we're NOT thread safe
+ return nullptr; // Sorry, we're NOT thread safe
}
if(!PyArg_ParseTuple(pArgs, "s", &pcText))
- return 0;
+ return nullptr;
if(pcText && !g_bExecuteQuiet)
g_lWarningList.append(QString(pcText));
@@ -358,11 +358,11 @@ static PyObject * PyKVIrc_error(PyObject * pSelf, PyObject * pArgs)
if(QThread::currentThread() != g_pApp->thread())
{
qDebug("[pythoncore][ERROR] KVIrc module functions must be called from the main KVIrc thread");
- return 0; // Sorry, we're NOT thread safe
+ return nullptr; // Sorry, we're NOT thread safe
}
if(!PyArg_ParseTuple(pArgs, "s", &pcText))
- return 0;
+ return nullptr;
if(pcText)
g_lError.append(pcText);