From 0c78c187f8e8ab73c75366693b5cb1dee43d9088 Mon Sep 17 00:00:00 2001 From: Mat Sutcliffe Date: Sun, 23 Aug 2020 19:59:44 +0100 Subject: [PATCH] Issue #77 Style --- src/blackcore/blackcoreexport.h | 6 +++--- src/blackgui/blackguiexport.h | 10 +++++----- src/blackinput/blackinputexport.h | 8 ++++---- src/blackmisc/algorithm.h | 4 ++-- src/blackmisc/blackmiscexport.h | 10 +++++----- src/blackmisc/connectionguard.cpp | 4 +++- src/blackmisc/connectionguard.h | 1 - src/blackmisc/crashhandler.cpp | 1 - src/blackmisc/icon.h | 2 +- src/blackmisc/inheritancetraits.h | 2 +- src/blackmisc/metadatautils.h | 1 - src/blackmisc/predicates.h | 1 - src/blackmisc/stringutils.h | 1 - src/blackmisc/threadutils.h | 5 ++--- src/blackmisc/variant.h | 2 +- src/blackmisc/variantprivate.h | 4 ++-- src/blackmisc/windllutils.h | 1 + src/blacksound/blacksoundexport.h | 8 ++++---- src/swiftcore/main.cpp | 1 - src/swiftdata/main.cpp | 1 - src/swiftguistandard/main.cpp | 1 - 21 files changed, 34 insertions(+), 40 deletions(-) diff --git a/src/blackcore/blackcoreexport.h b/src/blackcore/blackcoreexport.h index facc61dcb..b810de161 100644 --- a/src/blackcore/blackcoreexport.h +++ b/src/blackcore/blackcoreexport.h @@ -8,14 +8,14 @@ //! \file -#ifndef BLACKCORE_MACROS_H -#define BLACKCORE_MACROS_H +#ifndef BLACKCORE_BLACKCOREEXPORT_H +#define BLACKCORE_BLACKCOREEXPORT_H #include /*! * \def BLACKCORE_EXPORT - * BlackCore Export Macro + * Export a class or function from the library */ #ifndef WITH_STATIC diff --git a/src/blackgui/blackguiexport.h b/src/blackgui/blackguiexport.h index 65b047a7c..e9cb4e023 100644 --- a/src/blackgui/blackguiexport.h +++ b/src/blackgui/blackguiexport.h @@ -8,14 +8,14 @@ //! \file -#ifndef BLACKGUI_MACROS_H -#define BLACKGUI_MACROS_H +#ifndef BLACKGUI_BLACKGUIEXPORT_H +#define BLACKGUI_BLACKGUIEXPORT_H #include /*! * \def BLACKGUI_EXPORT - * BlackGui Export Macro + * Export a class or function from the library */ #ifndef WITH_STATIC @@ -30,12 +30,12 @@ /*! * \def BLACKGUI_EXPORT_DECLARE_TEMPLATE - * BLACKGUI Export Explicit Template Declaration Macro + * BLACKGUI Export explicit template declaration */ /*! * \def BLACKGUI_EXPORT_DEFINE_TEMPLATE - * BLACKGUI Export Explicit Template Definition Macro + * BLACKGUI Export explicit template definition */ #if defined(Q_OS_WIN) && defined(Q_CC_GNU) # define BLACKGUI_EXPORT_DECLARE_TEMPLATE BLACKGUI_EXPORT diff --git a/src/blackinput/blackinputexport.h b/src/blackinput/blackinputexport.h index 0ce0fa344..16b57c067 100644 --- a/src/blackinput/blackinputexport.h +++ b/src/blackinput/blackinputexport.h @@ -8,14 +8,14 @@ //! \file -#ifndef BLACKINPUT_MACROS_H -#define BLACKINPUT_MACROS_H +#ifndef BLACKINPUT_BLACKINPUTEXPORT_H +#define BLACKINPUT_BLACKINPUTEXPORT_H #include /*! * \def BLACKINPUT_EXPORT - * BlackInput Export Macro + * Export a class or function from the library */ #ifndef WITH_STATIC @@ -28,4 +28,4 @@ # define BLACKINPUT_EXPORT #endif -#endif // BLACKINPUT_MACROS_H +#endif // guard diff --git a/src/blackmisc/algorithm.h b/src/blackmisc/algorithm.h index df0621dc8..6bcc85de1 100644 --- a/src/blackmisc/algorithm.h +++ b/src/blackmisc/algorithm.h @@ -11,14 +11,14 @@ #ifndef BLACKMISC_ALGORITHM_H #define BLACKMISC_ALGORITHM_H -#include "blackmisc/integersequence.h" - #include #include #include #include #include +#include #include +#include namespace BlackMisc { diff --git a/src/blackmisc/blackmiscexport.h b/src/blackmisc/blackmiscexport.h index 46ac6269e..e19b3bb57 100644 --- a/src/blackmisc/blackmiscexport.h +++ b/src/blackmisc/blackmiscexport.h @@ -8,14 +8,14 @@ //! \file -#ifndef BLACKMISC_MACROS_H -#define BLACKMISC_MACROS_H +#ifndef BLACKMISC_BLACKMISCEXPORT_H +#define BLACKMISC_BLACKMISCEXPORT_H #include /*! * \def BLACKMISC_EXPORT - * BlackMisc Export Macro + * Export a class or function from the library */ #ifndef WITH_STATIC # if defined(BUILD_BLACKMISC_LIB) @@ -29,12 +29,12 @@ /*! * \def BLACKMISC_EXPORT_DECLARE_TEMPLATE - * BlackMisc Export Explicit Template Declaration Macro + * Export explicit template declaration */ /*! * \def BLACKMISC_EXPORT_DEFINE_TEMPLATE - * BlackMisc Export Explicit Template Definition Macro + * Export explicit template definition */ #if defined(Q_OS_WIN) && defined(Q_CC_GNU) # define BLACKMISC_EXPORT_DECLARE_TEMPLATE BLACKMISC_EXPORT diff --git a/src/blackmisc/connectionguard.cpp b/src/blackmisc/connectionguard.cpp index 8a3038073..5cacf4241 100644 --- a/src/blackmisc/connectionguard.cpp +++ b/src/blackmisc/connectionguard.cpp @@ -7,7 +7,9 @@ */ #include "blackmisc/connectionguard.h" -#include "blackmisc/range.h" +#include "blackmisc/range.h" // for as_const + +#include namespace BlackMisc { diff --git a/src/blackmisc/connectionguard.h b/src/blackmisc/connectionguard.h index defe2185e..3193414e8 100644 --- a/src/blackmisc/connectionguard.h +++ b/src/blackmisc/connectionguard.h @@ -15,7 +15,6 @@ #include #include -#include namespace BlackMisc { diff --git a/src/blackmisc/crashhandler.cpp b/src/blackmisc/crashhandler.cpp index 4db2c6338..6df46b586 100644 --- a/src/blackmisc/crashhandler.cpp +++ b/src/blackmisc/crashhandler.cpp @@ -7,7 +7,6 @@ */ #include "blackmisc/crashhandler.h" -#include "blackmisc/appstarttime.h" #include "blackmisc/directoryutils.h" #include "blackmisc/logmessage.h" #include "blackmisc/filelogger.h" diff --git a/src/blackmisc/icon.h b/src/blackmisc/icon.h index 2ae7ea03c..2a386716f 100644 --- a/src/blackmisc/icon.h +++ b/src/blackmisc/icon.h @@ -158,7 +158,7 @@ namespace BlackMisc namespace Private { - //! \private Needed so we can copy forward-declared CIcon. + //! \private Needed so CValueObjectMetaInfoHelper can copy forward-declared CIcon. inline void assign(CIcon &a, const CIcon &b) { a = b; } } diff --git a/src/blackmisc/inheritancetraits.h b/src/blackmisc/inheritancetraits.h index 03b1e3cb4..8e3c5d316 100644 --- a/src/blackmisc/inheritancetraits.h +++ b/src/blackmisc/inheritancetraits.h @@ -11,7 +11,7 @@ #ifndef BLACKMISC_INHERITANCE_TRAITS_H #define BLACKMISC_INHERITANCE_TRAITS_H -#include "blackmisc/typetraits.h" +#include "blackmisc/typetraits.h" // for void_t #include #include diff --git a/src/blackmisc/metadatautils.h b/src/blackmisc/metadatautils.h index 212c572c5..2d669d2d7 100644 --- a/src/blackmisc/metadatautils.h +++ b/src/blackmisc/metadatautils.h @@ -21,7 +21,6 @@ class QTextStream; class QObject; struct QMetaObject; -//! Metadata util functions namespace BlackMisc { //! Display all user metatypes diff --git a/src/blackmisc/predicates.h b/src/blackmisc/predicates.h index 98984dd7a..8c9461d66 100644 --- a/src/blackmisc/predicates.h +++ b/src/blackmisc/predicates.h @@ -11,7 +11,6 @@ #ifndef BLACKMISC_PREDICATES_H #define BLACKMISC_PREDICATES_H -#include "blackmisc/integersequence.h" #include "blackmisc/algorithm.h" #include diff --git a/src/blackmisc/stringutils.h b/src/blackmisc/stringutils.h index 245ff4af6..5f4623001 100644 --- a/src/blackmisc/stringutils.h +++ b/src/blackmisc/stringutils.h @@ -36,7 +36,6 @@ template class QMap; -//! Free functions in BlackMisc namespace BlackMisc { //! Return a string with characters removed that match the given predicate. diff --git a/src/blackmisc/threadutils.h b/src/blackmisc/threadutils.h index c0d5e5f0c..4d3c7a68d 100644 --- a/src/blackmisc/threadutils.h +++ b/src/blackmisc/threadutils.h @@ -8,11 +8,10 @@ //! \file -#ifndef BLACKMISC_CTHREADUTILS_H -#define BLACKMISC_CTHREADUTILS_H +#ifndef BLACKMISC_THREADUTILS_H +#define BLACKMISC_THREADUTILS_H #include "blackmisc/blackmiscexport.h" - #include #include diff --git a/src/blackmisc/variant.h b/src/blackmisc/variant.h index 55a0774b9..bdbdf98ec 100644 --- a/src/blackmisc/variant.h +++ b/src/blackmisc/variant.h @@ -384,7 +384,7 @@ namespace BlackMisc { namespace Private { - //! \private Needed so we can copy forward-declared CVariant. + //! \private Needed so CValueObjectMetaInfoHelper can copy forward-declared CVariant. inline void assign(CVariant &a, const CVariant &b) { a = b; } //! \private diff --git a/src/blackmisc/variantprivate.h b/src/blackmisc/variantprivate.h index 5b57931e2..06fce0a6b 100644 --- a/src/blackmisc/variantprivate.h +++ b/src/blackmisc/variantprivate.h @@ -35,10 +35,10 @@ namespace BlackMisc namespace Private { - //! \private Needed so we can copy forward-declared CVariant. + //! \private Defined in variant.h void assign(CVariant &, const CVariant &); - //! \private Needed so we can copy forward-declared CIcon. + //! \private Defined in icon.h void assign(CIcon &, const CIcon &); //! \private Abstract base class representing the set of operations supported by a particular value type. diff --git a/src/blackmisc/windllutils.h b/src/blackmisc/windllutils.h index 367eb7e0b..a33307a7b 100644 --- a/src/blackmisc/windllutils.h +++ b/src/blackmisc/windllutils.h @@ -13,6 +13,7 @@ #include "blackmisc/blackmiscexport.h" #include +#include namespace BlackMisc { diff --git a/src/blacksound/blacksoundexport.h b/src/blacksound/blacksoundexport.h index efd2958ef..c6675744d 100644 --- a/src/blacksound/blacksoundexport.h +++ b/src/blacksound/blacksoundexport.h @@ -8,14 +8,14 @@ //! \file -#ifndef BLACKSOUND_MACROS_H -#define BLACKSOUND_MACROS_H +#ifndef BLACKSOUND_BLACKSOUNDEXPORT_H +#define BLACKSOUND_BLACKSOUNDEXPORT_H #include /*! * \def BLACKSOUND_EXPORT - * BlackSound Export Macro + * Export a class or function from the library */ #ifndef WITH_STATIC @@ -28,4 +28,4 @@ # define BLACKSOUND_EXPORT #endif -#endif // BLACKSOUND_MACROS_H +#endif // guard diff --git a/src/swiftcore/main.cpp b/src/swiftcore/main.cpp index e7e380cd7..15811d993 100644 --- a/src/swiftcore/main.cpp +++ b/src/swiftcore/main.cpp @@ -12,7 +12,6 @@ #include "blackmisc/icons.h" #include "blackmisc/directoryutils.h" #include "blackmisc/crashhandler.h" -#include "blackmisc/appstarttime.h" #include "swiftcore.h" #include diff --git a/src/swiftdata/main.cpp b/src/swiftdata/main.cpp index be865bab8..6cc7f4839 100644 --- a/src/swiftdata/main.cpp +++ b/src/swiftdata/main.cpp @@ -11,7 +11,6 @@ #include "blackmisc/directoryutils.h" #include "blackmisc/icons.h" #include "blackmisc/crashhandler.h" -#include "blackmisc/appstarttime.h" #include "swiftdata.h" #include diff --git a/src/swiftguistandard/main.cpp b/src/swiftguistandard/main.cpp index 1bfdfe2ff..d2a73b6bf 100644 --- a/src/swiftguistandard/main.cpp +++ b/src/swiftguistandard/main.cpp @@ -15,7 +15,6 @@ #include "blackmisc/audio/audioutils.h" #include "blackmisc/directoryutils.h" #include "blackmisc/crashhandler.h" -#include "blackmisc/appstarttime.h" #include #include