mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-28 13:24:14 +02:00
45aec7735b
Since #983, projectDataBase::newQuery() checked a query with sqlite3_prepare_v2() and sqlite3_stmt_readonly() on the handle of the QSQLITE driver. Those calls go to the libsqlite3 QElectroTech links. The QSQLITE plugin of the Qt online installer does not use that library: it carries its own copy of SQLite, so the handle belongs to another library and the call crashes. #1021 then put newQuery() on every element selection, which is where #1045 hits it. The check now runs the query with PRAGMA query_only set, through the driver. SQLite refuses a write itself, before touching a row, so the CTE prefix #983 closed ("WITH x AS (SELECT 1) DELETE FROM element") stays closed. A refused or failed query comes back empty, because several callers call exec() again on what newQuery() returns, after query_only is off. QElectroTech no longer calls the SQLite C API anywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>