fix: harden project database export

Use a bound VACUUM INTO path and remove the stale SQLite
handle declaration. Fix shell continuations in Windows CI and
Debian installation instructions.
This commit is contained in:
Magnus Hellströmer
2026-09-22 19:05:05 +02:00
parent 78caeaec48
commit 13a37e1f59
4 changed files with 3 additions and 5 deletions
+3 -2
View File
@@ -1290,9 +1290,10 @@ void projectDataBase::exportDb(projectDataBase *db,
// VACUUM INTO creates a standalone copy of the current database without
// requiring access to the SQLite driver's native connection handle.
const auto escaped_path = path_.replace("'", "''");
QSqlQuery query(db->m_data_base);
if (!query.exec("VACUUM INTO '" % escaped_path % "'")) {
query.prepare("VACUUM INTO ?");
query.bindValue(0, path_);
if (!query.exec()) {
qWarning() << "Unable to export project database:" << query.lastError().text();
}
}
-1
View File
@@ -29,7 +29,6 @@ class QETProject;
class Diagram;
class Conductor;
class Terminal;
class sqlite3;
/**
@brief The projectDataBase class