From aacc4bcb4a487871daae6717f77605aaba444341 Mon Sep 17 00:00:00 2001 From: Marc Deop Date: Sat, 2 Mar 2019 12:26:57 +0100 Subject: style: apply .clang-format to all .cpp and .h files --- lib/joinstate.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/joinstate.h') diff --git a/lib/joinstate.h b/lib/joinstate.h index 379183f6..ddaba9a5 100644 --- a/lib/joinstate.h +++ b/lib/joinstate.h @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #pragma once @@ -22,10 +22,8 @@ #include -namespace QMatrixClient -{ - enum class JoinState : unsigned int - { +namespace QMatrixClient { + enum class JoinState : unsigned int { Join = 0x1, Invite = 0x2, Leave = 0x4, @@ -35,14 +33,16 @@ namespace QMatrixClient // We cannot use REGISTER_ENUM outside of a Q_OBJECT and besides, we want // to use strings that match respective JSON keys. - static const std::array JoinStateStrings - { { "join", "invite", "leave" } }; + static const std::array JoinStateStrings { + { "join", "invite", "leave" } + }; inline const char* toCString(JoinState js) { size_t state = size_t(js), index = 0; - while (state >>= 1) ++index; + while (state >>= 1) + ++index; return JoinStateStrings[index]; } -} // namespace QMatrixClient +} // namespace QMatrixClient Q_DECLARE_OPERATORS_FOR_FLAGS(QMatrixClient::JoinStates) -- cgit v1.2.3 From c05ade838f0fce81f2bbe80a3295618a8a26ff52 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 2 Aug 2019 19:59:40 +0900 Subject: Apply the new brace wrapping to source files --- lib/joinstate.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/joinstate.h') diff --git a/lib/joinstate.h b/lib/joinstate.h index e4dc679a..fcf840ae 100644 --- a/lib/joinstate.h +++ b/lib/joinstate.h @@ -22,10 +22,8 @@ #include -namespace QMatrixClient -{ -enum class JoinState : unsigned int -{ +namespace QMatrixClient { +enum class JoinState : unsigned int { Join = 0x1, Invite = 0x2, Leave = 0x4, -- cgit v1.2.3 From 27ca32a1e5a56e09b9cc1d94224d2831004dcf3d Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 7 Jul 2019 19:32:34 +0900 Subject: Namespace: QMatrixClient -> Quotient (with back comp alias) --- lib/joinstate.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/joinstate.h') diff --git a/lib/joinstate.h b/lib/joinstate.h index fcf840ae..718ae3fd 100644 --- a/lib/joinstate.h +++ b/lib/joinstate.h @@ -22,7 +22,7 @@ #include -namespace QMatrixClient { +namespace Quotient { enum class JoinState : unsigned int { Join = 0x1, Invite = 0x2, @@ -43,5 +43,5 @@ inline const char* toCString(JoinState js) ++index; return JoinStateStrings[index]; } -} // namespace QMatrixClient -Q_DECLARE_OPERATORS_FOR_FLAGS(QMatrixClient::JoinStates) +} // namespace Quotient +Q_DECLARE_OPERATORS_FOR_FLAGS(Quotient::JoinStates) -- cgit v1.2.3 From e9ae0d5eaac12a276ea352f1e633fb22cdd46828 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 11 Aug 2019 17:01:41 +0900 Subject: Now that we're C++17, remove old compatibility cruft --- lib/joinstate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/joinstate.h') diff --git a/lib/joinstate.h b/lib/joinstate.h index 718ae3fd..31c2b6a7 100644 --- a/lib/joinstate.h +++ b/lib/joinstate.h @@ -31,7 +31,7 @@ enum class JoinState : unsigned int { Q_DECLARE_FLAGS(JoinStates, JoinState) -// We cannot use REGISTER_ENUM outside of a Q_OBJECT and besides, we want +// We cannot use Q_ENUM outside of a Q_OBJECT and besides, we want // to use strings that match respective JSON keys. static const std::array JoinStateStrings { { "join", "invite", "leave" } }; -- cgit v1.2.3