From 4582c8600c9d5e2d32f1bc3461a57ccd043f1964 Mon Sep 17 00:00:00 2001 From: namedkitten Date: Wed, 6 May 2020 13:04:07 +0100 Subject: [PATCH] Fix code. --- .vscode/c_cpp_properties.json | 12 ++++++++++++ CMakeLists.txt | 2 ++ src/logger.cpp | 11 ++++++----- 3 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 .vscode/c_cpp_properties.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..cd2c9c9 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,12 @@ +{ + "configurations": [ + { + "name": "Linux", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", + "intelliSenseMode": "gcc-x64", + "cStandard": "c11", + "cppStandard": "c++17" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index fae13b8..04bf5e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,8 @@ find_package(Qt5Concurrent REQUIRED) find_package(Qt5 CONFIG REQUIRED COMPONENTS Qml Quick Gui Widgets Core X11Extras) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + option(QML_DEBUG "enable qml debug" OFF) if(QML_DEBUG) add_definitions(-DQT_QML_DEBUG) diff --git a/src/logger.cpp b/src/logger.cpp index 7d0a25d..0b7da85 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -1,9 +1,15 @@ +// clang-format off +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export #include "spdlog/common.h" #include "spdlog/details/file_helper-inl.h" #include "spdlog/sinks/ansicolor_sink-inl.h" #include "spdlog/sinks/base_sink-inl.h" #include "spdlog/sinks/basic_file_sink-inl.h" #include "spdlog/spdlog-inl.h" +// clang-format on #include #include #include @@ -11,11 +17,6 @@ #include // IWYU pragma: keep #include #include // IWYU pragma: keep -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include // IWYU pragma: export -#include // IWYU pragma: export #include std::shared_ptr