summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-22 19:03:55 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-22 19:03:55 +0300
commitc0e55378c31321e2ab7a117cefb3bd63a609e474 (patch)
treeef6f08864d713a4fc6dc49b24018156abfdec048 /include
parentRemove cache updates from the main thread (diff)
downloadnheko-c0e55378c31321e2ab7a117cefb3bd63a609e474.tar.xz
Remove extra inline keywords
Diffstat (limited to 'include')
-rw-r--r--include/Cache.h19
-rw-r--r--include/EmojiCategory.h11
-rw-r--r--include/Login.h40
-rw-r--r--include/MatrixClient.h51
-rw-r--r--include/Profile.h16
-rw-r--r--include/Register.h40
-rw-r--r--include/RoomInfoListItem.h44
-rw-r--r--include/RoomMessages.h24
-rw-r--r--include/RoomState.h24
-rw-r--r--include/Sync.h160
-rw-r--r--include/TextInputWidget.h8
-rw-r--r--include/TimelineItem.h8
-rw-r--r--include/TimelineView.h16
-rw-r--r--include/TopRoomBar.h36
-rw-r--r--include/events/AliasesEventContent.h7
-rw-r--r--include/events/AvatarEventContent.h7
-rw-r--r--include/events/CanonicalAliasEventContent.h7
-rw-r--r--include/events/CreateEventContent.h7
-rw-r--r--include/events/Event.h4
-rw-r--r--include/events/HistoryVisibilityEventContent.h7
-rw-r--r--include/events/JoinRulesEventContent.h7
-rw-r--r--include/events/MemberEventContent.h23
-rw-r--r--include/events/MessageEvent.h2
-rw-r--r--include/events/MessageEventContent.h7
-rw-r--r--include/events/NameEventContent.h7
-rw-r--r--include/events/PowerLevelsEventContent.h55
-rw-r--r--include/events/RoomEvent.h8
-rw-r--r--include/events/StateEvent.h4
-rw-r--r--include/events/TopicEventContent.h7
-rw-r--r--include/events/messages/Audio.h16
-rw-r--r--include/events/messages/File.h25
-rw-r--r--include/events/messages/Image.h16
-rw-r--r--include/events/messages/Location.h16
-rw-r--r--include/events/messages/Video.h16
34 files changed, 106 insertions, 639 deletions
diff --git a/include/Cache.h b/include/Cache.h
index 3a98fddc..69d880f5 100644
--- a/include/Cache.h
+++ b/include/Cache.h
@@ -33,8 +33,8 @@ public:
         QString nextBatchToken() const;
         QMap<QString, RoomState> states();
 
-        inline void deleteData();
-        inline void unmount();
+        void deleteData();
+        void unmount() { isMounted_ = false; };
 
         void removeRoom(const QString &roomid);
         void setup();
@@ -52,18 +52,3 @@ private:
         QString userId_;
         QString cacheDirectory_;
 };
-
-inline void
-Cache::unmount()
-{
-        isMounted_ = false;
-}
-
-inline void
-Cache::deleteData()
-{
-        qInfo() << "Deleting cache data";
-
-        if (!cacheDirectory_.isEmpty())
-                QDir(cacheDirectory_).removeRecursively();
-}
diff --git a/include/EmojiCategory.h b/include/EmojiCategory.h
index e17b110b..154ad8f4 100644
--- a/include/EmojiCategory.h
+++ b/include/EmojiCategory.h
@@ -39,7 +39,10 @@ signals:
         void emojiSelected(const QString &emoji);
 
 private slots:
-        inline void clickIndex(const QModelIndex &);
+        void clickIndex(const QModelIndex &index)
+        {
+                emit emojiSelected(index.data(Qt::UserRole).toString());
+        };
 
 private:
         QVBoxLayout *mainLayout_;
@@ -52,9 +55,3 @@ private:
 
         QLabel *category_;
 };
-
-inline void
-EmojiCategory::clickIndex(const QModelIndex &index)
-{
-        emit emojiSelected(index.data(Qt::UserRole).toString());
-}
diff --git a/include/Login.h b/include/Login.h
index ceca4ebf..2f74fab2 100644
--- a/include/Login.h
+++ b/include/Login.h
@@ -29,55 +29,25 @@ public:
 
         QByteArray serialize() noexcept;
 
-        inline void setPassword(QString password);
-        inline void setUser(QString username);
+        void setPassword(QString password) { password_ = password; };
+        void setUser(QString username) { user_ = username; };
 
 private:
         QString user_;
         QString password_;
 };
 
-inline void
-LoginRequest::setPassword(QString password)
-{
-        password_ = password;
-}
-
-inline void
-LoginRequest::setUser(QString username)
-{
-        user_ = username;
-}
-
 class LoginResponse : public Deserializable
 {
 public:
         void deserialize(const QJsonDocument &data) override;
 
-        inline QString getAccessToken();
-        inline QString getHomeServer();
-        inline QString getUserId();
+        QString getAccessToken() { return access_token_; };
+        QString getHomeServer() { return home_server_; };
+        QString getUserId() { return user_id_; };
 
 private:
         QString access_token_;
         QString home_server_;
         QString user_id_;
 };
