aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectiondata.cpp8
-rw-r--r--connectiondata.h1
-rw-r--r--jobs/basejob.h4
-rw-r--r--room.cpp3
-rw-r--r--room.h2
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<QString, QString> >& l)
+ explicit Query(const QList< QPair<QString, QString> >& l)
{
setQueryItems(l);
}
@@ -73,7 +73,7 @@ namespace QMatrixClient
{
public:
Data() = default;
- Data(const QList< QPair<QString, QString> >& l)
+ explicit Data(const QList< QPair<QString, QString> >& 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;