Fix compilation for Qt5: Avoid deprecated API
authoraavit <eirik.aavitsland@digia.com>
Wed, 26 Sep 2012 10:42:39 +0000 (12:42 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 26 Sep 2012 16:52:14 +0000 (18:52 +0200)
Change-Id: Iba11d33dd4d81ed1a460dd3237cd1bb9e1ace106
Reviewed-by: Jason Barron <jason.barron@digia.com>
examples/embedded/lightmaps/slippymap.cpp

index 9acbd9e..f97896d 100644 (file)
@@ -90,8 +90,7 @@ SlippyMap::SlippyMap(QObject *parent)
     m_emptyTile.fill(Qt::lightGray);
 
     QNetworkDiskCache *cache = new QNetworkDiskCache;
-    cache->setCacheDirectory(QDesktopServices::storageLocation
-                                (QDesktopServices::CacheLocation));
+    cache->setCacheDirectory(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
     m_manager.setCache(cache);
     connect(&m_manager, SIGNAL(finished(QNetworkReply*)),
             this, SLOT(handleNetworkData(QNetworkReply*)));