1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

ProfileManager: Skip clear comment SQL statements

Qt throws errors when the SQL command does nothing.

BUG: 491993
FIXED-IN: 24.12.0

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2024-08-22 21:42:23 +02:00
parent d9122703ae
commit 0c67d1e0c8
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B

View File

@ -306,6 +306,10 @@ void ProfileManager::connectDatabase()
if (stmt.isEmpty()) { if (stmt.isEmpty()) {
continue; continue;
} }
if (stmt.startsWith(QSL("--")) && !stmt.contains(QL1C('\n'))) {
qDebug() << stmt;
continue;
}
QSqlQuery query; QSqlQuery query;
if (!query.exec(stmt)) { if (!query.exec(stmt)) {
qCritical() << "Error creating database schema" << query.lastError().text(); qCritical() << "Error creating database schema" << query.lastError().text();