-
-inline QString
-LoginResponse::getAccessToken()
-{
-        return access_token_;
-}
-
-inline QString
-LoginResponse::getHomeServer()
-{
-        return home_server_;
-}
-
-inline QString
-LoginResponse::getUserId()
-{
-        return user_id_;
-}
diff --git a/include/MatrixClient.h b/include/MatrixClient.h
index 0185bf64..7596cf4e 100644
--- a/include/MatrixClient.h
+++ b/include/MatrixClient.h
@@ -55,9 +55,9 @@ public:
         void joinRoom(const QString &roomIdOrAlias);
         void leaveRoom(const QString &roomId);
 
-        inline QUrl getHomeServer();
-        inline int transactionId();
-        inline void incrementTransactionId();
+        QUrl getHomeServer() { return server_; };
+        int transactionId() { return txn_id_; };
+        void incrementTransactionId() { txn_id_ += 1; };
 
         void reset() noexcept;
 
@@ -65,9 +65,12 @@ public slots:
         void getOwnProfile() noexcept;
         void logout() noexcept;
 
-        inline void setServer(const QString &server);
-        inline void setAccessToken(const QString &token);
-        inline void setNextBatchToken(const QString &next_batch);
+        void setServer(const QString &server)
+        {
+                server_ = QUrl(QString("https://%1").arg(server));
+        };
+        void setAccessToken(const QString &token) { token_ = token; };
+        void setNextBatchToken(const QString &next_batch) { next_batch_ = next_batch; };
 
 signals:
         void loginError(const QString &error);
@@ -162,39 +165,3 @@ private:
         // Token to be used for the next sync.
         QString next_batch_;
 };
-
-inline QUrl
-MatrixClient::getHomeServer()
-{
-        return server_;
-}
-
-inline int
-MatrixClient::transactionId()
-{
-        return txn_id_;
-}
-
-inline void
-MatrixClient::setServer(const QString &server)
-{
-        server_ = QUrl(QString("https://%1").arg(server));
-}
-
-inline void
-MatrixClient::setAccessToken(const QString &token)
-{
-        token_ = token;
-}
-
-inline void
-MatrixClient::setNextBatchToken(const QString &next_batch)
-{
-        next_batch_ = next_batch;
-}
-
-inline void
-MatrixClient::incrementTransactionId()
-{
-        txn_id_ += 1;
-}
diff --git a/include/Profile.h b/include/Profile.h
index c460efbb..e2868e62 100644
--- a/include/Profile.h
+++ b/include/Profile.h
@@ -27,22 +27,10 @@ class ProfileResponse : public Deserializable
 public:
         void deserialize(const QJsonDocument &data) override;
 
-        inline QUrl getAvatarUrl();
-        inline QString getDisplayName();
+        QUrl getAvatarUrl() { return avatar_url_; };
+        QString getDisplayName() { return display_name_; };
 
 private:
         QUrl avatar_url_;
         QString display_name_;
 };
-
-inline QUrl
-ProfileResponse::getAvatarUrl()
-{
-        return avatar_url_;
-}
-
-inline QString
-ProfileResponse::getDisplayName()
-{
-        return display_name_;
-}
diff --git a/include/Register.h b/include/Register.h
index eb3a3d81..83f538b9 100644
--- a/include/Register.h
+++ b/include/Register.h
@@ -29,55 +29,25 @@ public:
 
         QByteArray serialize() noexcept;
 
-        inline void setPassword(QString password);
-        inline void setUser(QString username);
+        void setPassword(QString password) { password_ = password; };
+        void setUser(QString username) { user_ = username; };
 
 private:
         QString user_;
         QString password_;
 };
 
-inline void
-RegisterRequest::setPassword(QString password)
-{
-        password_ = password;
-}
-
-inline void
-RegisterRequest::setUser(QString username)
-{
-        user_ = username;
-}
-
 class RegisterResponse : public Deserializable
 {
 public:
         void deserialize(const QJsonDocument &data) override;
 
-        inline QString getAccessToken();
-        inline QString getHomeServer();
-        inline QString getUserId();
+        QString getAccessToken() { return access_token_; };
+        QString getHomeServer() { return home_server_; };
+        QString getUserId() { return user_id_; };
 
 private:
         QString access_token_;
         QString home_server_;
         QString user_id_;
 };
