Show error dialog for failed SQL queries
This commit is contained in:
@@ -826,7 +826,10 @@ bool CollectionModel::HasCompilations(const QSqlDatabase &db, const CollectionQu
|
||||
q.AddCompilationRequirement(true);
|
||||
q.SetLimit(1);
|
||||
|
||||
if (!q.Exec()) return false;
|
||||
if (!q.Exec()) {
|
||||
backend_->ReportErrors(q);
|
||||
return false;
|
||||
}
|
||||
|
||||
return q.Next();
|
||||
|
||||
@@ -873,6 +876,9 @@ CollectionModel::QueryResult CollectionModel::RunQuery(CollectionItem *parent) {
|
||||
result.rows << SqlRow(q);
|
||||
}
|
||||
}
|
||||
else {
|
||||
backend_->ReportErrors(q);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user