[Marble-commits] KDE/kdeedu/marble/src/lib/geodata/scene
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Tue Jul 27 12:35:45 CEST 2010
SVN commit 1155434 by beschow:
const'ify GeoSceneTexture::downloadUrl()
Even though this method changes the internal state, it may be const because the compiler is forced to invoke this method for different TileIds.
M +3 -1 GeoSceneTexture.cpp
M +8 -5 GeoSceneTexture.h
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneTexture.cpp #1155433:1155434
@@ -142,7 +142,9 @@
m_projection = projection;
}
-QUrl GeoSceneTexture::downloadUrl( const TileId &id )
+// Even though this method changes the internal state, it may be const
+// because the compiler is forced to invoke this method for different TileIds.
+QUrl GeoSceneTexture::downloadUrl( const TileId &id ) const
{
// default download url
if ( m_downloadUrls.empty() )
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneTexture.h #1155433:1155434
@@ -81,10 +81,13 @@
Blending const * blending() const;
void setBlending( Blending const * const );
- // this method is a little more than just a stupid getter,
- // it implements the round robin for the tile servers.
- // on each invocation the next url is returned
- QUrl downloadUrl( const TileId & );
+ /**
+ * Creates a download URL for the given tile id.
+ *
+ * It implements the round robin for the tile servers.
+ * On each invocation the next url is returned.
+ */
+ QUrl downloadUrl( const TileId & ) const;
void addDownloadUrl( const QUrl & );
QString relativeTileFileName( const TileId & ) const;
@@ -115,7 +118,7 @@
QVector<QUrl> m_downloadUrls;
/// Points to next Url for the round robin algorithm
- QVector<QUrl>::const_iterator m_nextUrl;
+ mutable QVector<QUrl>::const_iterator m_nextUrl;
QList<DownloadPolicy *> m_downloadPolicies;
};
More information about the Marble-commits
mailing list