From 5e6a0b961d1fc2162c5a7498f10bbd1a477f1ece Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 27 May 2016 16:51:13 +0900 Subject: Use nullptr --- connection.cpp | 2 +- connection.h | 2 +- connectionprivate.cpp | 2 +- events/roommessageevent.cpp | 2 +- jobs/basejob.cpp | 2 +- state.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/connection.cpp b/connection.cpp index 69121930..8d916280 100644 --- a/connection.cpp +++ b/connection.cpp @@ -177,7 +177,7 @@ User* Connection::user(QString userId) User *Connection::user() { if( d->userId.isEmpty() ) - return 0; + return nullptr; return user(d->userId); } diff --git a/connection.h b/connection.h index 9f3d23f3..452db198 100644 --- a/connection.h +++ b/connection.h @@ -37,7 +37,7 @@ namespace QMatrixClient class Connection: public QObject { Q_OBJECT public: - Connection(QUrl server, QObject* parent=0); + Connection(QUrl server, QObject* parent = nullptr); Connection(); virtual ~Connection(); diff --git a/connectionprivate.cpp b/connectionprivate.cpp index bcca8744..62840473 100644 --- a/connectionprivate.cpp +++ b/connectionprivate.cpp @@ -39,7 +39,7 @@ ConnectionPrivate::ConnectionPrivate(Connection* parent) : q(parent) { isConnected = false; - data = 0; + data = nullptr; } ConnectionPrivate::~ConnectionPrivate() diff --git a/events/roommessageevent.cpp b/events/roommessageevent.cpp index 99d17e5c..b7459054 100644 --- a/events/roommessageevent.cpp +++ b/events/roommessageevent.cpp @@ -39,7 +39,7 @@ RoomMessageEvent::RoomMessageEvent() : Event(EventType::RoomMessage) , d(new Private) { - d->content = 0; + d->content = nullptr; } RoomMessageEvent::~RoomMessageEvent() diff --git a/jobs/basejob.cpp b/jobs/basejob.cpp index cfdf8a28..074a2629 100644 --- a/jobs/basejob.cpp +++ b/jobs/basejob.cpp @@ -31,7 +31,7 @@ class BaseJob::Private { public: Private(ConnectionData* c, JobHttpType t, bool nt) - : connection(c), reply(0), type(t), needsToken(nt) {} + : connection(c), reply(nullptr), type(t), needsToken(nt) {} ConnectionData* connection; QNetworkReply* reply; diff --git a/state.cpp b/state.cpp index ed57bea4..59a3b007 100644 --- a/state.cpp +++ b/state.cpp @@ -61,7 +61,7 @@ State* State::fromJson(const QJsonObject& obj) { Event* event = Event::fromJson(obj); if( !event ) - return 0; + return nullptr; State* state = new State(event); state->d->stateKey = obj.value("state_key").toString(); state->d->replacesState = obj.value("replaces_state").toString(); -- cgit v1.2.3