summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-18 17:36:01 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-21 16:21:18 +0100
commit4a6a45ac38a9a8384481702bbcc51aa17c9999dc (patch)
tree875bc8ed56de1695b739a3f2595dc4042911f558 /src/plugins
parent7f02071503edb7bb0f77e59b834c0a200d76d6a7 (diff)
sqlite: Replace NULL by nullptr
Change-Id: I8e845ae093a68d2d7ecf0e358a2316a54d0f2144 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
index 13f4bc421f..eb437400b3 100644
--- a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
+++ b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
@@ -382,7 +382,7 @@ bool QSQLiteResult::prepare(const QString &query)
setSelect(false);
- const void *pzTail = NULL;
+ const void *pzTail = nullptr;
const auto size = int((query.size() + 1) * sizeof(QChar));
#if (SQLITE_VERSION_NUMBER >= 3003011)
@@ -770,7 +770,7 @@ bool QSQLiteDriver::open(const QString & db, const QString &, const QString &, c
openMode |= SQLITE_OPEN_NOMUTEX;
- const int res = sqlite3_open_v2(db.toUtf8().constData(), &d->access, openMode, NULL);
+ const int res = sqlite3_open_v2(db.toUtf8().constData(), &d->access, openMode, nullptr);
if (res == SQLITE_OK) {
sqlite3_busy_timeout(d->access, timeOut);
@@ -779,8 +779,9 @@ bool QSQLiteDriver::open(const QString & db, const QString &, const QString &, c
#if QT_CONFIG(regularexpression)
if (defineRegexp) {
auto cache = new QCache<QString, QRegularExpression>(regexpCacheSize);
- sqlite3_create_function_v2(d->access, "regexp", 2, SQLITE_UTF8, cache, &_q_regexp, NULL,
- NULL, &_q_regexp_cleanup);
+ sqlite3_create_function_v2(d->access, "regexp", 2, SQLITE_UTF8, cache,
+ &_q_regexp, nullptr,
+ nullptr, &_q_regexp_cleanup);
}
#endif
return true;
@@ -807,7 +808,7 @@ void QSQLiteDriver::close()
if (d->access && (d->notificationid.count() > 0)) {
d->notificationid.clear();
- sqlite3_update_hook(d->access, NULL, NULL);
+ sqlite3_update_hook(d->access, nullptr, nullptr);
}
const int res = sqlite3_close(d->access);
@@ -1027,7 +1028,7 @@ bool QSQLiteDriver::unsubscribeFromNotification(const QString &name)
d->notificationid.removeAll(name);
if (d->notificationid.isEmpty())
- sqlite3_update_hook(d->access, NULL, NULL);
+ sqlite3_update_hook(d->access, nullptr, nullptr);
return true;
}