Stop using sqlite3_enable_shared_cache: deprecated on macOS
qsql_sqlite.cpp:643:5: warning: 'sqlite3_enable_shared_cache' is deprecated: first deprecated in macOS 10.7 [-Wdeprecated-declarations] https://www.sqlite.org/c3ref/enable_shared_cache.html says to use the flag to sqlite3_open_v2() Change-Id: Ib499cebaa4c4489b90b9fffd149d3d5bf9434ae5 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
parent
7f1a220ee4
commit
44f406ce95
@ -696,11 +696,10 @@ bool QSQLiteDriver::open(const QString & db, const QString &, const QString &, c
|
||||
}
|
||||
|
||||
int openMode = (openReadOnlyOption ? SQLITE_OPEN_READONLY : (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE));
|
||||
openMode |= (sharedCache ? SQLITE_OPEN_SHAREDCACHE : SQLITE_OPEN_PRIVATECACHE);
|
||||
if (openUriOption)
|
||||
openMode |= SQLITE_OPEN_URI;
|
||||
|
||||
sqlite3_enable_shared_cache(sharedCache);
|
||||
|
||||
if (sqlite3_open_v2(db.toUtf8().constData(), &d->access, openMode, NULL) == SQLITE_OK) {
|
||||
sqlite3_busy_timeout(d->access, timeOut);
|
||||
setOpen(true);
|
||||
|
Loading…
Reference in New Issue
Block a user