Skip to content

Commit 65e2dda

Browse files
committed
Update indentation
1 parent 3703bf7 commit 65e2dda

File tree

5 files changed

+64
-64
lines changed

5 files changed

+64
-64
lines changed

src/app/qgstipfactory.cpp

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ QgsTipFactory::QgsTipFactory() : QObject()
9999
" which can be found in the tab <strong>%2</strong>."
100100
" The other move tool ( <img src=\":/images/themes/default/mActionMoveItemContent.svg\"/> )"
101101
" allows you to move the map content within a map frame." )
102-
.arg( tr( "Position and Size" ) )
103-
.arg( tr( "Item Properties" ) )
104-
);
102+
.arg( tr( "Position and Size" ) )
103+
.arg( tr( "Item Properties" ) )
104+
);
105105
addGuiTip( myTip );
106106
addGuiTip( myTip );
107107
// This tip contributed by Andreas Neumann
@@ -125,9 +125,9 @@ QgsTipFactory::QgsTipFactory() : QObject()
125125
" checkbox and selecting a map frame. Whenever you change the rotation"
126126
" value of a linked map, the north arrow will now automatically adjust"
127127
" its rotation." )
128-
.arg( tr( "Add Image" ) )
129-
.arg( tr( "Sync with map" ) )
130-
);
128+
.arg( tr( "Add Image" ) )
129+
.arg( tr( "Sync with map" ) )
130+
);
131131
addGuiTip( myTip );
132132
addGuiTip( myTip );
133133
// This tip contributed by Andreas Neumann
@@ -144,9 +144,9 @@ QgsTipFactory::QgsTipFactory() : QObject()
144144
" out and pan the map. Scroll forwards to zoom in, scroll backwards to"
145145
" zoom out and press and hold the scroll wheel down to pan the map. You"
146146
" can configure the zoom scale factor in the <strong> %1 -> %2 </strong> panel." )
147-
.arg( tr( "Options" ) )
148-
.arg( tr( "Map tools" ) )
149-
);
147+
.arg( tr( "Options" ) )
148+
.arg( tr( "Map tools" ) )
149+
);
150150
addGuiTip( myTip );
151151
addGuiTip( myTip );
152152
// by Tim
@@ -196,9 +196,9 @@ QgsTipFactory::QgsTipFactory() : QObject()
196196
" contributed by the user community that can be"
197197
" installed via this same menu. Don't miss out on all QGIS has to offer!"
198198
" Check out the plugins and see what they can do for you." )
199-
.arg( tr( "Plugins" ) )
200-
.arg( tr( "Manage and Install Plugins..." ) )
201-
);
199+
.arg( tr( "Plugins" ) )
200+
.arg( tr( "Manage and Install Plugins..." ) )
201+
);
202202
addGuiTip( myTip );
203203
addGenericTip( myTip );
204204
// by yjacolin
@@ -232,11 +232,11 @@ QgsTipFactory::QgsTipFactory() : QObject()
232232
myTip.setContent( tr( "If you have a number of aerial photos spread across a wide area, instead of "
233233
"loading each file as a separate layer you can treat them all as a single layer "
234234
"by using a .vrt file. "
235-
"To create a .vrt, go to <strong> %1 -> %2 -> %3</strong>.")
236-
.arg( tr( "Raster" ) )
237-
.arg( tr( "Miscellaneous" ) )
238-
.arg( tr( "Build Virtual Raster (Catalog)" ) )
239-
);
235+
"To create a .vrt, go to <strong> %1 -> %2 -> %3</strong>." )
236+
.arg( tr( "Raster" ) )
237+
.arg( tr( "Miscellaneous" ) )
238+
.arg( tr( "Build Virtual Raster (Catalog)" ) )
239+
);
240240
addGuiTip( myTip );
241241
// by Harrissou Sant-anna
242242
myTip.setTitle( tr( "Switch quickly between different styles of the layer" ) );
@@ -245,17 +245,17 @@ QgsTipFactory::QgsTipFactory() : QObject()
245245
" diagram, fields form, actions...) as you want. Then, simply switch between styles"
246246
" from the context menu of the layer in <strong>%1</strong> to automatically"
247247
" get different custom representations of your data." )
248-
.arg( tr( "Layers Panel" ) )
249-
);
248+
.arg( tr( "Layers Panel" ) )
249+
);
250250
addGuiTip( myTip );
251251
// by Harrissou Sant-anna
252252
myTip.setTitle( tr( "Live update rendering" ) );
253253
myTip.setContent( tr( "Press F7 to activate the <strong>%1</strong> panel from which you can"
254254
" easily and quickly configure the layer rendering. Check the <strong>%2</strong>"
255255
" option to automatically apply to the map canvas each of your modifications." )
256-
.arg( tr( "Layer Styling" ) )
257-
.arg( tr( "Live update" ) )
258-
);
256+
.arg( tr( "Layer Styling" ) )
257+
.arg( tr( "Live update" ) )
258+
);
259259
addGuiTip( myTip );
260260
// by Harrissou Sant-anna
261261
myTip.setTitle( tr( "Print or export a specific feature from an atlas composition" ) );
@@ -278,9 +278,9 @@ QgsTipFactory::QgsTipFactory() : QObject()
278278
myTip.setContent( tr( "QGIS provides you with a list of predefined shortcuts you can use to speed"
279279
" your workflow. These are available under <strong> %1 -> %2 </strong>"
280280
" menu and can be extended and customized for any dialog or tool." )
281-
.arg( tr( "Settings" ) )
282-
.arg( tr( "Keyboard Shortcuts" ) )
283-
);
281+
.arg( tr( "Settings" ) )
282+
.arg( tr( "Keyboard Shortcuts" ) )
283+
);
284284
addGuiTip( myTip );
285285

