Formatting

This commit is contained in:
Jonas Kvinge
2019-04-12 19:55:19 +02:00
parent 77903a5ecd
commit 368bb54870
10 changed files with 29 additions and 36 deletions

View File

@@ -595,7 +595,8 @@ bool Database::IntegrityCheck(QSqlDatabase db) {
if (message == "ok") {
ok = true;
break;
} else {
}
else {
if (!error_reported) { app_->AddError(tr("Database corruption detected.")); }
app_->AddError("Database: " + message);
error_reported = true;
@@ -677,9 +678,9 @@ void Database::BackupFile(const QString &filename) {
do {
ret = sqlite3_backup_step(backup, 16);
const int page_count = sqlite3_backup_pagecount(backup);
app_->task_manager()->SetTaskProgress(
task_id, page_count - sqlite3_backup_remaining(backup), page_count);
} while (ret == SQLITE_OK);
app_->task_manager()->SetTaskProgress(task_id, page_count - sqlite3_backup_remaining(backup), page_count);
}
while (ret == SQLITE_OK);
if (ret != SQLITE_DONE) {
qLog(Error) << "Database backup failed";