From 8841d5f00647a33f0f6efc1ada5c4e90fc235625 Mon Sep 17 00:00:00 2001 From: Nicolas Werner <nicolas.werner@hotmail.de> Date: Sat, 4 Apr 2020 19:40:26 +0200 Subject: [PATCH] Don't use nested namespace declarations in headers Qt < 5.9 moc chokes on that --- include/mtx/log.hpp | 6 +++++- include/mtx/pushrules.hpp | 4 +++- include/mtx/user_interactive.hpp | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/mtx/log.hpp b/include/mtx/log.hpp index af19ba5e7..9877c6318 100644 --- a/include/mtx/log.hpp +++ b/include/mtx/log.hpp @@ -2,9 +2,13 @@ #include <string_view> -namespace mtx::utils::log { +namespace mtx { +namespace utils { +namespace log { void log_warning(const std::string_view &msg); void log_error(const std::string_view &msg); } +} +} diff --git a/include/mtx/pushrules.hpp b/include/mtx/pushrules.hpp index 3c5396c1b..f4301d96b 100644 --- a/include/mtx/pushrules.hpp +++ b/include/mtx/pushrules.hpp @@ -10,7 +10,8 @@ #include <variant> #include <vector> -namespace mtx::pushrules { +namespace mtx { +namespace pushrules { struct PushCondition { //! Required. The kind of condition to apply. See conditions for more information on the @@ -147,3 +148,4 @@ to_json(nlohmann::json &obj, const Enabled &enabled); void from_json(const nlohmann::json &obj, Enabled &enabled); } +} diff --git a/include/mtx/user_interactive.hpp b/include/mtx/user_interactive.hpp index 0d52f4cc7..7245a159b 100644 --- a/include/mtx/user_interactive.hpp +++ b/include/mtx/user_interactive.hpp @@ -8,7 +8,8 @@ #include <nlohmann/json.hpp> -namespace mtx::user_interactive { +namespace mtx { +namespace user_interactive { using AuthType = std::string; namespace auth_types { constexpr std::string_view password = "m.login.password"; @@ -165,3 +166,4 @@ struct Auth void to_json(nlohmann::json &obj, const Auth &auth); } +} -- GitLab