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

Torsten Rahn tackat at kde.org
Tue Jul 21 11:39:07 CEST 2009


SVN commit 1000414 by rahn:

- Forward port of r1000409

Fixes by Gridel Thibaut:
- Remove unneeded includes
- Fix compilation warnings
- foreach -- proper usage of const



 M  +0 -1      lib/AbstractScanlineTextureMapper.cpp  
 M  +0 -1      lib/EquirectScanlineTextureMapper.cpp  
 M  +2 -0      lib/EquirectScanlineTextureMapper.h  
 M  +0 -1      lib/MarbleControlBox.cpp  
 M  +3 -3      lib/MarbleGraphicsItem.cpp  
 M  +0 -1      lib/MarbleModel.cpp  
 M  +1 -1      lib/MarbleWidget.cpp  
 M  +0 -1      lib/MercatorScanlineTextureMapper.cpp  
 M  +2 -0      lib/MercatorScanlineTextureMapper.h  
 M  +1 -1      lib/PlacemarkInfoDialog.ui  
 M  +0 -4      lib/PositionProviderPluginInterface.cpp  
 M  +0 -1      lib/SphericalScanlineTextureMapper.cpp  
 M  +1 -1      marble_part.cpp  
 M  +2 -2      plugins/render/weather/WeatherItem.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/AbstractScanlineTextureMapper.cpp #1000413:1000414
@@ -13,7 +13,6 @@
 
 #include <QtCore/QDebug>
 
-#include "GeoPolygon.h"
 #include "GeoSceneTexture.h"
 #include "MarbleDirs.h"
 #include "TextureTile.h"
--- trunk/KDE/kdeedu/marble/src/lib/EquirectScanlineTextureMapper.cpp #1000413:1000414
@@ -20,7 +20,6 @@
 #include <QtGui/QImage>
 
 // Marble
-#include "GeoPolygon.h"
 #include "MarbleDirs.h"
 #include "TextureTile.h"
 #include "TileLoader.h"
--- trunk/KDE/kdeedu/marble/src/lib/EquirectScanlineTextureMapper.h #1000413:1000414
@@ -21,6 +21,8 @@
 
 class EquirectScanlineTextureMapper : public AbstractScanlineTextureMapper
 {
+    Q_OBJECT
+
  public:
     explicit EquirectScanlineTextureMapper( TileLoader *tileLoader,
 					    QObject    *parent = 0 );
--- trunk/KDE/kdeedu/marble/src/lib/MarbleControlBox.cpp #1000413:1000414
@@ -33,7 +33,6 @@
 #include <QtCore/QTimer>
 #include <QtGui/QSortFilterProxyModel>
 #include <QtGui/QStandardItemModel>
-#include <QtGui/QStandardItemModel>
 #include <QtGui/QTextFrame>
 
 #include <global.h>
--- trunk/KDE/kdeedu/marble/src/lib/MarbleGraphicsItem.cpp #1000413:1000414
@@ -86,7 +86,7 @@
             QPixmapCache::insert( p()->m_cacheKey, cachePixmap );
         }
         
