Skip to content

Commit 8841d5f

Browse files
committed
Don't use nested namespace declarations in headers
Qt < 5.9 moc chokes on that
1 parent 02299ee commit 8841d5f

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

include/mtx/log.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
#include <string_view>
44

5-
namespace mtx::utils::log {
5+
namespace mtx {
6+
namespace utils {
7+
namespace log {
68
void
79
log_warning(const std::string_view &msg);
810
void
911
log_error(const std::string_view &msg);
1012
}
13+
}
14+
}

include/mtx/pushrules.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
#include <variant>
1111
#include <vector>
1212

13-
namespace mtx::pushrules {
13+
namespace mtx {
14+
namespace pushrules {
1415
struct PushCondition
1516
{
1617
//! 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);
147148
void
148149
from_json(const nlohmann::json &obj, Enabled &enabled);
149150
}
151+
}

include/mtx/user_interactive.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
#include <nlohmann/json.hpp>
1010

11-
namespace mtx::user_interactive {
11+
namespace mtx {
12+
namespace user_interactive {
1213
using AuthType = std::string;
1314
namespace auth_types {
1415
constexpr std::string_view password = "m.login.password";
@@ -165,3 +166,4 @@ struct Auth
165166
void
166167
to_json(nlohmann::json &obj, const Auth &auth);
167168
}
169+
}

0 commit comments

Comments
 (0)