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/conversioncheck.h | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'src/core/conversioncheck.h') diff --git a/src/core/conversioncheck.h b/src/core/conversioncheck.h index 7f0e78a4..8537d81e 100644 --- a/src/core/conversioncheck.h +++ b/src/core/conversioncheck.h @@ -8,11 +8,11 @@ #ifndef CONVERSION_CHECK_H #define CONVERSION_CHECK_H -#include #include #include -#include #include +#include +#include #include class QColor; @@ -20,20 +20,21 @@ class QFont; namespace ConversionCheck { - // used to distinguish between supported/unsupported types -struct supported { }; -struct unsupported { }; +struct supported { +}; +struct unsupported { +}; // traits type class to define support for constraints -template +template struct QVconvertible { typedef unsupported toQString; typedef unsupported toQVariant; }; // constraint classes -template +template struct type_toQString { void constraint() { @@ -43,7 +44,7 @@ struct type_toQString { typename QVconvertible::toQString y; }; -template +template struct type_toQVariant { void constraint() { @@ -55,7 +56,7 @@ struct type_toQVariant { // check if T is convertible to QString thru QVariant // if not supported can't be used in QList functions -template +template inline void to_QString() { void (type_toQString::*x)() = &type_toQString::constraint; @@ -63,7 +64,7 @@ inline void to_QString() } // check if T is convertible to QVariant & supported in readEntry/writeEntry -template +template inline void to_QVariant() { void (type_toQVariant::*x)() = &type_toQVariant::constraint; @@ -74,10 +75,11 @@ inline void to_QVariant() // string_support - is supported by QVariant(type).toString(), // can be used in QList functions // variant_support - has a QVariant constructor -#define QVConversions(type, string_support, variant_support) \ - template <> struct QVconvertible {\ - typedef string_support toQString;\ - typedef variant_support toQVariant;\ +#define QVConversions(type, string_support, variant_support) \ + template<> \ + struct QVconvertible { \ + typedef string_support toQString; \ + typedef variant_support toQVariant; \ } // The only types needed here are the types handled in readEntry/writeEntry @@ -108,4 +110,3 @@ QVConversions(QList, unsupported, supported); } #endif - -- cgit v1.2.1