Fix casts from QByteArray

This commit is contained in:
Jonas Kvinge
2022-09-12 22:39:08 +02:00
parent b5fc19f08a
commit 78d6fd634b
9 changed files with 27 additions and 18 deletions

View File

@@ -536,7 +536,8 @@ void Database::DoBackup() {
bool Database::OpenDatabase(const QString &filename, sqlite3 **connection) {
int ret = sqlite3_open(filename.toUtf8(), connection);
const QByteArray filename_data = filename.toUtf8();
int ret = sqlite3_open(filename_data.constData(), connection);
if (ret != 0) {
if (*connection) {
const char *error_message = sqlite3_errmsg(*connection);