-
-inline QString
-RegisterResponse::getAccessToken()
-{
-        return access_token_;
-}
-
-inline QString
-RegisterResponse::getHomeServer()
-{
-        return home_server_;
-}
-
-inline QString
-RegisterResponse::getUserId()
-{
-        return user_id_;
-}
diff --git a/include/RoomInfoListItem.h b/include/RoomInfoListItem.h
index d7009a85..8975af79 100644
--- a/include/RoomInfoListItem.h
+++ b/include/RoomInfoListItem.h
@@ -50,11 +50,12 @@ public:
         void clearUnreadMessageCount();
         void setState(const RoomState &state);
 
-        inline bool isPressed() const;
-        inline RoomState state() const;
-        inline void setAvatar(const QImage &avatar_image);
-        inline int unreadMessageCount() const;
-        inline void setDescriptionMessage(const DescInfo &info);
+        bool isPressed() const { return isPressed_; };
+        RoomState state() const { return state_; };
+        int unreadMessageCount() const { return unreadMsgCount_; };
+
+        void setAvatar(const QImage &avatar_image);
+        void setDescriptionMessage(const DescInfo &info);
 
 signals:
         void clicked(const QString &room_id);
@@ -97,36 +98,3 @@ private:
         int maxHeight_;
         int unreadMsgCount_ = 0;
 };
-
-inline int
-RoomInfoListItem::unreadMessageCount() const
-{
-        return unreadMsgCount_;
-}
-
-inline bool
-RoomInfoListItem::isPressed() const
-{
-        return isPressed_;
-}
-
-inline RoomState
-RoomInfoListItem::state() const
-{
-        return state_;
-}
-
-inline void
-RoomInfoListItem::setAvatar(const QImage &img)
-{
-        roomAvatar_ = QPixmap::fromImage(
-          img.scaled(IconSize, IconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
-        update();
-}
-
-inline void
-RoomInfoListItem::setDescriptionMessage(const DescInfo &info)
-{
-        lastMsgInfo_ = info;
-        update();
-}
diff --git a/include/RoomMessages.h b/include/RoomMessages.h
index 89d546a8..7aee2e24 100644
--- a/include/RoomMessages.h
+++ b/include/RoomMessages.h
@@ -27,30 +27,12 @@ class RoomMessages : public Deserializable
 public:
         void deserialize(const QJsonDocument &data) override;
 
-        inline QString start() const;
-        inline QString end() const;
-        inline QJsonArray chunk() const;
+        QString start() const { return start_; };
+        QString end() const { return end_; };
+        QJsonArray chunk() const { return chunk_; };
 
 private:
         QString start_;
         QString end_;
         QJsonArray chunk_;
 };
-
-inline QString
-RoomMessages::start() const
-{
-        return start_;
-}
-
-inline QString
-RoomMessages::end() const
-{
-        return end_;
-}
-
-inline QJsonArray
-RoomMessages::chunk() const
-{
-        return chunk_;
-}
diff --git a/include/RoomState.h b/include/RoomState.h
index a07fcbed..57955e56 100644
--- a/include/RoomState.h
+++ b/include/RoomState.h
@@ -49,9 +49,9 @@ public:
         void resolveAvatar();
         void parse(const QJsonObject &object);
 
-        inline QUrl getAvatar() const;
-        inline QString getName() const;
-        inline QString getTopic() const;
+        QUrl getAvatar() const { return avatar_; };
+        QString getName() const { return name_; };
+        QString getTopic() const { return topic.content().topic().simplified(); };
 
         void removeLeaveMemberships();
         void update(const RoomState &state);
@@ -81,21 +81,3 @@ private:
         // avatar event this should be empty.
         QString userAvatar_;
 };
-
-inline QString
-RoomState::getTopic() const
-{
-        return topic.content().topic().simplified();
-}
-
-inline QString
-RoomState::getName() const
-{
-        return name_;
-}
-
-inline QUrl
-RoomState::getAvatar() const
-{
-        return avatar_;
-}
diff --git a/include/Sync.h b/include/Sync.h
index c49d7101..ae61015e 100644
--- a/include/Sync.h
+++ b/include/Sync.h
@@ -27,15 +27,15 @@
 class Event : public Deserializable
 {
 public:
-        inline QJsonObject content() const;
-        inline QJsonObject unsigned_content() const;
+        QJsonObject content() const { return content_; };
+        QJsonObject unsigned_content() const { return unsigned_; };
 
-        inline QString sender() const;
-        inline QString state_key() const;
-        inline QString type() const;
-        inline QString eventId() const;
+        QString sender() const { return sender_; };
+        QString state_key() const { return state_key_; };
+        QString type() const { return type_; };
+        QString eventId() const { return event_id_; };
 
-        inline uint64_t timestamp() const;
+        uint64_t timestamp() const { return origin_server_ts_; };
 
         void deserialize(const QJsonValue &data) override;
 
@@ -51,70 +51,22 @@ private:
         uint64_t origin_server_ts_;
 };
 
