Clang-Tidy and Clazy fixes

This commit is contained in:
Jonas Kvinge
2021-06-20 19:04:08 +02:00
parent 755abec636
commit 1295033fae
374 changed files with 1304 additions and 900 deletions

View File

@@ -487,7 +487,7 @@ bool Database::CheckErrors(const QSqlQuery &query) {
}
bool Database::IntegrityCheck(QSqlDatabase db) {
bool Database::IntegrityCheck(const QSqlDatabase &db) {
qLog(Debug) << "Starting database integrity check";
int task_id = app_->task_manager()->StartTask(tr("Integrity check"));
@@ -559,7 +559,7 @@ void Database::BackupFile(const QString &filename) {
sqlite3 *source_connection = nullptr;
sqlite3 *dest_connection = nullptr;
BOOST_SCOPE_EXIT((&source_connection)(&dest_connection)(task_id)(app_)) {
BOOST_SCOPE_EXIT((&source_connection)(&dest_connection)(task_id)(app_)) { // clazy:exclude=rule-of-three NOLINT(google-explicit-constructor)
// Harmless to call sqlite3_close() with a nullptr pointer.
sqlite3_close(source_connection);
sqlite3_close(dest_connection);