Skip to content
Permalink
Browse files

fix msvc warnings

  • Loading branch information
jef-n committed Jan 3, 2014
1 parent 6c2e385 commit 72552bce858713db70e7e4601efaecbe3d4d275c
@@ -376,7 +376,7 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
QList<double>::iterator zoom_it;
for ( zoom_it = mStatusZoomLevelsList.begin(); zoom_it != mStatusZoomLevelsList.end(); ++zoom_it )
{
mStatusZoomCombo->insertItem( 0, QString( tr( "%1\%" ) ).arg(( *zoom_it ) * 100 ) );
mStatusZoomCombo->insertItem( 0, tr( "%1%" ).arg( *zoom_it * 100.0, 0, 'f', 1 ) );
}
connect( mStatusZoomCombo, SIGNAL( currentIndexChanged( int ) ), this, SLOT( statusZoomCombo_currentIndexChanged( int ) ) );
connect( mStatusZoomCombo->lineEdit(), SIGNAL( returnPressed() ), this, SLOT( statusZoomCombo_zoomEntered() ) );
@@ -735,7 +735,7 @@ void QgsComposer::updateStatusZoom()
double zoomLevel = mView->transform().m11() * 100 / scale100;

mStatusZoomCombo->blockSignals( true );
mStatusZoomCombo->lineEdit()->setText( QString( tr( "%1\%" ) ).arg( QString::number( zoomLevel, 'f', 1 ) ) );
mStatusZoomCombo->lineEdit()->setText( tr( "%1%" ).arg( zoomLevel, 0, 'f', 1 ) );
mStatusZoomCombo->blockSignals( false );
}

@@ -747,7 +747,7 @@ void QgsComposer::statusZoomCombo_currentIndexChanged( int index )
mView->setZoomLevel( selectedZoom );
//update zoom combobox text for correct format (one decimal place, trailing % sign)
mStatusZoomCombo->blockSignals( true );
mStatusZoomCombo->lineEdit()->setText( QString( tr( "%1\%" ) ).arg( QString::number( selectedZoom * 100, 'f', 1 ) ) );
mStatusZoomCombo->lineEdit()->setText( tr( "%1%" ).arg( selectedZoom * 100.0, 0, 'f', 1 ) );
mStatusZoomCombo->blockSignals( false );
}
}
@@ -592,7 +592,7 @@ void QgsComposerMouseHandles::mouseReleaseEvent( QGraphicsSceneMouseEvent* event
QList<QgsComposerItem*>::iterator itemIter = selectedItems.begin();
for ( ; itemIter != selectedItems.end(); ++itemIter )
{
if (( *itemIter )->positionLock() || ( !( *itemIter )->flags() & QGraphicsItem::ItemIsSelectable ) )
if (( *itemIter )->positionLock() || (( *itemIter )->flags() & QGraphicsItem::ItemIsSelectable ) == 0 )
{
//don't move locked items
continue;
@@ -615,7 +615,7 @@ void QgsComposerMouseHandles::mouseReleaseEvent( QGraphicsSceneMouseEvent* event
QList<QgsComposerItem*>::iterator itemIter = selectedItems.begin();
for ( ; itemIter != selectedItems.end(); ++itemIter )
{
if (( *itemIter )->positionLock() || ( !( *itemIter )->flags() & QGraphicsItem::ItemIsSelectable ) )
if (( *itemIter )->positionLock() || (( *itemIter )->flags() & QGraphicsItem::ItemIsSelectable ) == 0 )
{
//don't resize locked items or unselectable items (eg, items which make up an item group)
continue;
@@ -1993,7 +1993,7 @@ bool QgsCoordinateReferenceSystem::syncDatumTransform( const QString& dbPath )

int n = CSLCount( fieldnames );

int idxid, idxrx, idxry, idxrz;
int idxid = -1, idxrx = -1, idxry = -1, idxrz = -1;
for ( unsigned int i = 0; i < sizeof( map ) / sizeof( *map ); i++ )
{
bool last = i == sizeof( map ) / sizeof( *map ) - 1;
@@ -2046,6 +2046,11 @@ bool QgsCoordinateReferenceSystem::syncDatumTransform( const QString& dbPath )

CSLDestroy( fieldnames );

Q_ASSERT( idxid >= 0 );
Q_ASSERT( idxrx >= 0 );
Q_ASSERT( idxry >= 0 );
Q_ASSERT( idxrz >= 0 );

sqlite3 *db;
int openResult = sqlite3_open( dbPath.toUtf8().constData(), &db );
if ( openResult != SQLITE_OK )

0 comments on commit 72552bc

Please sign in to comment.
You can’t perform that action at this time.