File 0004-Add-curly-braces-around-single-line-blocks-and-space.patch of Package akonadi-server
From fc1dadceaf790c45f669625f3ee33d783e06b136 Mon Sep 17 00:00:00 2001
From: Antonio Larrosa <antonio.larrosa@gmail.com>
Date: Thu, 30 Jul 2020 09:22:20 +0200
Subject: [PATCH 4/6] Add curly braces around single line blocks and spaces
around =
---
src/server/storage/dbconfig.h | 2 +-
src/server/storage/dbconfigmysql.cpp | 9 ++++++---
src/server/storage/dbconfigmysql.h | 2 +-
src/server/storage/dbconfigpostgresql.h | 2 +-
4 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/server/storage/dbconfig.h b/src/server/storage/dbconfig.h
index 33ec28672..77999a442 100644
--- a/src/server/storage/dbconfig.h
+++ b/src/server/storage/dbconfig.h
@@ -53,7 +53,7 @@ public:
* At this point the default settings should be determined, merged
* with the given @p settings and written back if @p storeSettings is true.
*/
- virtual bool init(QSettings &settings, bool storeSettings=true) = 0;
+ virtual bool init(QSettings &settings, bool storeSettings = true) = 0;
/**
* This method checks if the requirements for this database connection are met
diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp
index f21facd39..727b01da7 100644
--- a/src/server/storage/dbconfigmysql.cpp
+++ b/src/server/storage/dbconfigmysql.cpp
@@ -160,14 +160,17 @@ bool DbConfigMysql::init(QSettings &settings, bool storeSettings)
bool DbConfigMysql::isAvailable(QSettings &settings)
{
- if (!QSqlDatabase::drivers().contains(driverName()))
+ if (!QSqlDatabase::drivers().contains(driverName())) {
return false;
+ }
- if (!init(settings, false))
+ if (!init(settings, false)) {
return false;
+ }
- if (mInternalServer && (mMysqldPath.isEmpty() || !QFile::exists(mMysqldPath)))
+ if (mInternalServer && (mMysqldPath.isEmpty() || !QFile::exists(mMysqldPath))) {
return false;
+ }
return true;
}
diff --git a/src/server/storage/dbconfigmysql.h b/src/server/storage/dbconfigmysql.h
index 6454e0f9d..3cf9da2f7 100644
--- a/src/server/storage/dbconfigmysql.h
+++ b/src/server/storage/dbconfigmysql.h
@@ -40,7 +40,7 @@ public:
* At this point the default settings should be determined, merged
* with the given @p settings and written back if @p storeSettings is true.
*/
- bool init(QSettings &settings, bool storeSettings=true) override;
+ bool init(QSettings &settings, bool storeSettings = true) override;
/**
* This method checks if the requirements for this database connection are met
diff --git a/src/server/storage/dbconfigpostgresql.h b/src/server/storage/dbconfigpostgresql.h
index bbfced139..bf4c959be 100644
--- a/src/server/storage/dbconfigpostgresql.h
+++ b/src/server/storage/dbconfigpostgresql.h
@@ -38,7 +38,7 @@ public:
* At this point the default settings should be determined, merged
* with the given @p settings and written back if @p storeSettings is true.
*/
- bool init(QSettings &settings, bool storeSettings=true) override;
+ bool init(QSettings &settings, bool storeSettings = true) override;
/**
* This method checks if the requirements for this database connection are
--
2.28.0