-inline QJsonObject
-Event::content() const
-{
-        return content_;
-}
-
-inline QJsonObject
-Event::unsigned_content() const
-{
-        return unsigned_;
-}
-
-inline QString
-Event::sender() const
-{
-        return sender_;
-}
-
-inline QString
-Event::state_key() const
-{
-        return state_key_;
-}
-
-inline QString
-Event::type() const
-{
-        return type_;
-}
-
-inline QString
-Event::eventId() const
-{
-        return event_id_;
-}
-
-inline uint64_t
-Event::timestamp() const
-{
-        return origin_server_ts_;
-}
-
 class State : public Deserializable
 {
 public:
         void deserialize(const QJsonValue &data) override;
-        inline QJsonArray events() const;
+        QJsonArray events() const { return events_; };
 
 private:
         QJsonArray events_;
 };
 
-inline QJsonArray
-State::events() const
-{
-        return events_;
-}
-
 class Timeline : public Deserializable
 {
 public:
-        inline QJsonArray events() const;
-        inline QString previousBatch() const;
-        inline bool limited() const;
+        QJsonArray events() const { return events_; };
+        QString previousBatch() const { return prev_batch_; };
+        bool limited() const { return limited_; };
 
         void deserialize(const QJsonValue &data) override;
 
@@ -124,31 +76,13 @@ private:
         bool limited_;
 };
 
-inline QJsonArray
-Timeline::events() const
-{
-        return events_;
-}
-
-inline QString
-Timeline::previousBatch() const
-{
-        return prev_batch_;
-}
-
-inline bool
-Timeline::limited() const
-{
-        return limited_;
-}
-
 // TODO: Add support for account_data, undread_notifications
 class JoinedRoom : public Deserializable
 {
 public:
-        inline State state() const;
-        inline Timeline timeline() const;
-        inline QList<QString> typingUserIDs() const;
+        State state() const { return state_; };
+        Timeline timeline() const { return timeline_; };
+        QList<QString> typingUserIDs() const { return typingUserIDs_; };
 
         void deserialize(const QJsonValue &data) override;
 
@@ -160,29 +94,11 @@ private:
         /* UnreadNotifications unread_notifications_; */
 };
 
-inline QList<QString>
-JoinedRoom::typingUserIDs() const
-{
-        return typingUserIDs_;
-}
-
-inline State
-JoinedRoom::state() const
-{
-        return state_;
-}
-
-inline Timeline
-JoinedRoom::timeline() const
-{
-        return timeline_;
-}
-
 class LeftRoom : public Deserializable
 {
 public:
-        inline State state() const;
-        inline Timeline timeline() const;
+        State state() const { return state_; };
+        Timeline timeline() const { return timeline_; };
 
         void deserialize(const QJsonValue &data) override;
 
@@ -191,24 +107,12 @@ private:
         Timeline timeline_;
 };
 
-inline State
-LeftRoom::state() const
-{
-        return state_;
-}
-
-inline Timeline
-LeftRoom::timeline() const
-{
-        return timeline_;
-}
-
 // TODO: Add support for invited and left rooms.
 class Rooms : public Deserializable
 {
 public:
-        inline QMap<QString, JoinedRoom> join() const;
-        inline QMap<QString, LeftRoom> leave() const;
+        QMap<QString, JoinedRoom> join() const { return join_; };
+        QMap<QString, LeftRoom> leave() const { return leave_; };
         void deserialize(const QJsonValue &data) override;
 
 private:
@@ -216,38 +120,14 @@ private:
         QMap<QString, LeftRoom> leave_;
 };
 
-inline QMap<QString, JoinedRoom>
-Rooms::join() const
-{
-        return join_;
-}
-
-inline QMap<QString, LeftRoom>
-Rooms::leave() const
-{
-        return leave_;
-}
-
 class SyncResponse : public Deserializable
 {
 public:
         void deserialize(const QJsonDocument &data) override;
-        inline QString nextBatch() const;
-        inline Rooms rooms() const;
+        QString nextBatch() const { return next_batch_; };
+        Rooms rooms() const { return rooms_; };
 
 private:
         QString next_batch_;
         Rooms rooms_;
 };
-
-inline Rooms
-SyncResponse::rooms() const
-{
-        return rooms_;
-}
-
-inline QString
-SyncResponse::nextBatch() const
-{
-        return next_batch_;
-}
diff --git a/include/TextInputWidget.h b/include/TextInputWidget.h
index 772bdd46..08b62f45 100644
--- a/include/TextInputWidget.h
+++ b/include/TextInputWidget.h
@@ -55,7 +55,7 @@ public slots:
         void onSendButtonClicked();
         void openFileSelection();
         void hideUploadSpinner();
-        inline void focusLineEdit();
+        void focusLineEdit() { input_->setFocus(); };
 
 private slots:
         void addSelectedEmoji(const QString &emoji);
@@ -80,9 +80,3 @@ private:
         FlatButton *sendMessageBtn_;
         EmojiPickButton *emojiBtn_;
 };
