[Marble-commits] KDE/kdeedu/marble/src/lib
Siddharth Srivastava
akssps011 at gmail.com
Thu Jul 29 21:20:04 CEST 2010
SVN commit 1156825 by siddharthsrivastava:
fixed compiler warnings
M +3 -2 DownloadRegionDialog.cpp
M +2 -6 gps/PositionTracking.cpp
--- trunk/KDE/kdeedu/marble/src/lib/DownloadRegionDialog.cpp #1156824:1156825
@@ -521,8 +521,10 @@
QVector<TileCoordsPyramid> DownloadRegionDialog::routeRegion() const
{
+ if( d->m_routingModel->rowCount() == 0 ) {
+ return QVector<TileCoordsPyramid>();
+ }
GeoDataLineString waypoints;
- if( d->m_routingModel->rowCount() != 0 ) {
for( int i = 0; i < d->m_routingModel->rowCount(); ++i ) {
QModelIndex index = d->m_routingModel->index( i, 0 );
GeoDataCoordinates position = qVariantValue<GeoDataCoordinates>( index.data( RoutingModel::CoordinateRole ) );
@@ -606,7 +608,6 @@
return pyramid;
}
-}
void DownloadRegionDialog::updateRouteDialog()
--- trunk/KDE/kdeedu/marble/src/lib/gps/PositionTracking.cpp #1156824:1156825
@@ -96,17 +96,13 @@
//get speed from provider
qreal PositionTracking::speed() const
{
- if( error().isEmpty() ) {
- return m_positionProvider->speed();
+ return m_positionProvider ? m_positionProvider->speed() : 0 ;
}
-}
//get direction from provider
qreal PositionTracking::direction() const
{
- if( error().isEmpty() ) {
- return m_positionProvider->direction();
+ return m_positionProvider ? m_positionProvider->direction() : 0 ;
}
-}
#include "PositionTracking.moc"
More information about the Marble-commits
mailing list