mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-07-30 16:04:12 +02:00
Wrap deprecated QSqlDatabase::exec() in QSqlQuery
QSqlDatabase::exec(const QString&) is deprecated in Qt6. Route the PRAGMA/CREATE TABLE statements through QSqlQuery(db).exec() instead. Clears 11 -Wdeprecated-declarations warnings; same statements, same database connection, no behavioural change.
This commit is contained in:
@@ -253,9 +253,9 @@ bool projectDataBase::createDataBase()
|
||||
return false;
|
||||
}
|
||||
|
||||
m_data_base.exec("PRAGMA temp_store = MEMORY");
|
||||
m_data_base.exec("PRAGMA journal_mode = MEMORY");
|
||||
m_data_base.exec("PRAGMA synchronous = OFF");
|
||||
QSqlQuery(m_data_base).exec("PRAGMA temp_store = MEMORY");
|
||||
QSqlQuery(m_data_base).exec("PRAGMA journal_mode = MEMORY");
|
||||
QSqlQuery(m_data_base).exec("PRAGMA synchronous = OFF");
|
||||
|
||||
QSqlQuery query_(m_data_base);
|
||||
bool first_ = true;
|
||||
|
||||
Reference in New Issue
Block a user