From e0a879ef17e3363f64ff51b438eae4c7a2267dc8 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 31 Oct 2016 18:30:31 +0900 Subject: Code cleanup upon inspection in CLion These changes are most harmless; a no more used Private class removed, and an incorrect signal specification in connect() fixed. Also, one explicit #include has been added, just in case. --- connection.cpp | 2 +- connection.h | 1 + jobs/postreceiptjob.cpp | 17 ++--------------- jobs/postreceiptjob.h | 5 ----- 4 files changed, 4 insertions(+), 21 deletions(-) diff --git a/connection.cpp b/connection.cpp index e0274fd7..0f115e3a 100644 --- a/connection.cpp +++ b/connection.cpp @@ -211,7 +211,7 @@ PostReceiptJob* Connection::postReceipt(Room* room, Event* event) void Connection::joinRoom(QString roomAlias) { JoinRoomJob* job = new JoinRoomJob(d->data, roomAlias); - connect( job, &SyncJob::success, [=] () { + connect( job, &BaseJob::success, [=] () { if ( Room* r = provideRoom(job->roomId()) ) emit joinedRoom(r); }); diff --git a/connection.h b/connection.h index c5dad246..27c8fde1 100644 --- a/connection.h +++ b/connection.h @@ -21,6 +21,7 @@ #include #include +#include namespace QMatrixClient { diff --git a/jobs/postreceiptjob.cpp b/jobs/postreceiptjob.cpp index d0c82b4f..1eaefc2a 100644 --- a/jobs/postreceiptjob.cpp +++ b/jobs/postreceiptjob.cpp @@ -24,23 +24,10 @@ using namespace QMatrixClient; -class PostReceiptJob::Private -{ - public: - Private() {} - - QString roomId; - QString eventId; -}; - PostReceiptJob::PostReceiptJob(ConnectionData* connection, QString roomId, QString eventId) : BaseJob(connection, JobHttpType::PostJob, "PostReceiptJob", QString("/_matrix/client/r0/rooms/%1/receipt/m.read/%2").arg(roomId, eventId)) - , d(new Private) -{ -} +{ } PostReceiptJob::~PostReceiptJob() -{ - delete d; -} +{ } diff --git a/jobs/postreceiptjob.h b/jobs/postreceiptjob.h index 4e047b3a..dfdd1fac 100644 --- a/jobs/postreceiptjob.h +++ b/jobs/postreceiptjob.h @@ -23,16 +23,11 @@ namespace QMatrixClient { - class Room; class PostReceiptJob: public BaseJob { public: PostReceiptJob(ConnectionData* connection, QString roomId, QString eventId); virtual ~PostReceiptJob(); - - private: - class Private; - Private* d; }; } -- cgit v1.2.3