Refactor code to use C++11 nullptr

This commit is contained in:
padertux
2018-01-08 22:58:42 +01:00
committed by padertux
parent dc8cbed1eb
commit 4f26eb686e
201 changed files with 634 additions and 634 deletions

View File

@@ -33,7 +33,7 @@ ContextEngine * ContextEngine::create(QObject *parent)
ContextEngine::ContextEngine(QObject *p)
: QObject(p)
, job(0)
, job(nullptr)
{
}
@@ -62,7 +62,7 @@ void ContextEngine::cancel()
{
if (job) {
job->cancelAndDelete();
job=0;
job=nullptr;
}
}
@@ -70,13 +70,13 @@ NetworkJob * ContextEngine::getReply(QObject *obj)
{
NetworkJob *reply = qobject_cast<NetworkJob*>(obj);
if (!reply) {
return 0;
return nullptr;
}
reply->deleteLater();
if (reply!=job) {
return 0;
return nullptr;
}
job=0;
job=nullptr;
return reply;
}