-
-inline void
-TextInputWidget::focusLineEdit()
-{
-        input_->setFocus();
-}
diff --git a/include/TimelineItem.h b/include/TimelineItem.h
index 0a0538f9..ef021cfe 100644
--- a/include/TimelineItem.h
+++ b/include/TimelineItem.h
@@ -65,7 +65,7 @@ public:
                      QWidget *parent);
 
         void setUserAvatar(const QImage &pixmap);
-        inline DescInfo descriptionMessage() const;
+        DescInfo descriptionMessage() const { return descriptionMsg_; };
 
         ~TimelineItem();
 
@@ -98,9 +98,3 @@ private:
         QLabel *userName_;
         QLabel *body_;
 };
-
-inline DescInfo
-TimelineItem::descriptionMessage() const
-{
-        return descriptionMsg_;
-}
diff --git a/include/TimelineView.h b/include/TimelineView.h
index f25bc570..55f25687 100644
--- a/include/TimelineView.h
+++ b/include/TimelineView.h
@@ -99,7 +99,7 @@ public slots:
         void addBackwardsEvents(const QString &room_id, const RoomMessages &msgs);
 
         // Whether or not the initial batch has been loaded.
-        bool hasLoaded();
+        bool hasLoaded() { return scroll_layout_->count() > 1 || isTimelineFinished; };
 
 signals:
         void updateLastTimelineMessage(const QString &user, const DescInfo &info);
@@ -120,7 +120,7 @@ private:
                               const QString &userid);
         void removePendingMessage(const QString &eventid, const QString &body);
 
-        inline bool isDuplicate(const QString &event_id);
+        bool isDuplicate(const QString &event_id) { return eventIds_.contains(event_id); };
 
         // Return nullptr if the event couldn't be parsed.
         TimelineItem *parseMessageEvent(const QJsonObject &event, TimelineDirection direction);
@@ -160,15 +160,3 @@ private:
         QList<PendingMessage> pending_msgs_;
         QSharedPointer<MatrixClient> client_;
 };
-
-inline bool
-TimelineView::isDuplicate(const QString &event_id)
-{
-        return eventIds_.contains(event_id);
-}
-
-inline bool
-TimelineView::hasLoaded()
-{
-        return scroll_layout_->count() > 1 || isTimelineFinished;
-}
diff --git a/include/TopRoomBar.h b/include/TopRoomBar.h
index 1b1d148c..eb941b3b 100644
--- a/include/TopRoomBar.h
+++ b/include/TopRoomBar.h
@@ -45,10 +45,10 @@ public:
         TopRoomBar(QWidget *parent = 0);
         ~TopRoomBar();
 
-        inline void updateRoomAvatar(const QImage &avatar_image);
-        inline void updateRoomAvatar(const QIcon &icon);
-        inline void updateRoomName(const QString &name);
-        inline void updateRoomTopic(QString topic);
+        void updateRoomAvatar(const QImage &avatar_image);
+        void updateRoomAvatar(const QIcon &icon);
+        void updateRoomName(const QString &name);
+        void updateRoomTopic(QString topic);
         void updateRoomAvatarFromName(const QString &name);
         void setRoomSettings(QSharedPointer<RoomSettings> settings);
 
@@ -89,31 +89,3 @@ private:
         QString roomName_;
         QString roomTopic_;
 };
-
-inline void
-TopRoomBar::updateRoomAvatar(const QImage &avatar_image)
-{
-        avatar_->setImage(avatar_image);
-        update();
-}
-
-inline void
-TopRoomBar::updateRoomAvatar(const QIcon &icon)
-{
-        avatar_->setIcon(icon);
-        update();
-}
-
-inline void
-TopRoomBar::updateRoomName(const QString &name)
-{
-        roomName_ = name;
-        update();
-}
-
-inline void
-TopRoomBar::updateRoomTopic(QString topic)
-{
-        roomTopic_ = topic;
-        update();
-}
diff --git a/include/events/AliasesEventContent.h b/include/events/AliasesEventContent.h
index 49e51275..7784fad7 100644
--- a/include/events/AliasesEventContent.h
+++ b/include/events/AliasesEventContent.h
@@ -32,16 +32,11 @@ public:
         void deserialize(const QJsonValue &data) override;
         QJsonObject serialize() const override;
 
-        inline QList<QString> aliases() const;
+        QList<QString> aliases() const { return aliases_; };
 
 private:
         QList<QString> aliases_;
 };
 
-inline QList<QString>
-AliasesEventContent::aliases() const
-{
-        return aliases_;
-}
 } // namespace events
 } // namespace matrix
diff --git a/include/events/AvatarEventContent.h b/include/events/AvatarEventContent.h
index 98e2f12d..55284aa4 100644
--- a/include/events/AvatarEventContent.h
+++ b/include/events/AvatarEventContent.h
@@ -36,16 +36,11 @@ public:
         void deserialize(const QJsonValue &data) override;
         QJsonObject serialize() const override;
 
