From 2e4702f2e40da44d895993bb1ca966b376df2bd9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 23 Aug 2024 20:03:36 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- CMakeLists.txt | 2 +- qt/qt6_natvis/main.cpp | 2 +- qt/qt_fmt/qt_fmt.h | 2 +- qt/qt_fmt/qt_fmt_helpers.h | 13 ++++++------- qt/qt_fmt/qt_std_format.h | 7 +++---- .../tests/qstringtokenizer/tst_qstringtokenizer.cpp | 2 +- 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fe83573..f07002e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ find_package(Qt${QT_VERSION_MAJOR} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Core G set(CMAKE_AUTOMOC ON) -if (MSVC) +if(MSVC) add_compile_options(/Zc:__cplusplus) endif() diff --git a/qt/qt6_natvis/main.cpp b/qt/qt6_natvis/main.cpp index 03c3468..968817f 100644 --- a/qt/qt6_natvis/main.cpp +++ b/qt/qt6_natvis/main.cpp @@ -9,8 +9,8 @@ #include -#include #include +#include int main(int argc, char *argv[]) { diff --git a/qt/qt_fmt/qt_fmt.h b/qt/qt_fmt/qt_fmt.h index c73b6f1..fb0589e 100644 --- a/qt/qt_fmt/qt_fmt.h +++ b/qt/qt_fmt/qt_fmt.h @@ -10,8 +10,8 @@ #include "qt_fmt_helpers.h" -#include #include +#include template struct fmt::formatter +#include #include #include -#include -#include -#include +#include #include #include -#include -#include -#include #include #include +#include +#include +#include +#include namespace Qt_fmt { @@ -88,4 +88,3 @@ struct exclude_from_qdebug_fmt // clang-format on } // namespace Qt_fmt - diff --git a/qt/qt_fmt/qt_std_format.h b/qt/qt_fmt/qt_std_format.h index fecd2b1..02edff0 100644 --- a/qt/qt_fmt/qt_std_format.h +++ b/qt/qt_fmt/qt_std_format.h @@ -12,15 +12,14 @@ #error "This header requires C++20" #endif -#include -#include #include "qt_fmt_helpers.h" +#include +#include namespace Qt_fmt::detail { template -concept IsFormattableViaQDebug = requires(QDebug &d, const T &t) -{ +concept IsFormattableViaQDebug = requires(QDebug &d, const T &t) { d << t; requires !Qt_fmt::exclude_from_qdebug_fmt::value; }; diff --git a/qt/stringtokenizer/tests/qstringtokenizer/tst_qstringtokenizer.cpp b/qt/stringtokenizer/tests/qstringtokenizer/tst_qstringtokenizer.cpp index 6e27795..25e5512 100644 --- a/qt/stringtokenizer/tests/qstringtokenizer/tst_qstringtokenizer.cpp +++ b/qt/stringtokenizer/tests/qstringtokenizer/tst_qstringtokenizer.cpp @@ -96,7 +96,7 @@ void tst_QStringTokenizer::basics() const QFETCH(const Qt::CaseSensitivity, cs); auto expected = QStringList{ - QLatin1String(""), QStringLiteral("a"), QStringLiteral("b"), QStringLiteral("c"), + QLatin1String(""), QStringLiteral("a"), QStringLiteral("b"), QStringLiteral("c"), QStringLiteral("d"), QStringLiteral("e"), QLatin1String(""), }; if (sb & Qt::SkipEmptyParts)