Skip to content

Commit

Permalink
fix windows build (pow called with an integer) and comma cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 8, 2015
1 parent 2e9cc1a commit a264a27
Show file tree
Hide file tree
Showing 19 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -2748,7 +2748,7 @@ void QgisApp::addLayerDefinition()
openLayerDefinition( path );
}

QString QgisApp::crsAndFormatAdjustedLayerUri( const QString &uri , const QStringList &supportedCrs, const QStringList &supportedFormats ) const
QString QgisApp::crsAndFormatAdjustedLayerUri( const QString &uri, const QStringList &supportedCrs, const QStringList &supportedFormats ) const
{
QString newuri = uri;

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsadvanceddigitizingcanvasitem.cpp
Expand Up @@ -20,7 +20,7 @@
#include "qgsmapcanvas.h"


QgsAdvancedDigitizingCanvasItem::QgsAdvancedDigitizingCanvasItem( QgsMapCanvas* canvas , QgsAdvancedDigitizingDockWidget* cadDockWidget )
QgsAdvancedDigitizingCanvasItem::QgsAdvancedDigitizingCanvasItem( QgsMapCanvas* canvas, QgsAdvancedDigitizingDockWidget* cadDockWidget )
: QgsMapCanvasItem( canvas )
, mLockedPen( QPen( QColor( 100, 100, 255, 255 ), .7, Qt::DashLine ) )
, mConstruction1Pen( QPen( QColor( 100, 255, 100, 150 ), .7, Qt::DashLine ) )
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsadvanceddigitizingdockwidget.cpp
Expand Up @@ -46,7 +46,7 @@ bool QgsAdvancedDigitizingDockWidget::lineCircleIntersection( const QgsPoint& ce
const double dr = sqrt( pow( dx, 2 ) + pow( dy, 2 ) );
const double d = x1 * y2 - x2 * y1;

const double disc = pow( radius , 2 ) * pow( dr, 2 ) - pow( d, 2 );
const double disc = pow( radius, 2 ) * pow( dr, 2 ) - pow( d, 2 );

if ( disc < 0 )
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmapmouseevent.cpp
Expand Up @@ -21,7 +21,7 @@
#include "qgisapp.h"
#include "qgssnappingutils.h"

QgsMapMouseEvent::QgsMapMouseEvent( QgsMapToolAdvancedDigitizing* mapTool, QMouseEvent* event , SnappingMode mode )
QgsMapMouseEvent::QgsMapMouseEvent( QgsMapToolAdvancedDigitizing* mapTool, QMouseEvent* event, SnappingMode mode )
: QMouseEvent( event->type(), event->pos(), event->globalPos(), event->button(), event->buttons(), event->modifiers() )
, mMapPoint( mapTool->canvas()->mapSettings().mapToPixel().toMapCoordinates( event->pos() ) )
, mMapTool( mapTool )
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsdataitem.cpp
Expand Up @@ -172,7 +172,7 @@ QgsDataItem::QgsDataItem( QgsDataItem::Type type, QgsDataItem* parent, QString n

QgsDataItem::~QgsDataItem()
{
QgsDebugMsgLevel( QString( "mName = %1 mPath = %2 mChildren.size() = %3" ).arg( mName ).arg( mPath ).arg( mChildren.size() ) , 2 );
QgsDebugMsgLevel( QString( "mName = %1 mPath = %2 mChildren.size() = %3" ).arg( mName ).arg( mPath ).arg( mChildren.size() ), 2 );
foreach ( QgsDataItem *child, mChildren )
{
if ( !child ) // should not happen
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsdoublespinbox.cpp
Expand Up @@ -79,7 +79,7 @@ void QgsDoubleSpinBox::clear()
setValue( clearValue() );
}

void QgsDoubleSpinBox::setClearValue( double customValue , QString specialValueText )
void QgsDoubleSpinBox::setClearValue( double customValue, QString specialValueText )
{
mClearValueMode = CustomValue;
mCustomClearValue = customValue;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgscolorwidgets.cpp
Expand Up @@ -769,7 +769,7 @@ void QgsColorBox::paintEvent( QPaintEvent *event )
painter.setPen( Qt::NoPen );

painter.drawRect( xPos - 1, mMargin, 3, height() - 2 * mMargin - 1 );
painter.drawRect( mMargin, yPos - 1 , width() - 2 * mMargin - 1, 3 );
painter.drawRect( mMargin, yPos - 1, width() - 2 * mMargin - 1, 3 );
painter.setPen( Qt::black );
painter.drawLine( xPos, mMargin, xPos, height() - mMargin - 1 );
painter.drawLine( mMargin, yPos, width() - mMargin - 1, yPos );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmaplayeractionregistry.cpp
Expand Up @@ -26,7 +26,7 @@ QgsMapLayerAction::QgsMapLayerAction( QString name, QObject* parent, Targets tar
}

/**Creates a map layer action which can run only on a specific layer*/
QgsMapLayerAction::QgsMapLayerAction( QString name, QObject* parent, QgsMapLayer* layer , Targets targets, QIcon icon )
QgsMapLayerAction::QgsMapLayerAction( QString name, QObject* parent, QgsMapLayer* layer, Targets targets, QIcon icon )
: QAction( icon, name, parent )
, mSingleLayer( true )
, mActionLayer( layer )
Expand Down
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresconn.cpp
Expand Up @@ -133,7 +133,7 @@ QMap<QString, QgsPostgresConn *> QgsPostgresConn::sConnectionsRO;
QMap<QString, QgsPostgresConn *> QgsPostgresConn::sConnectionsRW;
const int QgsPostgresConn::sGeomTypeSelectLimit = 100;

QgsPostgresConn *QgsPostgresConn::connectDb( QString conninfo, bool readonly, bool shared , bool transaction )
QgsPostgresConn *QgsPostgresConn::connectDb( QString conninfo, bool readonly, bool shared, bool transaction )
{
QMap<QString, QgsPostgresConn *> &connections =
readonly ? QgsPostgresConn::sConnectionsRO : QgsPostgresConn::sConnectionsRW;
Expand Down Expand Up @@ -164,7 +164,7 @@ QgsPostgresConn *QgsPostgresConn::connectDb( QString conninfo, bool readonly, bo
return conn;
}

QgsPostgresConn::QgsPostgresConn( QString conninfo, bool readOnly, bool shared , bool transaction )
QgsPostgresConn::QgsPostgresConn( QString conninfo, bool readOnly, bool shared, bool transaction )
: mRef( 1 )
, mOpenCursors( 0 )
, mConnInfo( conninfo )
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgrestransaction.cpp
Expand Up @@ -26,7 +26,7 @@ QgsPostgresTransaction::QgsPostgresTransaction( const QString &connString )

}

bool QgsPostgresTransaction::beginTransaction( QString &error , int statementTimeout )
bool QgsPostgresTransaction::beginTransaction( QString &error, int statementTimeout )
{
mConn = QgsPostgresConn::connectDb( mConnString, false /*readonly*/, false /*shared*/, true /*transaction*/ );

Expand Down
2 changes: 1 addition & 1 deletion src/providers/wcs/qgswcsdataitems.cpp
Expand Up @@ -24,7 +24,7 @@
#include <QFileInfo>
#include <QSettings>

QgsWCSConnectionItem::QgsWCSConnectionItem( QgsDataItem* parent, QString name, QString path , QString uri )
QgsWCSConnectionItem::QgsWCSConnectionItem( QgsDataItem* parent, QString name, QString path, QString uri )
: QgsDataCollectionItem( parent, name, path )
, mUri( uri )
{
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wfs/qgswfsdataitems.cpp
Expand Up @@ -38,7 +38,7 @@ QgsWFSLayerItem::~QgsWFSLayerItem()

////

QgsWFSConnectionItem::QgsWFSConnectionItem( QgsDataItem* parent, QString name, QString path , QString uri )
QgsWFSConnectionItem::QgsWFSConnectionItem( QgsDataItem* parent, QString name, QString path, QString uri )
: QgsDataCollectionItem( parent, name, path )
, mUri( uri )
, mCapabilities( NULL )
Expand Down
2 changes: 1 addition & 1 deletion src/server/qgis_map_serv.cpp
Expand Up @@ -429,7 +429,7 @@ int main( int argc, char * argv[] )
}
else
{
QgsWMSServer wmsServer( configFilePath, parameterMap, p, theRequestHandler.data() , theMapRenderer.data(), &capabilitiesCache );
QgsWMSServer wmsServer( configFilePath, parameterMap, p, theRequestHandler.data(), theMapRenderer.data(), &capabilitiesCache );
wmsServer.executeRequest();
}
}
Expand Down
8 changes: 4 additions & 4 deletions tests/src/core/testqgsclipper.cpp
Expand Up @@ -55,11 +55,11 @@ void TestQgsClipper::basic()
QgsClipper::trimPolygon( polygon, clipRect );

// Check nothing sticks out.
QVERIFY( checkBoundingBox( polygon , clipRect ) );
QVERIFY( checkBoundingBox( polygon, clipRect ) );
// Check that it didn't clip too much
QgsRectangle clipRectInner( clipRect );
clipRectInner.scale( 0.999 );
QVERIFY( ! checkBoundingBox( polygon , clipRectInner ) );
QVERIFY( ! checkBoundingBox( polygon, clipRectInner ) );

// A more complex example
polygon.clear();
Expand All @@ -71,11 +71,11 @@ void TestQgsClipper::basic()
// We should have 5 vertices now?
QCOMPARE( polygon.size(), 5 );
// Check nothing sticks out.
QVERIFY( checkBoundingBox( polygon , clipRect ) );
QVERIFY( checkBoundingBox( polygon, clipRect ) );
// Check that it didn't clip too much
clipRectInner = clipRect;
clipRectInner.scale( 0.999 );
QVERIFY( ! checkBoundingBox( polygon , clipRectInner ) );
QVERIFY( ! checkBoundingBox( polygon, clipRectInner ) );
};

bool TestQgsClipper::checkBoundingBox( QPolygonF polygon, QgsRectangle clipRect )
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgsexpression.cpp
Expand Up @@ -1071,7 +1071,7 @@ class TestQgsExpression: public QObject
QgsExpression e( string );
QVERIFY( !e.hasParserError() );
qDebug() << e.expression();
QCOMPARE( e.expression() , QgsExpression( e.expression() ).expression() );
QCOMPARE( e.expression(), QgsExpression( e.expression() ).expression() );
}

void quote_string()
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgsgeometry.cpp
Expand Up @@ -505,7 +505,7 @@ void TestQgsGeometry::bufferCheck()
dumpPolygon( myPolygon );
QVERIFY( renderCheck( "geometry_bufferCheck", "Checking buffer(10,10) of B", 10 ) );
}
bool TestQgsGeometry::renderCheck( QString theTestName, QString theComment , int mismatchCount )
bool TestQgsGeometry::renderCheck( QString theTestName, QString theComment, int mismatchCount )
{
mReport += "<h2>" + theTestName + "</h2>\n";
mReport += "<h3>" + theComment + "</h3>\n";
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgsimageoperation.cpp
Expand Up @@ -85,7 +85,7 @@ class TestQgsImageOperation : public QObject
QString mReport;
QString mSampleImage;

bool imageCheck( QString testName , QImage &image, int mismatchCount );
bool imageCheck( QString testName, QImage &image, int mismatchCount );
};

void TestQgsImageOperation::initTestCase()
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgsmapsettings.cpp
Expand Up @@ -38,7 +38,7 @@ QString TestQgsMapSettings::toString( const QPolygonF& p, int dec ) const
{
QString s;
const char *sep = "";
double r = pow( 10, dec );
double r = pow( 10.0, dec );
for ( int i = 0; i < p.size(); ++i )
{
s += QString( "%1%2 %3" ).arg( sep )
Expand Down
4 changes: 2 additions & 2 deletions tests/src/core/testqgspointlocator.cpp
Expand Up @@ -244,13 +244,13 @@ class TestQgsPointLocator : public QObject
void testExtent()
{
QgsRectangle bbox1( 10, 10, 11, 11 ); // out of layer's bounds
QgsPointLocator loc1( mVL, 0 , &bbox1 );
QgsPointLocator loc1( mVL, 0, &bbox1 );

QgsPointLocator::Match m1 = loc1.nearestVertex( QgsPoint( 2, 2 ), 999 );
QVERIFY( !m1.isValid() );

QgsRectangle bbox2( 0, 0, 1, 1 ); // in layer's bounds
QgsPointLocator loc2( mVL, 0 , &bbox2 );
QgsPointLocator loc2( mVL, 0, &bbox2 );

QgsPointLocator::Match m2 = loc2.nearestVertex( QgsPoint( 2, 2 ), 999 );
QVERIFY( m2.isValid() );
Expand Down

0 comments on commit a264a27

Please sign in to comment.