Skip to content

Commit

Permalink
QStringLiteral
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 16, 2018
1 parent c6db18d commit 51f6fb0
Show file tree
Hide file tree
Showing 231 changed files with 1,177 additions and 1,177 deletions.
8 changes: 4 additions & 4 deletions src/analysis/interpolation/Bezier3D.cpp
Expand Up @@ -46,7 +46,7 @@ void Bezier3D::calcFirstDer( float t, Vector3D *v )

else
{
QgsDebugMsg( "warning: null pointer" );
QgsDebugMsg( QStringLiteral( "warning: null pointer" ) );
}
}

Expand All @@ -70,7 +70,7 @@ void Bezier3D::calcPoint( float t, QgsPoint *p )

else
{
QgsDebugMsg( "warning: null pointer" );
QgsDebugMsg( QStringLiteral( "warning: null pointer" ) );
}
}

Expand Down Expand Up @@ -102,7 +102,7 @@ void Bezier3D::calcSecDer( float t, Vector3D *v )

else
{
QgsDebugMsg( "warning: null pointer" );
QgsDebugMsg( QStringLiteral( "warning: null pointer" ) );
}
}

Expand All @@ -126,7 +126,7 @@ void Bezier3D::changeDirection()//does this work correctly? more testing is need

else
{
QgsDebugMsg( "warning: null pointer" );
QgsDebugMsg( QStringLiteral( "warning: null pointer" ) );
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/analysis/interpolation/Bezier3D.h
Expand Up @@ -82,13 +82,13 @@ inline Bezier3D::Bezier3D( ParametricLine *parent, QVector<QgsPoint *> *controlp
inline void Bezier3D::add( ParametricLine *pl )
{
Q_UNUSED( pl );
QgsDebugMsg( "Error!!!!! A Bezier-curve can not be parent of a ParametricLine." );
QgsDebugMsg( QStringLiteral( "Error!!!!! A Bezier-curve can not be parent of a ParametricLine." ) );
}

inline void Bezier3D::remove( int i )
{
Q_UNUSED( i );
QgsDebugMsg( "Error!!!!! A Bezier-curve has no children to remove." );
QgsDebugMsg( QStringLiteral( "Error!!!!! A Bezier-curve has no children to remove." ) );
}

//-----------------------------------------------setters and getters---------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions src/analysis/interpolation/CloughTocherInterpolator.cpp
Expand Up @@ -34,7 +34,7 @@ double CloughTocherInterpolator::calcBernsteinPoly( int n, int i, int j, int k,
{
if ( i < 0 || j < 0 || k < 0 )
{
QgsDebugMsg( "Invalid parameters for Bernstein poly calculation!" );
QgsDebugMsg( QStringLiteral( "Invalid parameters for Bernstein poly calculation!" ) );
return 0;
}

Expand Down Expand Up @@ -146,7 +146,7 @@ bool CloughTocherInterpolator::calcNormVec( double x, double y, Vector3D *result
}
else
{
QgsDebugMsg( "warning, null pointer" );
QgsDebugMsg( QStringLiteral( "warning, null pointer" ) );
return false;
}
}
Expand Down Expand Up @@ -459,7 +459,7 @@ void CloughTocherInterpolator::init( double x, double y )//version, which has th
}
else
{
QgsDebugMsg( "warning, null pointer" );
QgsDebugMsg( QStringLiteral( "warning, null pointer" ) );
}
}

Expand Down Expand Up @@ -728,7 +728,7 @@ void CloughTocherInterpolator::init( double x, double y )//version which has uni

else
{
QgsDebugMsg( "warning, null pointer" );
QgsDebugMsg( QStringLiteral( "warning, null pointer" ) );
}
}
#endif
Expand Down
46 changes: 23 additions & 23 deletions src/analysis/interpolation/DualEdgeTriangulation.cpp
Expand Up @@ -48,22 +48,22 @@ DualEdgeTriangulation::~DualEdgeTriangulation()

void DualEdgeTriangulation::performConsistencyTest()
{
QgsDebugMsg( "performing consistency test" );
QgsDebugMsg( QStringLiteral( "performing consistency test" ) );

for ( int i = 0; i < mHalfEdge.count(); i++ )
{
int a = mHalfEdge[mHalfEdge[i]->getDual()]->getDual();
int b = mHalfEdge[mHalfEdge[mHalfEdge[i]->getNext()]->getNext()]->getNext();
if ( i != a )
{
QgsDebugMsg( "warning, first test failed" );
QgsDebugMsg( QStringLiteral( "warning, first test failed" ) );
}
if ( i != b )
{
QgsDebugMsg( "warning, second test failed" );
QgsDebugMsg( QStringLiteral( "warning, second test failed" ) );
}
}
QgsDebugMsg( "consistency test finished" );
QgsDebugMsg( QStringLiteral( "consistency test finished" ) );
}

