Skip to content

Commit a264a27

Browse files
committed
fix windows build (pow called with an integer) and comma cosmetics
1 parent 2e9cc1a commit a264a27

19 files changed

+24
-24
lines changed

src/app/qgisapp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2748,7 +2748,7 @@ void QgisApp::addLayerDefinition()
27482748
openLayerDefinition( path );
27492749
}
27502750

2751-
QString QgisApp::crsAndFormatAdjustedLayerUri( const QString &uri , const QStringList &supportedCrs, const QStringList &supportedFormats ) const
2751+
QString QgisApp::crsAndFormatAdjustedLayerUri( const QString &uri, const QStringList &supportedCrs, const QStringList &supportedFormats ) const
27522752
{
27532753
QString newuri = uri;
27542754

src/app/qgsadvanceddigitizingcanvasitem.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "qgsmapcanvas.h"
2121

2222

23-
QgsAdvancedDigitizingCanvasItem::QgsAdvancedDigitizingCanvasItem( QgsMapCanvas* canvas , QgsAdvancedDigitizingDockWidget* cadDockWidget )
23+
QgsAdvancedDigitizingCanvasItem::QgsAdvancedDigitizingCanvasItem( QgsMapCanvas* canvas, QgsAdvancedDigitizingDockWidget* cadDockWidget )
2424
: QgsMapCanvasItem( canvas )
2525
, mLockedPen( QPen( QColor( 100, 100, 255, 255 ), .7, Qt::DashLine ) )
2626
, mConstruction1Pen( QPen( QColor( 100, 255, 100, 150 ), .7, Qt::DashLine ) )

src/app/qgsadvanceddigitizingdockwidget.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ bool QgsAdvancedDigitizingDockWidget::lineCircleIntersection( const QgsPoint& ce
4646
const double dr = sqrt( pow( dx, 2 ) + pow( dy, 2 ) );
4747
const double d = x1 * y2 - x2 * y1;
4848

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

5151
if ( disc < 0 )
5252
{

src/app/qgsmapmouseevent.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "qgisapp.h"
2222
#include "qgssnappingutils.h"
2323

24-
QgsMapMouseEvent::QgsMapMouseEvent( QgsMapToolAdvancedDigitizing* mapTool, QMouseEvent* event , SnappingMode mode )
24+
QgsMapMouseEvent::QgsMapMouseEvent( QgsMapToolAdvancedDigitizing* mapTool, QMouseEvent* event, SnappingMode mode )
2525
: QMouseEvent( event->type(), event->pos(), event->globalPos(), event->button(), event->buttons(), event->modifiers() )
2626
, mMapPoint( mapTool->canvas()->mapSettings().mapToPixel().toMapCoordinates( event->pos() ) )
2727
, mMapTool( mapTool )

src/core/qgsdataitem.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ QgsDataItem::QgsDataItem( QgsDataItem::Type type, QgsDataItem* parent, QString n
172172

173173
QgsDataItem::~QgsDataItem()
174174
{
175-
QgsDebugMsgLevel( QString( "mName = %1 mPath = %2 mChildren.size() = %3" ).arg( mName ).arg( mPath ).arg( mChildren.size() ) , 2 );
175+
QgsDebugMsgLevel( QString( "mName = %1 mPath = %2 mChildren.size() = %3" ).arg( mName ).arg( mPath ).arg( mChildren.size() ), 2 );
176176
foreach ( QgsDataItem *child, mChildren )
177177
{
178178
if ( !child ) // should not happen

src/gui/editorwidgets/qgsdoublespinbox.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void QgsDoubleSpinBox::clear()
7979
setValue( clearValue() );
8080
}
8181

82-
void QgsDoubleSpinBox::setClearValue( double customValue , QString specialValueText )
82+
void QgsDoubleSpinBox::setClearValue( double customValue, QString specialValueText )
8383
{
8484
mClearValueMode = CustomValue;
8585
mCustomClearValue = customValue;

src/gui/qgscolorwidgets.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ void QgsColorBox::paintEvent( QPaintEvent *event )
769769
painter.setPen( Qt::NoPen );
770770

771771
painter.drawRect( xPos - 1, mMargin, 3, height() - 2 * mMargin - 1 );
772-
painter.drawRect( mMargin, yPos - 1 , width() - 2 * mMargin - 1, 3 );
772+
painter.drawRect( mMargin, yPos - 1, width() - 2 * mMargin - 1, 3 );
773773
painter.setPen( Qt::black );
774774
painter.drawLine( xPos, mMargin, xPos, height() - mMargin - 1 );
775775
painter.drawLine( mMargin, yPos, width() - mMargin - 1, yPos );

src/gui/qgsmaplayeractionregistry.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ QgsMapLayerAction::QgsMapLayerAction( QString name, QObject* parent, Targets tar
2626
}
2727

2828
/**Creates a map layer action which can run only on a specific layer*/
29-
QgsMapLayerAction::QgsMapLayerAction( QString name, QObject* parent, QgsMapLayer* layer , Targets targets, QIcon icon )
29+
QgsMapLayerAction::QgsMapLayerAction( QString name, QObject* parent, QgsMapLayer* layer, Targets targets, QIcon icon )
3030
: QAction( icon, name, parent )
3131
, mSingleLayer( true )
3232
, mActionLayer( layer )

src/providers/postgres/qgspostgresconn.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ QMap<QString, QgsPostgresConn *> QgsPostgresConn::sConnectionsRO;
133133
QMap<QString, QgsPostgresConn *> QgsPostgresConn::sConnectionsRW;
134134
const int QgsPostgresConn::sGeomTypeSelectLimit = 100;
135135

136-
QgsPostgresConn *QgsPostgresConn::connectDb( QString conninfo, bool readonly, bool shared , bool transaction )
136+
QgsPostgresConn *QgsPostgresConn::connectDb( QString conninfo, bool readonly, bool shared, bool transaction )
137137
{
138138
QMap<QString, QgsPostgresConn *> &connections =
139139
readonly ? QgsPostgresConn::sConnectionsRO : QgsPostgresConn::sConnectionsRW;
@@ -164,7 +164,7 @@ QgsPostgresConn *QgsPostgresConn::connectDb( QString conninfo, bool readonly, bo
164164
return conn;
165165
}
166166

167-
QgsPostgresConn::QgsPostgresConn( QString conninfo, bool readOnly, bool shared , bool transaction )
167+
QgsPostgresConn::QgsPostgresConn( QString conninfo, bool readOnly, bool shared, bool transaction )
168168
: mRef( 1 )
169169
, mOpenCursors( 0 )
170170
, mConnInfo( conninfo )

src/providers/postgres/qgspostgrestransaction.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ QgsPostgresTransaction::QgsPostgresTransaction( const QString &connString )
2626

2727
}
2828

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

src/providers/wcs/qgswcsdataitems.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <QFileInfo>
2525
#include <QSettings>
2626

27-
QgsWCSConnectionItem::QgsWCSConnectionItem( QgsDataItem* parent, QString name, QString path , QString uri )
27+
QgsWCSConnectionItem::QgsWCSConnectionItem( QgsDataItem* parent, QString name, QString path, QString uri )
2828
: QgsDataCollectionItem( parent, name, path )
2929
, mUri( uri )
3030
{

src/providers/wfs/qgswfsdataitems.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ QgsWFSLayerItem::~QgsWFSLayerItem()
3838

3939
////
4040

41-
QgsWFSConnectionItem::QgsWFSConnectionItem( QgsDataItem* parent, QString name, QString path , QString uri )
41+
QgsWFSConnectionItem::QgsWFSConnectionItem( QgsDataItem* parent, QString name, QString path, QString uri )
4242
: QgsDataCollectionItem( parent, name, path )
4343
, mUri( uri )
4444
, mCapabilities( NULL )

src/server/qgis_map_serv.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ int main( int argc, char * argv[] )
429429
}
430430
else
431431
{
432-
QgsWMSServer wmsServer( configFilePath, parameterMap, p, theRequestHandler.data() , theMapRenderer.data(), &capabilitiesCache );
432+
QgsWMSServer wmsServer( configFilePath, parameterMap, p, theRequestHandler.data(), theMapRenderer.data(), &capabilitiesCache );
433433
wmsServer.executeRequest();
434434
}
435435
}

tests/src/core/testqgsclipper.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ void TestQgsClipper::basic()
5555
QgsClipper::trimPolygon( polygon, clipRect );
5656

5757
// Check nothing sticks out.
58-
QVERIFY( checkBoundingBox( polygon , clipRect ) );
58+
QVERIFY( checkBoundingBox( polygon, clipRect ) );
5959
// Check that it didn't clip too much
6060
QgsRectangle clipRectInner( clipRect );
6161
clipRectInner.scale( 0.999 );
62-
QVERIFY( ! checkBoundingBox( polygon , clipRectInner ) );
62+
QVERIFY( ! checkBoundingBox( polygon, clipRectInner ) );
6363

6464
// A more complex example
6565
polygon.clear();
@@ -71,11 +71,11 @@ void TestQgsClipper::basic()
7171
// We should have 5 vertices now?
7272
QCOMPARE( polygon.size(), 5 );
7373
// Check nothing sticks out.
74-
QVERIFY( checkBoundingBox( polygon , clipRect ) );
74+
QVERIFY( checkBoundingBox( polygon, clipRect ) );
7575
// Check that it didn't clip too much
7676
clipRectInner = clipRect;
7777
clipRectInner.scale( 0.999 );
78-
QVERIFY( ! checkBoundingBox( polygon , clipRectInner ) );
78+
QVERIFY( ! checkBoundingBox( polygon, clipRectInner ) );
7979
};
8080

8181
bool TestQgsClipper::checkBoundingBox( QPolygonF polygon, QgsRectangle clipRect )

tests/src/core/testqgsexpression.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ class TestQgsExpression: public QObject
10711071
QgsExpression e( string );
10721072
QVERIFY( !e.hasParserError() );
10731073
qDebug() << e.expression();
1074-
QCOMPARE( e.expression() , QgsExpression( e.expression() ).expression() );
1074+
QCOMPARE( e.expression(), QgsExpression( e.expression() ).expression() );
10751075
}
10761076

10771077
void quote_string()

tests/src/core/testqgsgeometry.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ void TestQgsGeometry::bufferCheck()
505505
dumpPolygon( myPolygon );
506506
QVERIFY( renderCheck( "geometry_bufferCheck", "Checking buffer(10,10) of B", 10 ) );
507507
}
508-
bool TestQgsGeometry::renderCheck( QString theTestName, QString theComment , int mismatchCount )
508+
bool TestQgsGeometry::renderCheck( QString theTestName, QString theComment, int mismatchCount )
509509
{
510510
mReport += "<h2>" + theTestName + "</h2>\n";
511511
mReport += "<h3>" + theComment + "</h3>\n";

tests/src/core/testqgsimageoperation.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class TestQgsImageOperation : public QObject
8585
QString mReport;
8686
QString mSampleImage;
8787

88-
bool imageCheck( QString testName , QImage &image, int mismatchCount );
88+
bool imageCheck( QString testName, QImage &image, int mismatchCount );
8989
};
9090

9191
void TestQgsImageOperation::initTestCase()

tests/src/core/testqgsmapsettings.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ QString TestQgsMapSettings::toString( const QPolygonF& p, int dec ) const
3838
{
3939
QString s;
4040
const char *sep = "";
41-
double r = pow( 10, dec );
41+
double r = pow( 10.0, dec );
4242
for ( int i = 0; i < p.size(); ++i )
4343
{
4444
s += QString( "%1%2 %3" ).arg( sep )

tests/src/core/testqgspointlocator.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,13 @@ class TestQgsPointLocator : public QObject
244244
void testExtent()
245245
{
246246
QgsRectangle bbox1( 10, 10, 11, 11 ); // out of layer's bounds
247-
QgsPointLocator loc1( mVL, 0 , &bbox1 );
247+
QgsPointLocator loc1( mVL, 0, &bbox1 );
248248

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

252252
QgsRectangle bbox2( 0, 0, 1, 1 ); // in layer's bounds
253-
QgsPointLocator loc2( mVL, 0 , &bbox2 );
253+
QgsPointLocator loc2( mVL, 0, &bbox2 );
254254

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

0 commit comments

Comments
 (0)