diff options
| author | 2016-05-01 16:16:09 +0100 | |
|---|---|---|
| committer | 2016-05-01 16:16:09 +0100 | |
| commit | fe375f69972cd912739c0d68fa4951d35de90e5e (patch) | |
| tree | 71bd2c2b59d6be62d7c18588a417e5aa39ab233c /src/modules/objects/KvsObject_sql.cpp | |
| parent | libkvidcc: fix $dcc.currentSpeed documentation add missing @short and fix rig... (diff) | |
| parent | Apply clang-tidy: modernize-loop-convert (diff) | |
| download | KVIrc-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/objects/KvsObject_sql.cpp')
| -rw-r--r-- | src/modules/objects/KvsObject_sql.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/objects/KvsObject_sql.cpp b/src/modules/objects/KvsObject_sql.cpp index e4de050f1..7fd68c240 100644 --- a/src/modules/objects/KvsObject_sql.cpp +++ b/src/modules/objects/KvsObject_sql.cpp @@ -133,13 +133,13 @@ KVSO_END_REGISTERCLASS(KvsObject_sql) KVSO_BEGIN_CONSTRUCTOR(KvsObject_sql, KviKvsObject) -m_pCurrentSQlQuery = 0; +m_pCurrentSQlQuery = nullptr; KVSO_END_CONSTRUCTOR(KvsObject_sql) KVSO_BEGIN_DESTRUCTOR(KvsObject_sql) if(m_pCurrentSQlQuery) delete m_pCurrentSQlQuery; -m_pCurrentSQlQuery = 0; +m_pCurrentSQlQuery = nullptr; KVSO_END_DESTRUCTOR(KvsObject_sql) KVSO_CLASS_FUNCTION(sql, setConnection) @@ -179,7 +179,7 @@ KVSO_CLASS_FUNCTION(sql, setConnection) m_pCurrentSQlQuery = new QSqlQuery(db); } else - m_pCurrentSQlQuery = 0; + m_pCurrentSQlQuery = nullptr; c->returnValue()->setBoolean(bOk); return true; } @@ -303,7 +303,7 @@ KVSO_CLASS_FUNCTION(sql, closeConnection) if(m_pCurrentSQlQuery) { delete m_pCurrentSQlQuery; - m_pCurrentSQlQuery = 0; + m_pCurrentSQlQuery = nullptr; } QSqlDatabase::removeDatabase(szConnectionName); return true; @@ -311,7 +311,7 @@ KVSO_CLASS_FUNCTION(sql, closeConnection) if(m_pCurrentSQlQuery) { delete m_pCurrentSQlQuery; - m_pCurrentSQlQuery = 0; + m_pCurrentSQlQuery = nullptr; } QSqlDatabase::removeDatabase(mSzConnectionName); return true; @@ -465,7 +465,7 @@ KVSO_CLASS_FUNCTION(sql, queryRecord) QSqlRecord record = m_pCurrentSQlQuery->record(); for(int i = 0; i < record.count(); i++) { - KviKvsVariant * pValue = 0; + KviKvsVariant * pValue = nullptr; QVariant value = record.value(i); if(value.type() == QVariant::LongLong) pValue = new KviKvsVariant((kvs_int_t)value.toLongLong()); @@ -475,7 +475,7 @@ KVSO_CLASS_FUNCTION(sql, queryRecord) { KviKvsObjectClass * pClass = KviKvsKernel::instance()->objectController()->lookupClass("memoryBuffer"); KviKvsVariantList params(new KviKvsVariant(QString())); - KviKvsObject * pObject = pClass->allocateInstance(0, "", c->context(), ¶ms); + KviKvsObject * pObject = pClass->allocateInstance(nullptr, "", c->context(), ¶ms); *((KvsObject_memoryBuffer *)pObject)->pBuffer() = value.toByteArray(); pValue = new KviKvsVariant(pObject->handle()); } |
