From 4a6a45ac38a9a8384481702bbcc51aa17c9999dc Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 18 Dec 2020 17:36:01 +0100 Subject: sqlite: Replace NULL by nullptr Change-Id: I8e845ae093a68d2d7ecf0e358a2316a54d0f2144 Reviewed-by: Joerg Bornemann --- src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/plugins/sqldrivers') 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(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; } -- cgit v1.2.3