void DualEdgeTriangulation::addLine( const QVector<QgsPoint> &points, QgsInterpolator::SourceType lineType )
Expand Down Expand Up @@ -134,7 +134,7 @@ int DualEdgeTriangulation::addPoint( const QgsPoint &p )
//test, if it is the same point as the first point
if ( p.x() == mPointVector[0]->x() && p.y() == mPointVector[0]->y() )
{
QgsDebugMsg( "second point is the same as the first point, it thus has not been inserted" );
QgsDebugMsg( QStringLiteral( "second point is the same as the first point, it thus has not been inserted" ) );
QgsPoint *p = mPointVector[1];
mPointVector.remove( 1 );
delete p;
Expand Down Expand Up @@ -200,7 +200,7 @@ int DualEdgeTriangulation::addPoint( const QgsPoint &p )
else//p is in a line with p0 and p1
{
mPointVector.remove( mPointVector.count() - 1 );
QgsDebugMsg( "error: third point is on the same line as the first and the second point. It thus has not been inserted into the triangulation" );
QgsDebugMsg( QStringLiteral( "error: third point is on the same line as the first and the second point. It thus has not been inserted into the triangulation" ) );
return -100;
}
}
Expand Down Expand Up @@ -392,7 +392,7 @@ int DualEdgeTriangulation::baseEdgeOfPoint( int point )
control += 1;
if ( control > 1000000 )
{
// QgsDebugMsg( "warning, endless loop" );
// QgsDebugMsg( QStringLiteral( "warning, endless loop" ) );

//use the secure and slow method
//qWarning( "******************warning, using the slow method in baseEdgeOfPoint****************************************" );
Expand Down Expand Up @@ -626,7 +626,7 @@ bool DualEdgeTriangulation::calcNormal( double x, double y, Vector3D *result )
}
else
{
QgsDebugMsg( "warning, null pointer" );
QgsDebugMsg( QStringLiteral( "warning, null pointer" ) );
return false;
}
}
Expand All @@ -639,7 +639,7 @@ bool DualEdgeTriangulation::calcPoint( double x, double y, QgsPoint &result )
}
else
{
QgsDebugMsg( "warning, null pointer" );
QgsDebugMsg( QStringLiteral( "warning, null pointer" ) );
return false;
}
}
Expand Down Expand Up @@ -1167,7 +1167,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, QgsInterpolator:
control += 1;
if ( control > 17000 )
{
QgsDebugMsg( "warning, endless loop" );
QgsDebugMsg( QStringLiteral( "warning, endless loop" ) );
return -100;//return an error code
}

Expand Down Expand Up @@ -1534,7 +1534,7 @@ void DualEdgeTriangulation::setTriangleInterpolator( TriangleInterpolator *inter

void DualEdgeTriangulation::eliminateHorizontalTriangles()
{
QgsDebugMsg( "am in eliminateHorizontalTriangles" );
QgsDebugMsg( QStringLiteral( "am in eliminateHorizontalTriangles" ) );
double minangle = 0;//minimum angle for swapped triangles. If triangles generated by a swap would have a minimum angle (in degrees) below that value, the swap will not be done.

while ( true )
Expand Down Expand Up @@ -1618,7 +1618,7 @@ void DualEdgeTriangulation::eliminateHorizontalTriangles()
delete[] control;
}

QgsDebugMsg( "end of method" );
QgsDebugMsg( QStringLiteral( "end of method" ) );
}

