From 24d73dc77ca54654a8fe934c63dde5ae7faec1dd Mon Sep 17 00:00:00 2001 From: murata Date: Sun, 11 Aug 2019 17:16:49 +0900 Subject: [PATCH] QtLocationPlugin: Change NULL or 0 to nullptr --- src/QtLocationPlugin/QGCMapTileSet.cpp | 4 ++-- src/QtLocationPlugin/QGCMapUrlEngine.cpp | 8 ++++---- src/QtLocationPlugin/QGCTileCacheWorker.cpp | 4 ++-- src/QtLocationPlugin/QGeoServiceProviderPluginQGC.cpp | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/QtLocationPlugin/QGCMapTileSet.cpp b/src/QtLocationPlugin/QGCMapTileSet.cpp index d9d0145cf..e9c452092 100644 --- a/src/QtLocationPlugin/QGCMapTileSet.cpp +++ b/src/QtLocationPlugin/QGCMapTileSet.cpp @@ -48,11 +48,11 @@ QGCCachedTileSet::QGCCachedTileSet(const QString& name) , _downloading(false) , _id(0) , _type(UrlFactory::Invalid) - , _networkManager(NULL) + , _networkManager(nullptr) , _errorCount(0) , _noMoreTiles(false) , _batchRequested(false) - , _manager(NULL) + , _manager(nullptr) , _selected(false) { diff --git a/src/QtLocationPlugin/QGCMapUrlEngine.cpp b/src/QtLocationPlugin/QGCMapUrlEngine.cpp index 4f8437eaa..b04cc0f51 100644 --- a/src/QtLocationPlugin/QGCMapUrlEngine.cpp +++ b/src/QtLocationPlugin/QGCMapUrlEngine.cpp @@ -42,7 +42,7 @@ UrlFactory::UrlFactory() : _timeout(5 * 1000) #ifndef QGC_NO_GOOGLE_MAPS , _googleVersionRetrieved(false) - , _googleReply(NULL) + , _googleReply(nullptr) #endif { QStringList langs = QLocale::system().uiLanguages(); @@ -512,7 +512,7 @@ UrlFactory::_networkReplyError(QNetworkReply::NetworkError error) if(_googleReply) { _googleReply->deleteLater(); - _googleReply = NULL; + _googleReply = nullptr; } } #endif @@ -521,7 +521,7 @@ UrlFactory::_networkReplyError(QNetworkReply::NetworkError error) void UrlFactory::_replyDestroyed() { - _googleReply = NULL; + _googleReply = nullptr; } #endif @@ -563,7 +563,7 @@ UrlFactory::_googleVersionCompleted() _versionGoogleTerrain = QString("t@%1,r@%2").arg(gc[1]).arg(gc[2]); } _googleReply->deleteLater(); - _googleReply = NULL; + _googleReply = nullptr; } #endif diff --git a/src/QtLocationPlugin/QGCTileCacheWorker.cpp b/src/QtLocationPlugin/QGCTileCacheWorker.cpp index 3df209644..307ce051b 100644 --- a/src/QtLocationPlugin/QGCTileCacheWorker.cpp +++ b/src/QtLocationPlugin/QGCTileCacheWorker.cpp @@ -675,7 +675,7 @@ QGCCacheWorker::_importSets(QGCMapTask* mtask) //-- Close and delete old database if(_db) { delete _db; - _db = NULL; + _db = nullptr; QSqlDatabase::removeDatabase(kSession); } QFile file(_databasePath); @@ -989,7 +989,7 @@ QGCCacheWorker::_init() _failed = true; } delete _db; - _db = NULL; + _db = nullptr; QSqlDatabase::removeDatabase(kSession); } else { qCritical() << "Could not find suitable cache directory."; diff --git a/src/QtLocationPlugin/QGeoServiceProviderPluginQGC.cpp b/src/QtLocationPlugin/QGeoServiceProviderPluginQGC.cpp index 49438e145..e62779e4b 100644 --- a/src/QtLocationPlugin/QGeoServiceProviderPluginQGC.cpp +++ b/src/QtLocationPlugin/QGeoServiceProviderPluginQGC.cpp @@ -82,7 +82,7 @@ QGeoServiceProviderFactoryQGC::createRoutingManagerEngine( const QVariantMap &, QGeoServiceProvider::Error *, QString *) const { // Not implemented for QGC - return NULL; + return nullptr; } //----------------------------------------------------------------------------- @@ -91,5 +91,5 @@ QGeoServiceProviderFactoryQGC::createPlaceManagerEngine( const QVariantMap &, QGeoServiceProvider::Error *, QString *) const { // Not implemented for QGC - return NULL; + return nullptr; } -- 2.22.0