Skip to content

Commit 392392b

Browse files
committedSep 18, 2018
Move implementations to cpp
1 parent 32dae28 commit 392392b

File tree

2 files changed

+42
-32
lines changed

2 files changed

+42
-32
lines changed
 

‎src/analysis/vector/geometry_checker/qgsgeometrycheck.cpp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,32 @@ QgsRectangle QgsGeometryCheckError::affectedAreaBBox() const
127127
return mGeometry.boundingBox();
128128
}
129129

130+
void QgsGeometryCheckError::setFixed( int method )
131+
{
132+
mStatus = StatusFixed;
133+
const QStringList methods = mCheck->resolutionMethods();
134+
mResolutionMessage = methods[method];
135+
}
136+
137+
void QgsGeometryCheckError::setFixFailed( const QString &reason )
138+
{
139+
mStatus = StatusFixFailed;
140+
mResolutionMessage = reason;
141+
}
142+
143+
bool QgsGeometryCheckError::isEqual( QgsGeometryCheckError *other ) const
144+
{
145+
return other->check() == check() &&
146+
other->layerId() == layerId() &&
147+
other->featureId() == featureId() &&
148+
other->vidx() == vidx();
149+
}
150+
151+
bool QgsGeometryCheckError::closeMatch( QgsGeometryCheckError * ) const
152+
{
153+
return false;
154+
}
155+
130156
bool QgsGeometryCheckError::handleChanges( const QgsGeometryCheck::Changes &changes )
131157
{
132158
if ( status() == StatusObsolete )
@@ -277,3 +303,14 @@ void QgsGeometryCheck::deleteFeatureGeometryRing( const QString &layerId, QgsFea
277303
deleteFeatureGeometryPart( layerId, feature, partIdx, changes );
278304
}
279305
}
306+
307+
void QgsGeometryCheckError::update( const QgsGeometryCheckError *other )
308+
{
309+
Q_ASSERT( mCheck == other->mCheck );
310+
Q_ASSERT( mLayerId == other->mLayerId );
311+
Q_ASSERT( mFeatureId == other->mFeatureId );
312+
mErrorLocation = other->mErrorLocation;
313+
mVidx = other->mVidx;
314+
mValue = other->mValue;
315+
mGeometry = other->mGeometry;
316+
}

‎src/analysis/vector/geometry_checker/qgsgeometrycheck.h

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -157,39 +157,12 @@ class ANALYSIS_EXPORT QgsGeometryCheckError
157157
const QgsVertexId &vidx() const { return mVidx; }
158158
Status status() const { return mStatus; }
159159
QString resolutionMessage() const { return mResolutionMessage; }
160-
void setFixed( int method )
161-
{
162-
mStatus = StatusFixed;
163-
const QStringList methods = mCheck->resolutionMethods();
164-
mResolutionMessage = methods[method];
165-
}
166-
void setFixFailed( const QString &reason )
167-
{
168-
mStatus = StatusFixFailed;
169-
mResolutionMessage = reason;
170-
}
160+
void setFixed( int method );
161+
void setFixFailed( const QString &reason );
171162
void setObsolete() { mStatus = StatusObsolete; }
172-
virtual bool isEqual( QgsGeometryCheckError *other ) const
173-
{
174-
return other->check() == check() &&
175-
other->layerId() == layerId() &&
176-
other->featureId() == featureId() &&
177-
other->vidx() == vidx();
178-
}
179-
virtual bool closeMatch( QgsGeometryCheckError * /*other*/ ) const
180-
{
181-
return false;
182-
}
183-
virtual void update( const QgsGeometryCheckError *other )
184-
{
185-
Q_ASSERT( mCheck == other->mCheck );
186-
Q_ASSERT( mLayerId == other->mLayerId );
187-
Q_ASSERT( mFeatureId == other->mFeatureId );
188-
mErrorLocation = other->mErrorLocation;
189-
mVidx = other->mVidx;
190-
mValue = other->mValue;
191-
mGeometry = other->mGeometry;
192-
}
163+
virtual bool isEqual( QgsGeometryCheckError *other ) const;
164+
virtual bool closeMatch( QgsGeometryCheckError * /*other*/ ) const;
165+
virtual void update( const QgsGeometryCheckError *other );
193166

194167
virtual bool handleChanges( const QgsGeometryCheck::Changes &changes );
195168

0 commit comments

Comments
 (0)
Please sign in to comment.