[Marble-commits] KDE/kdeedu/marble/src/lib/geodata/scene
Jens-Michael Hoffmann
jensmh at gmx.de
Tue Jul 21 22:19:13 CEST 2009
SVN commit 1000702 by jmhoffmann:
Break after specified item is found as items are unique
within their containers.
M +1 -0 GeoSceneGroup.cpp
M +7 -2 GeoSceneLayer.cpp
M +4 -1 GeoSceneLegend.cpp
M +8 -2 GeoSceneMap.cpp
M +4 -1 GeoSceneSection.cpp
M +9 -3 GeoSceneSettings.cpp
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneGroup.cpp #1000701:1000702
@@ -93,6 +93,7 @@
if ( currentProperty->name() == property->name() ) {
delete currentProperty;
it = m_properties.erase(it);
+ break;
}
else {
++it;
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneLayer.cpp #1000701:1000702
@@ -84,6 +84,7 @@
if ( currentAbstractDataset->name() == dataset->name() ) {
delete currentAbstractDataset;
it = m_datasets.erase(it);
+ break;
}
else {
++it;
@@ -102,8 +103,10 @@
QVector<GeoSceneAbstractDataset*>::const_iterator it = m_datasets.constBegin();
QVector<GeoSceneAbstractDataset*>::const_iterator end = m_datasets.constEnd();
for (; it != end; ++it) {
- if ( (*it)->name() == name )
+ if ( (*it)->name() == name ) {
dataset = *it;
+ break;
+ }
}
if ( dataset ) {
@@ -177,7 +180,9 @@
void GeoSceneLayer::removeFilter( GeoSceneFilter * filter )
{
- if( filter == m_filter ) { m_filter = 0; }
+ if ( filter == m_filter ) {
+ m_filter = 0;
+ }
}
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneLegend.cpp #1000701:1000702
@@ -60,6 +60,7 @@
if ( currentSection->name() == section->name() ) {
delete currentSection;
it = d->m_sections.erase(it);
+ break;
}
else {
++it;
@@ -78,8 +79,10 @@
QVector<GeoSceneSection*>::const_iterator it = d->m_sections.constBegin();
QVector<GeoSceneSection*>::const_iterator end = d->m_sections.constEnd();
for (; it != end; ++it) {
- if ( (*it)->name() == name )
+ if ( (*it)->name() == name ) {
section = *it;
+ break;
+ }
}
if ( section ) {
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneMap.cpp #1000701:1000702
@@ -76,6 +76,7 @@
if ( currentLayer->name() == layer->name() ) {
delete currentLayer;
it = d->m_layers.erase(it);
+ break;
}
else {
++it;
@@ -94,8 +95,10 @@
QVector<GeoSceneLayer*>::const_iterator it = d->m_layers.constBegin();
QVector<GeoSceneLayer*>::const_iterator end = d->m_layers.constEnd();
for (; it != end; ++it) {
- if ( (*it)->name() == name )
+ if ( (*it)->name() == name ) {
layer = *it;
+ break;
+ }
}
if ( layer ) {
@@ -123,6 +126,7 @@
if ( currentFilter->name() == filter->name() ) {
delete currentFilter;
it = d->m_filters.erase(it);
+ break;
}
else {
++it;
@@ -141,8 +145,10 @@
QVector<GeoSceneFilter*>::const_iterator it = d->m_filters.constBegin();
QVector<GeoSceneFilter*>::const_iterator end = d->m_filters.constEnd();
for (; it != end; ++it) {
- if ( (*it)->name() == name )
+ if ( (*it)->name() == name ) {
filter = *it;
+ break;
+ }
}
if ( filter ) {
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneSection.cpp #1000701:1000702
@@ -51,6 +51,7 @@
if ( currentItem->name() == item->name() ) {
delete currentItem;
it = m_items.erase(it);
+ break;
}
else {
++it;
@@ -69,8 +70,10 @@
QVector<GeoSceneItem*>::const_iterator it = m_items.constBegin();
QVector<GeoSceneItem*>::const_iterator end = m_items.constEnd();
for (; it != end; ++it) {
- if ( (*it)->name() == name )
+ if ( (*it)->name() == name ) {
item = *it;
+ break;
+ }
}
if ( item ) {
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneSettings.cpp #1000701:1000702
@@ -39,7 +39,7 @@
}
/// The hash table holding all the properties in the settings.
- QVector<GeoSceneProperty*> m_properties;
+ QVector<GeoSceneProperty*> m_properties;
QVector<GeoSceneGroup*> m_groups;
};
@@ -153,6 +153,7 @@
if ( currentGroup->name() == group->name() ) {
delete currentGroup;
it = d->m_groups.erase(it);
+ break;
}
else {
++it;
@@ -175,8 +176,10 @@
QVector<GeoSceneGroup*>::const_iterator it = d->m_groups.constBegin();
QVector<GeoSceneGroup*>::const_iterator groupEnd = d->m_groups.constEnd();
for (; it != groupEnd; ++it) {
- if ( (*it)->name() == name )
+ if ( (*it)->name() == name ) {
group = *it;
+ break;
+ }
}
if ( group ) {
@@ -196,6 +199,7 @@
if ( currentProperty->name() == property->name() ) {
delete currentProperty;
it = d->m_properties.erase(it);
+ break;
}
else {
++it;
@@ -219,8 +223,10 @@
QVector<GeoSceneProperty*>::const_iterator it = d->m_properties.constBegin();
QVector<GeoSceneProperty*>::const_iterator propEnd = d->m_properties.constEnd();
for (; it != propEnd; ++it) {
- if ( (*it)->name() == name )
+ if ( (*it)->name() == name ) {
property = *it;
+ break;
+ }
}
if ( property ) {
More information about the Marble-commits
mailing list