-        inline QUrl url() const;
+        QUrl url() const { return url_; };
 
 private:
         QUrl url_;
 };
 
-inline QUrl
-AvatarEventContent::url() const
-{
-        return url_;
-}
 } // namespace events
 } // namespace matrix
diff --git a/include/events/CanonicalAliasEventContent.h b/include/events/CanonicalAliasEventContent.h
index 9c961d42..6322c001 100644
--- a/include/events/CanonicalAliasEventContent.h
+++ b/include/events/CanonicalAliasEventContent.h
@@ -38,16 +38,11 @@ public:
         void deserialize(const QJsonValue &data) override;
         QJsonObject serialize() const override;
 
-        inline QString alias() const;
+        QString alias() const { return alias_; };
 
 private:
         QString alias_;
 };
 
-inline QString
-CanonicalAliasEventContent::alias() const
-{
-        return alias_;
-}
 } // namespace events
 } // namespace matrix
diff --git a/include/events/CreateEventContent.h b/include/events/CreateEventContent.h
index 8edc4d24..0a47860e 100644
--- a/include/events/CreateEventContent.h
+++ b/include/events/CreateEventContent.h
@@ -36,17 +36,12 @@ public:
         void deserialize(const QJsonValue &data) override;
         QJsonObject serialize() const override;
 
-        inline QString creator() const;
+        QString creator() const { return creator_; };
 
 private:
         // The user_id of the room creator. This is set by the homeserver.
         QString creator_;
 };
 
-inline QString
-CreateEventContent::creator() const
-{
-        return creator_;
-}
 } // namespace events
 } // namespace matrix
diff --git a/include/events/Event.h b/include/events/Event.h
index 43ab4cc6..84c21907 100644
--- a/include/events/Event.h
+++ b/include/events/Event.h
@@ -66,8 +66,8 @@ class Event
   , public Serializable
 {
 public:
-        inline Content content() const;
-        inline EventType eventType() const;
+        Content content() const;
+        EventType eventType() const;
 
         void deserialize(const QJsonValue &data) override;
         QJsonObject serialize() const override;
diff --git a/include/events/HistoryVisibilityEventContent.h b/include/events/HistoryVisibilityEventContent.h
index 94563d55..1c39ae03 100644
--- a/include/events/HistoryVisibilityEventContent.h
+++ b/include/events/HistoryVisibilityEventContent.h
@@ -36,7 +36,7 @@ class HistoryVisibilityEventContent
   , public Serializable
 {
 public:
-        inline HistoryVisibility historyVisibility() const;
+        HistoryVisibility historyVisibility() const { return history_visibility_; };
 
         void deserialize(const QJsonValue &data) override;
         QJsonObject serialize() const override;
@@ -45,10 +45,5 @@ private:
         HistoryVisibility history_visibility_;
 };
 
-inline HistoryVisibility
-HistoryVisibilityEventContent::historyVisibility() const
-{
-        return history_visibility_;
-}
 } // namespace events
 } // namespace matrix
diff --git a/include/events/JoinRulesEventContent.h b/include/events/JoinRulesEventContent.h
index b9b6848d..4ed9e65f 100644
--- a/include/events/JoinRulesEventContent.h
+++ b/include/events/JoinRulesEventContent.h
@@ -51,16 +51,11 @@ public:
         void deserialize(const QJsonValue &data) override;
         QJsonObject serialize() const override;
 
-        inline JoinRule joinRule() const;
+        JoinRule joinRule() const { return join_rule_; };
 
 private:
         JoinRule join_rule_;
 };
 
-inline JoinRule
-JoinRulesEventContent::joinRule() const
-{
-        return join_rule_;
-}
 } // namespace events
 } // namespace matrix
diff --git a/include/events/MemberEventContent.h b/include/events/MemberEventContent.h
index 1dd703a0..8b7b1576 100644
--- a/include/events/MemberEventContent.h
+++ b/include/events/MemberEventContent.h
@@ -54,9 +54,9 @@ public:
         void deserialize(const QJsonValue &data) override;
         QJsonObject serialize() const override;
 
-        inline QUrl avatarUrl() const;
-        inline QString displayName() const;
-        inline Membership membershipState() const;
+        QUrl avatarUrl() const { return avatar_url_; };
+        QString displayName() const { return display_name_; };
+        Membership membershipState() const { return membership_state_; };
 
 private:
         QUrl avatar_url_;
@@ -64,22 +64,5 @@ private:
         Membership membership_state_;
 };
 
-inline QUrl
-MemberEventContent::avatarUrl() const
-{
-        return avatar_url_;
-}
-
-inline QString
-MemberEventContent::displayName() const
-{
-        return display_name_;
-}
-
-inline Membership
-MemberEventContent::membershipState() const
-{
-        return membership_state_;
-}
 } // namespace events
 } // namespace matrix
