20 #include <QAbstractNetworkCache>
23 QCache<QUrl, QImage> QgsTileCache::sTileCache( 256 );
24 QMutex QgsTileCache::sTileCacheMutex;
29 QMutexLocker locker( &sTileCacheMutex );
30 sTileCache.insert( url,
new QImage( image ) );
35 QMutexLocker locker( &sTileCacheMutex );
37 if ( QImage *i = sTileCache.object( url ) )
46 QByteArray imageData = data->readAll();
49 image = QImage::fromData( imageData );
53 if ( ! image.isNull( ) )
55 sTileCache.insert( url,
new QImage( image ) );