comparison framework/VersionTester.cpp @ 636:e2715204feaa fix-static-analysis

Use nullptr throughout
author Chris Cannam
date Mon, 26 Nov 2018 14:34:06 +0000
parents b23bebfdfaba
children beefce638f91
comparison
equal deleted inserted replaced
635:26a0cb8335e3 636:e2715204feaa
27 27
28 28
29 VersionTester::VersionTester(QString hostname, QString versionFilePath, 29 VersionTester::VersionTester(QString hostname, QString versionFilePath,
30 QString myVersion) : 30 QString myVersion) :
31 m_myVersion(myVersion), 31 m_myVersion(myVersion),
32 m_reply(0), 32 m_reply(nullptr),
33 m_httpFailed(false), 33 m_httpFailed(false),
34 m_nm(new QNetworkAccessManager) 34 m_nm(new QNetworkAccessManager)
35 { 35 {
36 QUrl url(QString("http://%1/%2").arg(hostname).arg(versionFilePath)); 36 QUrl url(QString("http://%1/%2").arg(hostname).arg(versionFilePath));
37 cerr << "VersionTester: URL is " << url << endl; 37 cerr << "VersionTester: URL is " << url << endl;
88 88
89 void 89 void
90 VersionTester::finished() 90 VersionTester::finished()
91 { 91 {
92 QNetworkReply *r = m_reply; 92 QNetworkReply *r = m_reply;
93 m_reply = 0; 93 m_reply = nullptr;
94 94
95 r->deleteLater(); 95 r->deleteLater();
96 if (m_httpFailed) return; 96 if (m_httpFailed) return;
97 97
98 int status = r->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); 98 int status = r->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();