From 8bed00ab34e31f2b9c70026d418d923913325798 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Mon, 22 Feb 2021 17:38:09 +0200 Subject: Run clang-format on all cpp/h files NO_CHANGELOG --- src/core/ksharedconfig.cpp | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'src/core/ksharedconfig.cpp') diff --git a/src/core/ksharedconfig.cpp b/src/core/ksharedconfig.cpp index cc6adeb9..98aa4c5e 100644 --- a/src/core/ksharedconfig.cpp +++ b/src/core/ksharedconfig.cpp @@ -7,9 +7,9 @@ */ #include "ksharedconfig.h" +#include "kconfig_p.h" #include "kconfigbackend_p.h" #include "kconfiggroup.h" -#include "kconfig_p.h" #include #include #include @@ -40,8 +40,8 @@ public: }; static QThreadStorage s_storage; -template -T * perThreadGlobalStatic() +template +T *perThreadGlobalStatic() { if (!s_storage.hasLocalData()) { s_storage.setLocalData(new T); @@ -50,7 +50,10 @@ T * perThreadGlobalStatic() } // Q_GLOBAL_STATIC(GlobalSharedConfigList, globalSharedConfigList), but per thread: -static GlobalSharedConfigList *globalSharedConfigList() { return perThreadGlobalStatic(); } +static GlobalSharedConfigList *globalSharedConfigList() +{ + return perThreadGlobalStatic(); +} void _k_globalMainConfigSync() { @@ -60,9 +63,7 @@ void _k_globalMainConfigSync() } } -KSharedConfigPtr KSharedConfig::openConfig(const QString &_fileName, - OpenFlags flags, - QStandardPaths::StandardLocation resType) +KSharedConfigPtr KSharedConfig::openConfig(const QString &_fileName, OpenFlags flags, QStandardPaths::StandardLocation resType) { QString fileName(_fileName); GlobalSharedConfigList *list = globalSharedConfigList(); @@ -78,11 +79,9 @@ KSharedConfigPtr KSharedConfig::openConfig(const QString &_fileName, } for (auto *cfg : qAsConst(*list)) { - if (cfg->name() == fileName && - cfg->d_ptr->openFlags == flags && - cfg->locationType() == resType -// cfg->backend()->type() == backend - ) { + if (cfg->name() == fileName && cfg->d_ptr->openFlags == flags && cfg->locationType() == resType + // cfg->backend()->type() == backend + ) { return KSharedConfigPtr(cfg); } } @@ -121,9 +120,7 @@ KSharedConfig::Ptr KSharedConfig::openStateConfig(const QString &_fileName) return openConfig(fileName, SimpleConfig, QStandardPaths::AppDataLocation); } -KSharedConfig::KSharedConfig(const QString &fileName, - OpenFlags flags, - QStandardPaths::StandardLocation resType) +KSharedConfig::KSharedConfig(const QString &fileName, OpenFlags flags, QStandardPaths::StandardLocation resType) : KConfig(fileName, flags, resType) { globalSharedConfigList()->append(this); -- cgit v1.2.1