Commit c1359d48 authored by David Faure's avatar David Faure
Browse files

Add missing braces around single-line statements in if().

Caught by gitlab CI, [readability-braces-around-statements,-warnings-as-errors]
parent aee29ff8
Pipeline #29917 passed with stage
in 44 minutes and 31 seconds
...@@ -207,18 +207,22 @@ bool DbConfigPostgresql::init(QSettings &settings, bool storeSettings) ...@@ -207,18 +207,22 @@ bool DbConfigPostgresql::init(QSettings &settings, bool storeSettings)
bool DbConfigPostgresql::isAvailable(QSettings &settings) bool DbConfigPostgresql::isAvailable(QSettings &settings)
{ {
if (!QSqlDatabase::drivers().contains(driverName())) if (!QSqlDatabase::drivers().contains(driverName())) {
return false; return false;
}
if (!init(settings, false)) if (!init(settings, false)) {
return false; return false;
}
if (mInternalServer) { if (mInternalServer) {
if (mInitDbPath.isEmpty() || !QFile::exists(mInitDbPath)) if (mInitDbPath.isEmpty() || !QFile::exists(mInitDbPath)) {
return false; return false;
}
if (mServerPath.isEmpty() || !QFile::exists(mServerPath)) if (mServerPath.isEmpty() || !QFile::exists(mServerPath)) {
return false; return false;
}
} }
return true; return true;
......
...@@ -102,11 +102,13 @@ bool DbConfigSqlite::init(QSettings &settings, bool storeSettings) ...@@ -102,11 +102,13 @@ bool DbConfigSqlite::init(QSettings &settings, bool storeSettings)
bool DbConfigSqlite::isAvailable(QSettings &settings) bool DbConfigSqlite::isAvailable(QSettings &settings)
{ {
if (!QSqlDatabase::drivers().contains(driverName())) if (!QSqlDatabase::drivers().contains(driverName())) {
return false; return false;
}
if (!init(settings, false)) if (!init(settings, false)) {
return false; return false;
}
return true; return true;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment