Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 15, 2014
1 parent 0529f11 commit 3f67443
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
2 changes: 0 additions & 2 deletions src/core/composer/qgscomposermapgrid.cpp
Expand Up @@ -1388,8 +1388,6 @@ QgsComposerMap::GridAnnotationDirection QgsComposerMapGrid::gridAnnotationDirect
return mBottomGridAnnotationDirection;
break;
}
mComposerMap->updateBoundingRect();
mComposerMap->update();
}

int QgsComposerMapGrid::crsGridParams( QgsRectangle& crsRect, QgsCoordinateTransform& inverseTransform ) const
Expand Down
21 changes: 8 additions & 13 deletions src/core/composer/qgscomposition.cpp
Expand Up @@ -2805,20 +2805,15 @@ void QgsComposition::refreshPageSize()
if ( ok )
{
double heightD, widthD;
switch ( orientation )
if ( orientation == QgsComposition::Portrait )
{
case QgsComposition::Portrait:
{
heightD = qMax( pageHeight, pageWidth );
widthD = qMin( pageHeight, pageWidth );
break;
}
case QgsComposition::Landscape:
{
heightD = qMin( pageHeight, pageWidth );
widthD = qMax( pageHeight, pageWidth );
break;
}
heightD = qMax( pageHeight, pageWidth );
widthD = qMin( pageHeight, pageWidth );
}
else
{
heightD = qMin( pageHeight, pageWidth );
widthD = qMax( pageHeight, pageWidth );
}
pageWidth = widthD;
pageHeight = heightD;
Expand Down
1 change: 0 additions & 1 deletion src/core/qgsgeometry.cpp
Expand Up @@ -6280,7 +6280,6 @@ QgsGeometry* QgsGeometry::convertToPoint( bool destMultipart )
multiPoint << *lineIt;
return fromMultiPoint( multiPoint );
}
return 0;
}

default:
Expand Down
1 change: 0 additions & 1 deletion src/providers/spatialite/qspatialite/qsql_spatialite.cpp
Expand Up @@ -303,7 +303,6 @@ bool QSpatiaLiteResultPrivate::fetchNext(QSqlCachedResult::ValueCache &values, i
q->setAt(QSql::AfterLastRow);
return false;
}
return false;
}

QSpatiaLiteResult::QSpatiaLiteResult(const QSpatiaLiteDriver* db)
Expand Down

1 comment on commit 3f67443

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jef-n out of interest, why is the switch change in qgscomposition.cpp needed?

Please sign in to comment.