diff --git a/include/events/MessageEvent.h b/include/events/MessageEvent.h
index 7e7493e7..3c4f83e9 100644
--- a/include/events/MessageEvent.h
+++ b/include/events/MessageEvent.h
@@ -26,7 +26,7 @@ template<class MsgContent>
 class MessageEvent : public RoomEvent<MessageEventContent>
 {
 public:
-        inline MsgContent msgContent() const;
+        MsgContent msgContent() const;
 
         void deserialize(const QJsonValue &data) override;
 
diff --git a/include/events/MessageEventContent.h b/include/events/MessageEventContent.h
index c096f155..aa08c066 100644
--- a/include/events/MessageEventContent.h
+++ b/include/events/MessageEventContent.h
@@ -64,16 +64,11 @@ public:
         void deserialize(const QJsonValue &data) override;
         QJsonObject serialize() const override;
 
-        inline QString body() const;
+        QString body() const { return body_; };
 
 private:
         QString body_;
 };
 
-inline QString
-MessageEventContent::body() const
-{
-        return body_;
-}
 } // namespace events
 } // namespace matrix
diff --git a/include/events/NameEventContent.h b/include/events/NameEventContent.h
index 413c28cb..378f689d 100644
--- a/include/events/NameEventContent.h
+++ b/include/events/NameEventContent.h
@@ -35,16 +35,11 @@ public:
         void deserialize(const QJsonValue &data) override;
         QJsonObject serialize() const override;
 
-        inline QString name() const;
+        QString name() const { return name_; };
 
 private:
         QString name_;
 };
 
-inline QString
-NameEventContent::name() const
-{
-        return name_;
-}
 } // namespace events
 } // namespace matrix
diff --git a/include/events/PowerLevelsEventContent.h b/include/events/PowerLevelsEventContent.h
index 04afa473..63998871 100644
--- a/include/events/PowerLevelsEventContent.h
+++ b/include/events/PowerLevelsEventContent.h
@@ -43,14 +43,14 @@ public:
         void deserialize(const QJsonValue &data) override;
         QJsonObject serialize() const override;
 
-        inline int banLevel() const;
-        inline int inviteLevel() const;
-        inline int kickLevel() const;
-        inline int redactLevel() const;
+        int banLevel() const { return ban_; };
+        int inviteLevel() const { return invite_; };
+        int kickLevel() const { return kick_; };
+        int redactLevel() const { return redact_; };
 
-        inline int eventsDefaultLevel() const;
-        inline int stateDefaultLevel() const;
-        inline int usersDefaultLevel() const;
+        int eventsDefaultLevel() const { return events_default_; };
+        int stateDefaultLevel() const { return state_default_; };
+        int usersDefaultLevel() const { return users_default_; };
 
         int eventLevel(QString event_type) const;
         int userLevel(QString user_id) const;
@@ -69,46 +69,5 @@ private:
         QMap<QString, int> users_;
 };
 
-inline int
-PowerLevelsEventContent::banLevel() const
-{
-        return ban_;
-}
-
-inline int
-PowerLevelsEventContent::inviteLevel() const
-{
-        return invite_;
-}
-
-inline int
-PowerLevelsEventContent::kickLevel() const
-{
-        return kick_;
-}
-
-inline int
-PowerLevelsEventContent::redactLevel() const
-{
-        return redact_;
-}
-
-inline int
-PowerLevelsEventContent::eventsDefaultLevel() const
-{
-        return events_default_;
-}
-
-inline int
-PowerLevelsEventContent::stateDefaultLevel() const
-{
-        return state_default_;
-}
-
-inline int
-PowerLevelsEventContent::usersDefaultLevel() const
-{
-        return users_default_;
-}
 } // namespace events
 } // namespace matrix
diff --git a/include/events/RoomEvent.h b/include/events/RoomEvent.h
index a1e88807..d80951c7 100644
--- a/include/events/RoomEvent.h
+++ b/include/events/RoomEvent.h
@@ -28,10 +28,10 @@ template<class Content>
 class RoomEvent : public Event<Content>
 {
 public:
-        inline QString eventId() const;
-        inline QString roomId() const;
-        inline QString sender() const;
-        inline uint64_t timestamp() const;
+        QString eventId() const;
+        QString roomId() const;
+        QString sender() const;
+        uint64_t timestamp() const;
 
         void deserialize(const QJsonValue &data) override;
         QJsonObject serialize() const override;
diff --git a/include/events/StateEvent.h b/include/events/StateEvent.h
index 146e96bd..19342a48 100644
--- a/include/events/StateEvent.h
+++ b/include/events/StateEvent.h
@@ -27,8 +27,8 @@ template<class Content>
 class StateEvent : public RoomEvent<Content>
 {
 public:
-        inline QString stateKey() const;
-        inline Content previousContent() const;
+        QString stateKey() const;
+        Content previousContent() const;
 
         void deserialize(const QJsonValue &data);
         QJsonObject serialize() const;
diff --git a/include/events/TopicEventContent.h b/include/events/TopicEventContent.h
index d059e489..67e21208 100644
--- a/include/events/TopicEventContent.h
+++ b/include/events/TopicEventContent.h
@@ -36,16 +36,11 @@ public:
         void deserialize(const QJsonValue &data) override;
         QJsonObject serialize() const override;
 
-        inline QString topic() const;
+        QString topic() const { return topic_; };
 
 private:
         QString topic_;
 };
 
-inline QString
-TopicEventContent::topic() const
-{
-        return topic_;
-}
 } // namespace events
 } // namespace matrix