void DualEdgeTriangulation::ruppertRefinement()
Expand Down Expand Up @@ -1714,7 +1714,7 @@ void DualEdgeTriangulation::ruppertRefinement()
//calculate the circumcenter
if ( !MathUtils::circumcenter( mPointVector[mHalfEdge[minedge]->getPoint()], mPointVector[mHalfEdge[minedgenext]->getPoint()], mPointVector[mHalfEdge[minedgenextnext]->getPoint()], &circumcenter ) )
{
QgsDebugMsg( "warning, calculation of circumcenter failed" );
QgsDebugMsg( QStringLiteral( "warning, calculation of circumcenter failed" ) );
//put all three edges to dontexamine and remove them from the other maps
dontexamine.insert( minedge );
edge_angle.erase( minedge );
Expand Down Expand Up @@ -1757,7 +1757,7 @@ void DualEdgeTriangulation::ruppertRefinement()
{
encroached = true;
//split segment
QgsDebugMsg( "segment split" );
QgsDebugMsg( QStringLiteral( "segment split" ) );
int pointno = splitHalfEdge( i, 0.5 );

//update dontexmine, angle_edge, edge_angle
Expand Down Expand Up @@ -1963,7 +1963,7 @@ void DualEdgeTriangulation::ruppertRefinement()
if ( ( mHalfEdge[*it]->getForced() || edgeOnConvexHull( *it ) ) && MathUtils::inDiametral( mPointVector[mHalfEdge[*it]->getPoint()], mPointVector[mHalfEdge[mHalfEdge[*it]->getDual()]->getPoint()], &circumcenter ) )
{
//split segment
QgsDebugMsg( "segment split" );
QgsDebugMsg( QStringLiteral( "segment split" ) );
int pointno = splitHalfEdge( *it, 0.5 );
encroached = true;

Expand Down Expand Up @@ -2142,7 +2142,7 @@ void DualEdgeTriangulation::ruppertRefinement()
}
if ( !flag )
{
QgsDebugMsg( "point is not present in the triangulation" );
QgsDebugMsg( QStringLiteral( "point is not present in the triangulation" ) );
}
}
//put all three edges to dontexamine and remove them from the other maps
Expand All @@ -2158,7 +2158,7 @@ void DualEdgeTriangulation::ruppertRefinement()
}
else//insertion successful
{
QgsDebugMsg( "circumcenter added" );
QgsDebugMsg( QStringLiteral( "circumcenter added" ) );

//update the maps
//go around the inserted point and make changes for every half edge
Expand Down Expand Up @@ -2480,7 +2480,7 @@ void DualEdgeTriangulation::triangulatePolygon( QList<int> *poly, QList<int> *fr

else
{
QgsDebugMsg( "warning, null pointer" );
QgsDebugMsg( QStringLiteral( "warning, null pointer" ) );
}

}
Expand Down Expand Up @@ -2557,7 +2557,7 @@ bool DualEdgeTriangulation::pointInside( double x, double y )
}
if ( numinstabs > 0 )//a numerical instability occurred
{
QgsDebugMsg( "numerical instabilities" );
QgsDebugMsg( QStringLiteral( "numerical instabilities" ) );
return true;
}

Expand Down Expand Up @@ -2964,13 +2964,13 @@ QList<int> *DualEdgeTriangulation::getPointsAroundEdge( double x, double y )
}
else
{
QgsDebugMsg( "warning: null pointer" );
QgsDebugMsg( QStringLiteral( "warning: null pointer" ) );
return nullptr;
}
}
else
{
QgsDebugMsg( "Edge number negative" );
QgsDebugMsg( QStringLiteral( "Edge number negative" ) );
return nullptr;
}
}
Expand All @@ -2985,7 +2985,7 @@ bool DualEdgeTriangulation::saveTriangulation( QgsFeatureSink *sink, QgsFeedback
bool *alreadyVisitedEdges = new bool[mHalfEdge.size()];
if ( !alreadyVisitedEdges )
{
QgsDebugMsg( "out of memory" );
QgsDebugMsg( QStringLiteral( "out of memory" ) );
return false;
}

Expand Down Expand Up @@ -3083,7 +3083,7 @@ int DualEdgeTriangulation::splitHalfEdge( int edge, float position )
//just a short test if position is between 0 and 1
if ( position < 0 || position > 1 )
{
QgsDebugMsg( "warning, position is not between 0 and 1" );
QgsDebugMsg( QStringLiteral( "warning, position is not between 0 and 1" ) );
}

//create the new point on the heap
Expand Down
8 changes: 4 additions & 4 deletions src/analysis/interpolation/LinTriangleInterpolator.cpp
Expand Up @@ -39,7 +39,7 @@ bool LinTriangleInterpolator::calcFirstDerX( double x, double y, Vector3D *vec )

else
{
QgsDebugMsg( "warning, null pointer" );
QgsDebugMsg( QStringLiteral( "warning, null pointer" ) );
return false;
}
}
Expand All @@ -65,7 +65,7 @@ bool LinTriangleInterpolator::calcFirstDerY( double x, double y, Vector3D *vec )

else
{
QgsDebugMsg( "warning, null pointer" );
QgsDebugMsg( QStringLiteral( "warning, null pointer" ) );
return false;
}
}
Expand All @@ -91,7 +91,7 @@ bool LinTriangleInterpolator::calcNormVec( double x, double y, Vector3D *vec )

else
{
QgsDebugMsg( "warning, null pointer" );
QgsDebugMsg( QStringLiteral( "warning, null pointer" ) );
return false;
}

Expand Down Expand Up @@ -121,7 +121,7 @@ bool LinTriangleInterpolator::calcPoint( double x, double y, QgsPoint &point )
}
else
{
QgsDebugMsg( "warning, null pointer" );
QgsDebugMsg( QStringLiteral( "warning, null pointer" ) );
return false;
}

Expand Down

0 comments on commit 51f6fb0

Please sign in to comment.