You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Removed dependency to foldercollection
This commit is contained in:
@ -95,6 +95,20 @@ QSqlQuery Database::buildSqlQuery(Database::QueryType type, const QString &table
|
||||
return query;
|
||||
}
|
||||
|
||||
bool Database::errorCheck(const QSqlQuery& query) {
|
||||
if (query.lastError().isValid()) {
|
||||
qCritical().noquote() << "SQL query error: " << query.lastError().text().trimmed() << ". Query was: " << query.lastQuery();
|
||||
QMapIterator<QString, QVariant> i(query.boundValues());
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
qCritical() << i.key() << "=" << i.value().toString();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
int Database::version() const {
|
||||
if (version_ >= 0) return version_;
|
||||
|
||||
|
Reference in New Issue
Block a user