diff --git a/include/events/messages/Audio.h b/include/events/messages/Audio.h
index 8abdf7f2..8466e0e4 100644
--- a/include/events/messages/Audio.h
+++ b/include/events/messages/Audio.h
@@ -35,8 +35,8 @@ struct AudioInfo
 class Audio : public Deserializable
 {
 public:
-        inline QString url() const;
-        inline AudioInfo info() const;
+        QString url() const { return url_; };
+        AudioInfo info() const { return info_; };
 
         void deserialize(const QJsonObject &object) override;
 
@@ -45,18 +45,6 @@ private:
         AudioInfo info_;
 };
 
-inline QString
-Audio::url() const
-{
-        return url_;
-}
-
-inline AudioInfo
-Audio::info() const
-{
-        return info_;
-}
-
 } // namespace messages
 } // namespace events
 } // namespace matrix
diff --git a/include/events/messages/File.h b/include/events/messages/File.h
index ff5eb0a6..2fb2aa83 100644
--- a/include/events/messages/File.h
+++ b/include/events/messages/File.h
@@ -37,10 +37,9 @@ struct FileInfo
 class File : public Deserializable
 {
 public:
-        inline QString url() const;
-        inline QString filename() const;
-
-        inline FileInfo info() const;
+        QString url() const { return url_; };
+        QString filename() const { return filename_; };
+        FileInfo info() const { return info_; };
 
         void deserialize(const QJsonObject &object) override;
 
@@ -51,24 +50,6 @@ private:
         FileInfo info_;
 };
 
-inline QString
-File::filename() const
-{
-        return filename_;
-}
-
-inline QString
-File::url() const
-{
-        return url_;
-}
-
-inline FileInfo
-File::info() const
-{
-        return info_;
-}
-
 } // namespace messages
 } // namespace events
 } // namespace matrix
diff --git a/include/events/messages/Image.h b/include/events/messages/Image.h
index 14889ff1..1e709579 100644
--- a/include/events/messages/Image.h
+++ b/include/events/messages/Image.h
@@ -39,8 +39,8 @@ struct ImageInfo
 class Image : public Deserializable
 {
 public:
-        inline QString url() const;
-        inline ImageInfo info() const;
+        QString url() const { return url_; };
+        ImageInfo info() const { return info_; };
 
         void deserialize(const QJsonObject &object) override;
 
@@ -49,18 +49,6 @@ private:
         ImageInfo info_;
 };
 
-inline QString
-Image::url() const
-{
-        return url_;
-}
-
-inline ImageInfo
-Image::info() const
-{
-        return info_;
-}
-
 } // namespace messages
 } // namespace events
 } // namespace matrix
diff --git a/include/events/messages/Location.h b/include/events/messages/Location.h
index e51c6799..27722b37 100644
--- a/include/events/messages/Location.h
+++ b/include/events/messages/Location.h
@@ -34,8 +34,8 @@ struct LocationInfo
 class Location : public Deserializable
 {
 public:
-        inline QString geoUri() const;
-        inline LocationInfo info() const;
+        QString geoUri() const { return geo_uri_; };
+        LocationInfo info() const { return info_; };
 
         void deserialize(const QJsonObject &object) override;
 
@@ -45,18 +45,6 @@ private:
         LocationInfo info_;
 };
 
-inline QString
-Location::geoUri() const
-{
-        return geo_uri_;
-}
-
-inline LocationInfo
-Location::info() const
-{
-        return info_;
-}
-
 } // namespace messages
 } // namespace events
 } // namespace matrix
diff --git a/include/events/messages/Video.h b/include/events/messages/Video.h
index d167b8c1..79713546 100644
--- a/include/events/messages/Video.h
+++ b/include/events/messages/Video.h
@@ -40,8 +40,8 @@ struct VideoInfo
 class Video : public Deserializable
 {
 public:
-        inline QString url() const;
-        inline VideoInfo info() const;
+        QString url() const { return url_; };
+        VideoInfo info() const { return info_; };
 
         void deserialize(const QJsonObject &object) override;
 
@@ -50,18 +50,6 @@ private:
         VideoInfo info_;
 };
 
-inline QString
-Video::url() const
-{
-        return url_;
-}
-
-inline VideoInfo
-Video::info() const
-{
-        return info_;
-}
-
 } // namespace messages
 } // namespace events
 } // namespace matrix