[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/marble/src/lib
From:       Laurent Montel <montel () kde ! org>
Date:       2008-11-21 8:26:53
Message-ID: 1227256013.484146.14876.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 887127 by mlaurent:

Fix some iterator


 M  +4 -4      GeoPolygon.cpp  
 M  +2 -2      GridMap.cpp  
 M  +2 -2      HttpDownloadManager.cpp  
 M  +2 -2      MarbleLegendBrowser.cpp  
 M  +1 -1      MarblePlacemarkModel.cpp  
 M  +1 -1      PluginManager.cpp  
 M  +6 -6      VectorMap.cpp  
 M  +2 -2      geodata/scene/GeoSceneLayer.cpp  
 M  +2 -2      geodata/scene/GeoSceneLegend.cpp  
 M  +2 -2      geodata/scene/GeoSceneSection.cpp  
 M  +3 -3      gps/Track.cpp  
 M  +1 -1      gps/WaypointContainer.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/GeoPolygon.cpp #887126:887127
@@ -252,13 +252,13 @@
     qreal  lastLon = 0.0;
     qreal  lat     = 0.0;
 
-    GeoPolygon::PtrVector::Iterator       itPolyLine;
+    GeoPolygon::PtrVector::ConstIterator       itPolyLine;
     GeoPolygon::PtrVector::ConstIterator  itEndPolyLine = constEnd();
     GeoDataCoordinates::Vector::ConstIterator   itPoint;
 
     // Now we calculate the boundaries
 	
-    for ( itPolyLine = begin(); itPolyLine != itEndPolyLine; ++itPolyLine ) {
+    for ( itPolyLine = constBegin(); itPolyLine != itEndPolyLine; ++itPolyLine ) {
 		
         qreal  lonLeft       =  +M_PI;
         qreal  lonRight      =  -M_PI;
@@ -273,7 +273,7 @@
 
         GeoDataCoordinates::Vector::ConstIterator  itEndPoint = (*itPolyLine)->constEnd();
 					
-        for ( itPoint = (*itPolyLine)->begin();
+        for ( itPoint = (*itPolyLine)->constBegin();
                 itPoint != itEndPoint;
                 ++itPoint )
         {
@@ -281,7 +281,7 @@
 
             int currentSign = ( lon > 0.0 ) ? 1 : -1 ;
 
-            if( itPoint == (*itPolyLine)->begin() ) {
+            if( itPoint == (*itPolyLine)->constBegin() ) {
                 lastSign = currentSign;
                 lastLon  = lon;
             }
--- trunk/KDE/kdeedu/marble/src/lib/GridMap.cpp #887126:887127
@@ -356,8 +356,8 @@
 
     painter->setPen(m_pen);
 
-    ScreenPolygon::Vector::const_iterator  itEndPolygon = end();
-    for ( ScreenPolygon::Vector::const_iterator itPolygon=begin(); 
+    ScreenPolygon::Vector::const_iterator  itEndPolygon = constEnd();
+    for ( ScreenPolygon::Vector::const_iterator itPolygon=constBegin(); 
           itPolygon != itEndPolygon;
           ++itPolygon )
     {
--- trunk/KDE/kdeedu/marble/src/lib/HttpDownloadManager.cpp #887126:887127
@@ -42,8 +42,8 @@
 
     // activated jobs have to be deleted using deleteLater()
     // because they may be connected to signals
-    QList<HttpJob*>::const_iterator pos = m_activatedJobList.begin();
-    QList<HttpJob*>::const_iterator const end = m_activatedJobList.end();
+    QList<HttpJob*>::const_iterator pos = m_activatedJobList.constBegin();
+    QList<HttpJob*>::const_iterator const end = m_activatedJobList.constEnd();
     for (; pos != end; ++pos ) {
         (*pos)->deleteLater();
     }
--- trunk/KDE/kdeedu/marble/src/lib/MarbleLegendBrowser.cpp #887126:887127
@@ -104,8 +104,8 @@
 
         d->m_checkBoxMap.clear();
 
-        QVector<GeoSceneProperty*>::const_iterator it = allProperties.begin();
-        for (it = allProperties.begin(); it != allProperties.end(); ++it) {
+        QVector<GeoSceneProperty*>::const_iterator it = allProperties.constBegin();
+        for (; it != allProperties.constEnd(); ++it) {
             if ( (*it)->available() == true ) {
                 d->m_checkBoxMap[ (*it)->name() ] = (*it)->value();
             }
--- trunk/KDE/kdeedu/marble/src/lib/MarblePlacemarkModel.cpp #887126:887127
@@ -235,7 +235,7 @@
 {
 
     QVector<GeoDataPlacemark*>::Iterator i;
-    for ( i = container.begin(); i != container.constEnd(); ++i ) {
+    for ( i = container.begin(); i != container.end(); ++i ) {
         GeoDataPlacemark* placemark = *i;
 
         bool hasPopularity = false;
--- trunk/KDE/kdeedu/marble/src/lib/PluginManager.cpp #887126:887127
@@ -55,7 +55,7 @@
     QList<MarbleAbstractFloatItem *> floatItemList;
 
     QList<MarbleRenderPlugin *>::const_iterator i;
-    for (i = d->m_renderPlugins.begin(); i != d->m_renderPlugins.end(); ++i)
+    for (i = d->m_renderPlugins.constBegin(); i != d->m_renderPlugins.constEnd(); ++i)
     {
         MarbleAbstractFloatItem *floatItem = qobject_cast<MarbleAbstractFloatItem *>(*i);
         if ( floatItem )
--- trunk/KDE/kdeedu/marble/src/lib/VectorMap.cpp #887126:887127
@@ -170,7 +170,7 @@
     QRectF         visibleArea ( 0, 0, m_imgwidth, m_imgheight );
     const int      detail = getDetailLevel( radius );
 
-    for ( itPolyLine = pntmap->begin();
+    for ( itPolyLine = pntmap->constBegin();
           itPolyLine != itEndPolyLine;
           ++itPolyLine )
     {
@@ -264,7 +264,7 @@
     QRectF         visibleArea ( 0, 0, m_imgwidth, m_imgheight );
     const int      detail = getDetailLevel( radius );
 
-    for ( itPolyLine = pntmap->begin();
+    for ( itPolyLine = pntmap->constBegin();
           itPolyLine != itEndPolyLine;
           ++itPolyLine )
     {
@@ -702,8 +702,8 @@
     painter.setPen( m_pen );
     painter.setBrush( m_brush );
 
-    ScreenPolygon::Vector::const_iterator  itEndPolygon = end();
-    for ( ScreenPolygon::Vector::const_iterator itPolygon = begin();
+    ScreenPolygon::Vector::const_iterator  itEndPolygon = constEnd();
+    for ( ScreenPolygon::Vector::const_iterator itPolygon = constBegin();
           itPolygon != itEndPolygon; 
           ++itPolygon )
     {
@@ -724,9 +724,9 @@
     painter->setPen( m_pen );
     painter->setBrush( m_brush );
 
-    ScreenPolygon::Vector::const_iterator  itEndPolygon = end();
+    ScreenPolygon::Vector::const_iterator  itEndPolygon = constEnd();
 
-    for ( ScreenPolygon::Vector::const_iterator itPolygon = begin();
+    for ( ScreenPolygon::Vector::const_iterator itPolygon = constBegin();
           itPolygon != itEndPolygon;
           ++itPolygon )
     {
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneLayer.cpp #887126:887127
@@ -98,8 +98,8 @@
 {
     GeoSceneAbstractDataset* dataset = 0;
 
-    QVector<GeoSceneAbstractDataset*>::const_iterator it = m_datasets.begin();
-    for (it = m_datasets.begin(); it != m_datasets.end(); ++it) {
+    QVector<GeoSceneAbstractDataset*>::const_iterator it = m_datasets.constBegin();
+    for (; it != m_datasets.constEnd(); ++it) {
         if ( (*it)->name() == name )
             dataset = *it;
     }
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneLegend.cpp #887126:887127
@@ -79,8 +79,8 @@
 {
     GeoSceneSection* section = 0;
 
-    QVector<GeoSceneSection*>::const_iterator it = d->m_sections.begin();
-    for (it = d->m_sections.begin(); it != d->m_sections.end(); ++it) {
+    QVector<GeoSceneSection*>::const_iterator it = d->m_sections.constBegin();
+    for (it = d->m_sections.constBegin(); it != d->m_sections.constEnd(); ++it) {
         if ( (*it)->name() == name )
             section = *it;
     }
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneSection.cpp #887126:887127
@@ -66,8 +66,8 @@
 {
     GeoSceneItem* item = 0;
 
-    QVector<GeoSceneItem*>::const_iterator it = m_items.begin();
-    for (it = m_items.begin(); it != m_items.end(); ++it) {
+    QVector<GeoSceneItem*>::const_iterator it = m_items.constBegin();
+    for (; it != m_items.constEnd(); ++it) {
         if ( (*it)->name() == name )
             item = *it;
     }
--- trunk/KDE/kdeedu/marble/src/lib/gps/Track.cpp #887126:887127
@@ -30,7 +30,7 @@
 Track::~Track() 
 {
     iterator it;
-    for ( it = this->begin(); it < this->constEnd(); ++it ) {
+    for ( it = this->begin(); it < this->end(); ++it ) {
         delete (*it);
     }
     clear();
@@ -40,7 +40,7 @@
                  ViewParams *viewParams )
 {
     const_iterator it;
-    for ( it = this->begin(); it < this->constEnd(); ++it ) {
+    for ( it = this->constBegin(); it < this->constEnd(); ++it ) {
         ( *it ) -> draw( painter, canvasSize, viewParams );
     }
 }
@@ -69,7 +69,7 @@
     }
 #endif
     const_iterator it;
-    for( it = this->begin(); it < this->constEnd(); ++it ) {
+    for( it = this->constBegin(); it < this->constEnd(); ++it ) {
         ( *it ) -> draw( painter, canvasSize, viewParams );
     }
 }
--- trunk/KDE/kdeedu/marble/src/lib/gps/WaypointContainer.cpp #887126:887127
@@ -56,7 +56,7 @@
     painter->setPen( QPen( Qt::black ) );
     painter->setBrush( QBrush( Qt::white ) );
     
-    for ( it = this->begin(); it < this->constEnd(); ++it ) {
+    for ( it = this->constBegin(); it < this->constEnd(); ++it ) {
         draw = (*it)->getPixelPos( canvasSize, viewParams,
                                    &position );
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic