[Marble-commits] KDE/kdeedu/marble/src/lib/geodata/scene
Torsten Rahn
tackat at kde.org
Sat Jul 11 17:23:33 CEST 2009
SVN commit 994863 by rahn:
- Reverting commit 994530 as it seems to create issues:
* country lines turn black in Atlas view.
* possibly creates crashes on theme switch. (?)
M +6 -4 GeoSceneLayer.cpp
M +1 -1 GeoSceneLegend.cpp
M +2 -2 GeoSceneMap.cpp
M +1 -1 GeoSceneSection.cpp
M +10 -2 GeoSceneSettings.cpp
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneLayer.cpp #994862:994863
@@ -102,9 +102,13 @@
for (; it != m_datasets.constEnd(); ++it) {
if ( (*it)->name() == name )
dataset = *it;
- break;
}
+ if ( dataset ) {
+ Q_ASSERT(dataset->name() == name);
+ return dataset;
+ }
+
// dataset = new GeoSceneAbstractDataset( name );
// addDataset( dataset );
@@ -171,9 +175,7 @@
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 #994862:994863
@@ -80,10 +80,10 @@
for (; it != end; ++it) {
if ( (*it)->name() == name )
section = *it;
- break;
}
if ( section ) {
+ Q_ASSERT(section->name() == name);
return section;
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneMap.cpp #994862:994863
@@ -96,10 +96,10 @@
for (; it != end; ++it) {
if ( (*it)->name() == name )
layer = *it;
- break;
}
if ( layer ) {
+ Q_ASSERT(layer->name() == name);
return layer;
}
@@ -143,10 +143,10 @@
for (; it != end; ++it) {
if ( (*it)->name() == name )
filter = *it;
- break;
}
if ( filter ) {
+ Q_ASSERT(filter->name() == name);
return filter;
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneSection.cpp #994862:994863
@@ -71,10 +71,10 @@
for (; it != end; ++it) {
if ( (*it)->name() == name )
item = *it;
- break;
}
if ( item ) {
+ Q_ASSERT(item->name() == name);
return item;
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneSettings.cpp #994862:994863
@@ -177,9 +177,13 @@
for (; it != groupEnd; ++it) {
if ( (*it)->name() == name )
group = *it;
- break;
}
+ if ( group ) {
+ Q_ASSERT(group->name() == name);
+ return group;
+ }
+
return group;
}
@@ -217,9 +221,13 @@
for (; it != propEnd; ++it) {
if ( (*it)->name() == name )
property = *it;
- break;
}
+ if ( property ) {
+ Q_ASSERT(property->name() == name);
+ return property;
+ }
+
return property;
}
More information about the Marble-commits
mailing list