286286
/* Template for adding more tips

src/core/geometry/qgsgeometryutils.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -819,29 +819,29 @@ QStringList QgsGeometryUtils::wktGetChildBlocks( const QString &wkt, const QStri
819819
return blocks;
820820
}
821821

822-
QgsPointV2 QgsGeometryUtils::midpoint(const QgsPointV2 &pt1, const QgsPointV2 &pt2)
822+
QgsPointV2 QgsGeometryUtils::midpoint( const QgsPointV2 &pt1, const QgsPointV2 &pt2 )
823823
{
824-
QgsWkbTypes::Type pType( QgsWkbTypes::Point );
824+
QgsWkbTypes::Type pType( QgsWkbTypes::Point );
825825

826826

827-
double x = ( pt1.x() + pt2.x() ) / 2.0;
828-
double y = ( pt1.y() + pt2.y() ) / 2.0;
829-
double z = 0.0;
830-
double m = 0.0;
827+
double x = ( pt1.x() + pt2.x() ) / 2.0;
828+
double y = ( pt1.y() + pt2.y() ) / 2.0;
829+
double z = 0.0;
830+
double m = 0.0;
831831

832-
if ( pt1.is3D() || pt2.is3D() )
833-
{
834-
pType = QgsWkbTypes::addZ( pType );
835-
z = ( pt1.z() + pt2.z()) / 2.0;
836-
}
832+
if ( pt1.is3D() || pt2.is3D() )
833+
{
834+
pType = QgsWkbTypes::addZ( pType );
835+
z = ( pt1.z() + pt2.z() ) / 2.0;
836+
}
837837

838-
if ( pt1.isMeasure() || pt2.isMeasure() )
839-
{
840-
pType = QgsWkbTypes::addM( pType );
841-
m = ( pt1.m() + pt2.m()) / 2.0;
842-
}
838+
if ( pt1.isMeasure() || pt2.isMeasure() )
839+
{
840+
pType = QgsWkbTypes::addM( pType );
841+
m = ( pt1.m() + pt2.m() ) / 2.0;
842+
}
843843

844-
return QgsPointV2( pType, x, y, z, m );
844+
return QgsPointV2( pType, x, y, z, m );
845845
}
846846

847847
double QgsGeometryUtils::lineAngle( double x1, double y1, double x2, double y2 )

src/core/geometry/qgspointv2.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -438,40 +438,40 @@ QPointF QgsPointV2::toQPointF() const
438438

439439
double QgsPointV2::distance( double x, double y ) const
440440
{
441-
return sqrt( ( mX - x ) * ( mX - x ) + ( mY - y ) * ( mY - y ) );
441+
return sqrt(( mX - x ) * ( mX - x ) + ( mY - y ) * ( mY - y ) );
442442
}
443443

444444
double QgsPointV2::distance( const QgsPointV2& other ) const
445445
{
446-
return sqrt( ( mX - other.x() ) * ( mX - other.x() ) + ( mY - other.y() ) * ( mY - other.y() ) );
446+
return sqrt(( mX - other.x() ) * ( mX - other.x() ) + ( mY - other.y() ) * ( mY - other.y() ) );
447447
}
448448

449449
double QgsPointV2::distanceSquared( double x, double y ) const
450450
{
451451
return ( mX - x ) * ( mX - x ) + ( mY - y ) * ( mY - y );
452452
}
453453

454-
double QgsPointV2::distanceSquared( const QgsPointV2& other) const
454+
double QgsPointV2::distanceSquared( const QgsPointV2& other ) const
455455
{
456456
return ( mX - other.x() ) * ( mX - other.x() ) + ( mY - other.y() ) * ( mY - other.y() ) ;
457457
}
458458

459459
double QgsPointV2::distance3D( double x, double y, double z ) const
460460
{
461-
return sqrt( ( mX - x ) * ( mX - x ) + ( mY - y ) * ( mY - y ) + ( mZ - z ) * ( mZ - z ) );
461+
return sqrt(( mX - x ) * ( mX - x ) + ( mY - y ) * ( mY - y ) + ( mZ - z ) * ( mZ - z ) );
462462
}
463463

464464
double QgsPointV2::distance3D( const QgsPointV2& other ) const
465465
{
466-
return sqrt( ( mX - other.x() ) * ( mX - other.x() ) + ( mY - other.y() ) * ( mY - other.y() ) + ( mZ - other.z() ) * ( mZ - other.z() ) );
466+
return sqrt(( mX - other.x() ) * ( mX - other.x() ) + ( mY - other.y() ) * ( mY - other.y() ) + ( mZ - other.z() ) * ( mZ - other.z() ) );
467467
}
468468

469469
double QgsPointV2::distanceSquared3D( double x, double y, double z ) const
470470
{
471471
return ( mX - x ) * ( mX - x ) + ( mY - y ) * ( mY - y ) + ( mZ - z ) * ( mZ - z );
472472
}
473473

474-
double QgsPointV2::distanceSquared3D( const QgsPointV2& other) const
474+
double QgsPointV2::distanceSquared3D( const QgsPointV2& other ) const
475475
{
476476
return ( mX - other.x() ) * ( mX - other.x() ) + ( mY - other.y() ) * ( mY - other.y() ) + ( mZ - other.z() ) * ( mZ - other.z() );
477477
}

tests/src/core/testqgsgeometry.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -819,23 +819,23 @@ void TestQgsGeometry::point()
819819
QCOMPARE( QgsPointV2( 1, -2 ).distanceSquared( 1, -4 ), 4.0 );
820820

821821
// distance 3D
822-
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( QgsPointV2( 1, 1 )), 2.0 );
823-
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( 1, 1, 0 ), 2.0 );
824-
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( QgsPointV2 ( QgsWkbTypes::PointZ, 2, 2, 2, 0 )), 12.0 );
825-
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( 2, 2, 2 ), 12.0 );
826-
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2, 0 ).distanceSquared3D( QgsPointV2( 1, 1 )), 6.0 );
822+
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( QgsPointV2( 1, 1 ) ), 2.0 );
823+
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( 1, 1, 0 ), 2.0 );
824+
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2, 0 ) ), 12.0 );
825+
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( 2, 2, 2 ), 12.0 );
826+
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2, 0 ).distanceSquared3D( QgsPointV2( 1, 1 ) ), 6.0 );
827827
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2, 0 ).distanceSquared3D( 1, 1, 0 ), 6.0 );
828-
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( QgsPointV2( 0, 0 )), 12.0 );
829-
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( 0, 0, 0 ), 12.0 );
830-
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2, 0 )), 48.0 );
828+
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( QgsPointV2( 0, 0 ) ), 12.0 );
829+
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( 0, 0, 0 ), 12.0 );
830+
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2, 0 ) ), 48.0 );
831831
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( 2, 2, 2 ), 48.0 );
832832

833833

834-
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 2, 0 ).distance3D( QgsPointV2( QgsWkbTypes::PointZ, 1, 3, 2, 0 )), 2.0 );
834+
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 2, 0 ).distance3D( QgsPointV2( QgsWkbTypes::PointZ, 1, 3, 2, 0 ) ), 2.0 );
835835
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 2, 0 ).distance3D( 1, 3, 2 ), 2.0 );
836-
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 2, 0 ).distance3D( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 4, 0 )), 2.0 );
836+
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 2, 0 ).distance3D( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 4, 0 ) ), 2.0 );
837837
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 2, 0 ).distance3D( 1, 1, 4 ), 2.0 );
838-
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, -2, 0 ).distance3D( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, -4, 0 )), 2.0 );
838+
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, -2, 0 ).distance3D( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, -4, 0 ) ), 2.0 );
839839
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, -2, 0 ).distance3D( 1, 1, -4 ), 2.0 );
840840

841841
// azimuth

tests/src/core/testqgsgeometryutils.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -542,11 +542,11 @@ void TestQgsGeometryUtils::testAngleThreePoints()
542542

543543
void TestQgsGeometryUtils::testMidPoint()
544544
{
545-
QgsPointV2 p1( 4, 6 );
546-
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( 2, 2 ) ), QgsPointV2( 3, 4 ) );
547-
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2 ) ), QgsPointV2( QgsWkbTypes::PointZ, 3, 4, 1 ) );
548-
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( QgsWkbTypes::PointM, 2, 2, 0, 2 ) ), QgsPointV2( QgsWkbTypes::PointM, 3, 4, 0, 1 ) );
549-
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( QgsWkbTypes::PointZM, 2, 2, 2, 2 ) ), QgsPointV2( QgsWkbTypes::PointZM, 3, 4, 1, 1 ) );
545+
QgsPointV2 p1( 4, 6 );
546+
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( 2, 2 ) ), QgsPointV2( 3, 4 ) );
547+
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2 ) ), QgsPointV2( QgsWkbTypes::PointZ, 3, 4, 1 ) );
548+
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( QgsWkbTypes::PointM, 2, 2, 0, 2 ) ), QgsPointV2( QgsWkbTypes::PointM, 3, 4, 0, 1 ) );
549+
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( QgsWkbTypes::PointZM, 2, 2, 2, 2 ) ), QgsPointV2( QgsWkbTypes::PointZM, 3, 4, 1, 1 ) );
550550
}
551551

552552
QGSTEST_MAIN( TestQgsGeometryUtils )

0 commit comments

Comments
 (0)