[Marble-commits] KDE/kdeedu/marble
Torsten Rahn
tackat at t-online.de
Sat Jul 17 21:17:29 CEST 2010
Same as for the folders patch: Mea culpa:
Could you revert this please? See my mail regarding folders() why this should be
reverted.
Thanks.
On Saturday 17 July 2010 00:35:41 Thibaut Gridel wrote:
> SVN commit 1150833 by tgridel:
>
> GeoDataContainer: use featureList instead of features
>
> M +3 -3 src/lib/geodata/GeoDataTest.cpp
> M +0 -15 src/lib/geodata/data/GeoDataContainer.cpp
> M +0 -1 src/lib/geodata/data/GeoDataContainer.h
> M +15 -15 tests/KMLTest.cpp
>
>
> --- trunk/KDE/kdeedu/marble/src/lib/geodata/GeoDataTest.cpp
> #1150832:1150833 @@ -117,11 +117,11 @@
>
> if (document->isGeoDataDocument()) {
> GeoDataDocument *dataDocument =
> static_cast<GeoDataDocument*>(document); -
> QVector<GeoDataFeature>::const_iterator it =
> dataDocument->features().constBegin(); -
> QVector<GeoDataFeature>::const_iterator end =
> dataDocument->features().constEnd(); +
> QVector<GeoDataFeature*>::const_iterator it =
> dataDocument->featureList().constBegin(); +
> QVector<GeoDataFeature*>::const_iterator end =
> dataDocument->featureList().constEnd(); qDebug() <<
> "---------------------------------------------------------"; for (; it !=
> end; ++it) {
> - qDebug() << "Name: " << it->name();
> + qDebug() << "Name: " << (*it)->name();
> }
> dumpGeoDataDocument(static_cast<GeoDataDocument*>(document));
> } else if (document->isGeoSceneDocument()) {
> --- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataContainer.cpp
> #1150832:1150833 @@ -99,21 +99,6 @@
> return p()->m_vector;
> }
>
> -QVector<GeoDataFeature> GeoDataContainer::features() const
> -{
> - QVector<GeoDataFeature> results;
> -
> - QVector<GeoDataFeature*>::const_iterator it =
> p()->m_vector.constBegin(); - QVector<GeoDataFeature*>::const_iterator
> end = p()->m_vector.constEnd(); -
> - for (; it != end; ++it) {
> - GeoDataFeature f = **it;
> - results.append( f );
> - }
> -
> - return results;
> -}
> -
> /**
> * @brief returns the requested child item
> */
> --- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataContainer.h
> #1150832:1150833 @@ -72,7 +72,6 @@
> * @see GeoDataFeature
> */
> QVector<GeoDataFeature*> featureList() const;
> - QVector<GeoDataFeature> features() const;
>
> /**
> * @brief A convenience function that returns all placemarks in this
> container. --- trunk/KDE/kdeedu/marble/tests/KMLTest.cpp #1150832:1150833
> @@ -86,13 +86,13 @@
> GeoDocument* document = parser.releaseDocument();
> QVERIFY( document );
> GeoDataDocument *dataDocument = static_cast<GeoDataDocument*>(
> document ); - GeoDataFeature feature = dataDocument->features().at( 0
> );
> - GeoDataPlacemark placemark = *static_cast<GeoDataPlacemark*>( &feature
> ); - GeoDataPolygon polygon = *static_cast<GeoDataPolygon*>(
> placemark.geometry() ); - qDebug() << placemark.name();
> + GeoDataFeature *feature = dataDocument->featureList().at( 0 );
> + GeoDataPlacemark *placemark = static_cast<GeoDataPlacemark*>( feature
> ); + GeoDataPolygon *polygon = static_cast<GeoDataPolygon*>(
> placemark->geometry() ); + qDebug() << placemark->name();
>
> - QVector<GeoDataCoordinates>::iterator iterator =
> polygon.outerBoundary().begin(); - for( ; iterator !=
> polygon.outerBoundary().end(); ++iterator ) { +
> QVector<GeoDataCoordinates>::iterator iterator =
> polygon->outerBoundary().begin(); + for( ; iterator !=
> polygon->outerBoundary().end(); ++iterator ) { qDebug() <<
> (*iterator).toString();
> }
> delete document;
> @@ -144,14 +144,14 @@
> }
> QVERIFY( dataDocument );
>
> - GeoDataFeature feature = dataDocument->features().at( 0 );
> - GeoDataPlacemark placemark = *static_cast<GeoDataPlacemark*>( &feature
> ); - GeoDataPolygon polygon =
> *static_cast<GeoDataPolygon*>(placemark.geometry()); + GeoDataFeature
> *feature = dataDocument->featureList().at( 0 ); + GeoDataPlacemark
> *placemark = static_cast<GeoDataPlacemark*>( feature ); +
> GeoDataPolygon *polygon =
> static_cast<GeoDataPolygon*>(placemark->geometry());
>
> - qDebug() << placemark.name();
> + qDebug() << placemark->name();
>
> - QVector<GeoDataCoordinates>::iterator iterator =
> polygon.outerBoundary().begin(); - for( ; iterator !=
> polygon.outerBoundary().end(); ++iterator ) { +
> QVector<GeoDataCoordinates>::iterator iterator =
> polygon->outerBoundary().begin(); + for( ; iterator !=
> polygon->outerBoundary().end(); ++iterator ) { qDebug() <<
> (*iterator).toString();
> }
> delete dataDocument;
> @@ -201,9 +201,9 @@
> }
> QVERIFY( dataDocument );
>
> - qDebug() << dataDocument->features().size();
> - for( int i = 0; i < dataDocument->features().size(); i++ ) {
> - fprintf( stderr, "Debug: %s\n",
> dataDocument->features()[i].name().toLocal8Bit().data() ); + qDebug()
> << dataDocument->featureList().size();
> + for( int i = 0; i < dataDocument->featureList().size(); i++ ) {
> + fprintf( stderr, "Debug: %s\n",
> dataDocument->featureList()[i]->name().toLocal8Bit().data() ); }
> delete dataDocument;
> }
> _______________________________________________
> Marble-commits mailing list
> Marble-commits at kde.org
> https://mail.kde.org/mailman/listinfo/marble-commits
More information about the Marble-commits
mailing list