From 78cfe3c102b686c71a1da5cbe91a2ae42dc03825 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 18 Nov 2016 14:20:53 +0900 Subject: Cleanup --- connectiondata.cpp | 8 +------- connectiondata.h | 1 - jobs/basejob.h | 4 ++-- room.cpp | 3 ++- room.h | 2 +- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/connectiondata.cpp b/connectiondata.cpp index 72e8f3d8..32fcf184 100644 --- a/connectiondata.cpp +++ b/connectiondata.cpp @@ -25,10 +25,9 @@ using namespace QMatrixClient; class ConnectionData::Private { public: - Private() {/*isConnected=false;*/} + Private() : nam(nullptr) { } QUrl baseUrl; - //bool isConnected; QString accessToken; QString lastEvent; QNetworkAccessManager* nam; @@ -47,11 +46,6 @@ ConnectionData::~ConnectionData() delete d; } -// bool ConnectionData::isConnected() const -// { -// return d->isConnected; -// } - QString ConnectionData::accessToken() const { return d->accessToken; diff --git a/connectiondata.h b/connectiondata.h index 89e30e4d..0eadab80 100644 --- a/connectiondata.h +++ b/connectiondata.h @@ -30,7 +30,6 @@ namespace QMatrixClient ConnectionData(QUrl baseUrl); virtual ~ConnectionData(); - //bool isConnected() const; QString accessToken() const; QUrl baseUrl() const; diff --git a/jobs/basejob.h b/jobs/basejob.h index 55267def..ba6c4a62 100644 --- a/jobs/basejob.h +++ b/jobs/basejob.h @@ -58,7 +58,7 @@ namespace QMatrixClient public: using QUrlQuery::QUrlQuery; Query() = default; - Query(const QList< QPair >& l) + explicit Query(const QList< QPair >& l) { setQueryItems(l); } @@ -73,7 +73,7 @@ namespace QMatrixClient { public: Data() = default; - Data(const QList< QPair >& l) + explicit Data(const QList< QPair >& l) { for (auto i: l) insert(i.first, i.second); diff --git a/room.cpp b/room.cpp index 2d32c430..325e81bc 100644 --- a/room.cpp +++ b/room.cpp @@ -48,7 +48,8 @@ class Room::Private Private(Connection* c, const QString& id_) : q(nullptr), connection(c), id(id_), joinState(JoinState::Join) - , unreadMessages(false), roomMessagesJob(nullptr) + , unreadMessages(false), highlightCount(0), notificationCount(0) + , roomMessagesJob(nullptr) { } Room* q; diff --git a/room.h b/room.h index 7cfd4c00..afa6f0ef 100644 --- a/room.h +++ b/room.h @@ -146,7 +146,7 @@ namespace QMatrixClient class MemberSorter { public: - MemberSorter(const Room* r) : room(r) { } + explicit MemberSorter(const Room* r) : room(r) { } bool operator()(User* u1, User* u2) const; -- cgit v1.2.3