-        foreach( QPointF position, p()->positions() ) {
+        foreach( const QPointF& position, p()->positions() ) {
             painter->save();
             
             painter->drawPixmap( position, cachePixmap );
@@ -95,7 +95,7 @@
         }
     }
     else {
-        foreach( QPointF position, p()->positions() ) {
+        foreach( const QPointF& position, p()->positions() ) {
             painter->save();
         
             painter->translate( position );
@@ -109,7 +109,7 @@
 }
 
 bool MarbleGraphicsItem::contains( const QPointF& point ) const {
-    foreach( QRectF rect, d->boundingRects() ) {
+    foreach( const QRectF& rect, d->boundingRects() ) {
         if( rect.contains( point ) )
             return true;
     }
--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.cpp #1000413:1000414
@@ -47,7 +47,6 @@
 #include "SphericalScanlineTextureMapper.h"
 #include "EquirectScanlineTextureMapper.h"
 #include "MercatorScanlineTextureMapper.h"
-#include "GeoPolygon.h"
 #include "gps/GpxFileModel.h"
 #include "HttpDownloadManager.h"
 #include "KmlFileViewItem.h"
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.cpp #1000413:1000414
@@ -1293,7 +1293,7 @@
 
         QHash<QString,QVariant> hash = plugin->settings();
 
-        foreach ( QString key, settings.childKeys() ) {
+        foreach ( const QString& key, settings.childKeys() ) {
             hash.insert( key, settings.value( key ) );
         }
 
--- trunk/KDE/kdeedu/marble/src/lib/MercatorScanlineTextureMapper.cpp #1000413:1000414
@@ -21,7 +21,6 @@
 #include <QtGui/QImage>
 
 // Marble
-#include "GeoPolygon.h"
 #include "MarbleDirs.h"
 #include "TextureTile.h"
 #include "TileLoader.h"
--- trunk/KDE/kdeedu/marble/src/lib/MercatorScanlineTextureMapper.h #1000413:1000414
@@ -21,6 +21,8 @@
 
 class MercatorScanlineTextureMapper : public AbstractScanlineTextureMapper
 {
+    Q_OBJECT
+
  public:
     explicit MercatorScanlineTextureMapper( TileLoader *tileLoader,
 					    QObject    *parent = 0 );
--- trunk/KDE/kdeedu/marble/src/lib/PlacemarkInfoDialog.ui #1000413:1000414
@@ -235,7 +235,7 @@
         </spacer>
        </item>
        <item>
-        <layout class="QGridLayout" name="gridLayout">
+        <layout class="QGridLayout">
          <item row="0" column="0">
           <widget class="QLabel" name="elevation_lbl">
            <property name="text">
--- trunk/KDE/kdeedu/marble/src/lib/PositionProviderPluginInterface.cpp #1000413:1000414
@@ -13,7 +13,3 @@
 
 
 Marble::PositionProviderPluginInterface::~PositionProviderPluginInterface() {}
-
-
-
-#include "PositionProviderPluginInterface.moc"
--- trunk/KDE/kdeedu/marble/src/lib/SphericalScanlineTextureMapper.cpp #1000413:1000414
@@ -17,7 +17,6 @@
 #include <QtGui/QImage>
 
 #include "global.h"
-#include "GeoPolygon.h"
 #include "MarbleDirs.h"
 #include "Quaternion.h"
 #include "TextureTile.h"
--- trunk/KDE/kdeedu/marble/src/marble_part.cpp #1000413:1000414
@@ -1166,7 +1166,7 @@
 
         QHash<QString,QVariant> hash = plugin->settings();
 
-        foreach ( QString key, group.keyList() ) {
+        foreach ( const QString& key, group.keyList() ) {
             hash.insert( key, group.readEntry( key ) );
         }
 
--- trunk/KDE/kdeedu/marble/src/plugins/render/weather/WeatherItem.cpp #1000413:1000414
@@ -106,7 +106,7 @@
         // Getting the size of the first row.
         // The row should at least be able to contain a image.
         QSize row1Size( 0, imageSize.height() );
-        foreach ( QSize size, elementSize1 ) {
+        foreach ( const QSize& size, elementSize1 ) {
             row1Size += QSize( size.width(), 0 );
             // The height of the first row is the maximum of the elements height.
             if ( size.height() > row1Size.height() ) {
@@ -117,7 +117,7 @@
         // Getting the size of the second row.
         // The row should at least be able to contain a image.
         QSize row2Size( 0, imageSize.height() );
-        foreach ( QSize size, elementSize2 ) {
+        foreach ( const QSize& size, elementSize2 ) {
             row2Size += QSize( size.width(), 0 );
             // The height of the second row is the maximum of the elements height.
             if ( size.height() > row2Size.height() ) {


More information about the Marble-commits mailing list