Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 29, 2012
1 parent 991f3d3 commit ea80d59
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
17 changes: 9 additions & 8 deletions src/app/qgisapp.cpp
Expand Up @@ -628,7 +628,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,

#ifdef ANDROID
//add reacting to long click in android
grabGesture(Qt::TapAndHoldGesture);
grabGesture( Qt::TapAndHoldGesture );
#endif

// update windows
Expand Down Expand Up @@ -741,9 +741,9 @@ bool QgisApp::event( QEvent * event )
done = true;
}
#ifdef ANDROID
else if (event->type() == QEvent::Gesture )
else if ( event->type() == QEvent::Gesture )
{
done = gestureEvent(static_cast<QGestureEvent*>(event));
done = gestureEvent( static_cast<QGestureEvent*>( event ) );
}
#endif
else
Expand Down Expand Up @@ -7293,18 +7293,19 @@ QMenu* QgisApp::createPopupMenu()
}

#ifdef ANDROID
bool QgisApp::gestureEvent(QGestureEvent *event)
bool QgisApp::gestureEvent( QGestureEvent *event )
{
if (QGesture *tapAndHold = event->gesture(Qt::TapAndHoldGesture))
if ( QGesture *tapAndHold = event->gesture( Qt::TapAndHoldGesture ) )
{
tapAndHoldTriggered(static_cast<QTapAndHoldGesture *>(tapAndHold));
tapAndHoldTriggered( static_cast<QTapAndHoldGesture *>( tapAndHold ) );
}
return true;
}

void QgisApp::tapAndHoldTriggered(QTapAndHoldGesture *gesture)
void QgisApp::tapAndHoldTriggered( QTapAndHoldGesture *gesture )
{
if (gesture->state() == Qt::GestureFinished) {
if ( gesture->state() == Qt::GestureFinished )
{
QPoint pos = gesture->position().toPoint();
QWidget * receiver = QApplication::widgetAt( pos );
qDebug() << "tapAndHoldTriggered: LONG CLICK gesture happened at " << pos;
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgisapp.h
Expand Up @@ -1165,8 +1165,8 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
QString mOldScale;

#ifdef ANDROID
bool gestureEvent(QGestureEvent *event);
void tapAndHoldTriggered(QTapAndHoldGesture *gesture);
bool gestureEvent( QGestureEvent *event );
void tapAndHoldTriggered( QTapAndHoldGesture *gesture );
#endif
};

Expand Down
1 change: 1 addition & 0 deletions src/app/qgsmaptooloffsetcurve.cpp
Expand Up @@ -484,5 +484,6 @@ QgsGeometry* QgsMapToolOffsetCurve::convertToSingleLine( QgsGeometry* geom, int

QgsGeometry* QgsMapToolOffsetCurve::convertToMultiLine( QgsGeometry* geom )
{
Q_UNUSED( geom );
return 0;
}
2 changes: 0 additions & 2 deletions src/core/qgsgeometry.cpp
Expand Up @@ -6156,8 +6156,6 @@ QgsGeometry* QgsGeometry::combine( QgsGeometry* geometry )
try
{
GEOSGeometry* unionGeom = GEOSUnion( mGeos, geometry->mGeos );
QGis::WkbType thisGeomType = wkbType();
QGis::WkbType otherGeomType = geometry->wkbType();
if ( type() == QGis::Line )
{
GEOSGeometry* mergedGeom = GEOSLineMerge( unionGeom );
Expand Down
2 changes: 2 additions & 0 deletions src/core/qgslabel.cpp
Expand Up @@ -593,6 +593,8 @@ unsigned char* QgsLabel::labelPoint( labelpoint& point, unsigned char *geom, siz
QGis::WkbType wkbType;
#ifndef QT_NO_DEBUG
unsigned char *geomend = geom + geomlen;
#else
Q_UNUSED( geomlen );
#endif
Q_ASSERT( geom + 1 + sizeof( wkbType ) <= geomend );

Expand Down
2 changes: 1 addition & 1 deletion src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -2959,7 +2959,7 @@ QStringList QgsWmsProvider::identifyAs( const QgsPoint& point, QString format )
setQueryItem( requestUrl, "X", QString::number( point.x() ) );
setQueryItem( requestUrl, "Y", QString::number( point.y() ) );

if( mFeatureCount > 0 )
if ( mFeatureCount > 0 )
{
setQueryItem( requestUrl, "FEATURE_COUNT", QString::number( mFeatureCount ) );
}
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wms/qgswmssourceselect.cpp
Expand Up @@ -473,7 +473,7 @@ void QgsWMSSourceSelect::addClicked()

if ( mFeatureCount->text().toInt() > 0 )
{
if( !connArgs.isEmpty() )
if ( !connArgs.isEmpty() )
connArgs += ",";
connArgs += QString( "featureCount=%1" ).arg( mFeatureCount->text().toInt() );
}
Expand Down

0 comments on commit ea80d59

Please sign in to comment.