[Marble-commits] KDE/kdeedu/marble/src

Jens-Michael Hoffmann jensmh at gmx.de
Fri Dec 18 23:18:21 CET 2009


SVN commit 1063614 by jmhoffmann:

krazy fixes: non POD foreach loop variables declared const &.

 M  +1 -1      lib/PluginAboutDialog.cpp  
 M  +1 -1      lib/PluginItemDelegate.cpp  
 M  +3 -3      plugins/render/weather/WeatherItem.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/PluginAboutDialog.cpp #1063613:1063614
@@ -78,7 +78,7 @@
 void PluginAboutDialog::setAuthors( const QList<Author>& authors )
 {
     QString string;
-    foreach ( Author author, authors ) {
+    foreach ( const Author& author, authors ) {
         string += author.name;
         string += "\n    ";
         string += author.email;
--- trunk/KDE/kdeedu/marble/src/lib/PluginItemDelegate.cpp #1063613:1063614
@@ -120,7 +120,7 @@
     elementSize.append( configButton.rect.size() );
     elementSize.append( nameSize( index ) );
 
-    foreach( QSize buttonSize, elementSize ) {
+    foreach( const QSize& buttonSize, elementSize ) {
         if( buttonSize.height() > size.height() )
             size.setHeight( buttonSize.height() );
         size.setWidth( size.width() + buttonSize.width() );
--- trunk/KDE/kdeedu/marble/src/plugins/render/weather/WeatherItem.cpp #1063613:1063614
@@ -127,7 +127,7 @@
 
             QDate minDate = QDate::currentDate();
             minDate.addDays( -1 );
-            foreach( WeatherData data, m_forecastWeather ) {
+            foreach( const WeatherData& data, m_forecastWeather ) {
                 QDate date = data.dataDate();
                 if( date >= minDate
                     && data.hasValidCondition()
@@ -381,7 +381,7 @@
 
 void WeatherItem::addForecastWeather( const QList<WeatherData>& forecasts )
 {
-    foreach( WeatherData data, forecasts ) {
+    foreach( const WeatherData& data, forecasts ) {
         QDate date = data.dataDate();
         WeatherData other = d->m_forecastWeather.value( date );
         if ( !other.isValid() ) {
@@ -455,7 +455,7 @@
     if ( !d->m_forecastWeather.isEmpty() ) {
         html += "<h2>" + tr( "Forecasts" ) + "</h2>";
     }
-    foreach ( WeatherData data, d->m_forecastWeather ) {
+    foreach ( const WeatherData& data, d->m_forecastWeather ) {
         QDate date = data.dataDate();
         html += "<h3>" + locale.standaloneDayName( date.dayOfWeek() ) + "</h3>";
         html += data.toHtml( d->temperatureUnit(),


More information about the Marble-commits mailing list