25 qDeleteAll( mChecks );
30 QList<const QgsAbstractValidityCheck *> results;
34 results.append( check );
41 QList< const QgsAbstractValidityCheck * > results;
44 if ( check && check->checkType() == type )
52 mChecks.append( check );
57 const int index = mChecks.indexOf( check );
59 delete mChecks.takeAt( index );
64 QList<QgsValidityCheckResult> result;
65 const std::vector<std::unique_ptr<QgsAbstractValidityCheck> > toCheck = createChecks( type );
67 for (
const std::unique_ptr< QgsAbstractValidityCheck > &check : toCheck )
72 if ( !check->prepareCheck( context, feedback ) )
76 feedback->
setProgress(
static_cast< double >( i ) / toCheck.size() * 100 );
81 const QList< QgsValidityCheckResult > checkResults = check->runCheck( context, feedback );
84 checkResult.checkId = check->id();
85 result << checkResult;
90 feedback->
setProgress(
static_cast< double >( i ) / toCheck.size() * 100 );
96 std::vector<std::unique_ptr<QgsAbstractValidityCheck> > QgsValidityCheckRegistry::createChecks(
int type )
const
98 const QList< const QgsAbstractValidityCheck *> toCheck =
checks( type );
99 std::vector<std::unique_ptr<QgsAbstractValidityCheck> > results;
100 results.reserve( toCheck.size() );
103 results.emplace_back( std::unique_ptr< QgsAbstractValidityCheck >( check->create() ) );