Skip to content

Commit

Permalink
Warn on running deprecated algorithms or algorithms with known issues…
Browse files Browse the repository at this point in the history
… from qgis_process
  • Loading branch information
nyalldawson committed Jul 29, 2020
1 parent 6873984 commit 04e07f0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/process/qgsprocess.cpp
Expand Up @@ -459,6 +459,20 @@ int QgsProcessingExec::execute( const QString &id, const QVariantMap &params, co
std::cerr << QStringLiteral( "The \"%1\" algorithm is not available for use outside of the QGIS desktop application\n" ).arg( id ).toLocal8Bit().constData();
return 1;
}

if ( alg->flags() & QgsProcessingAlgorithm::FlagKnownIssues )
{
std::cout << "\n****************\n";
std::cout << "Warning: this algorithm contains known issues and the results may be unreliable!\n";
std::cout << "****************\n\n";
}

if ( alg->flags() & QgsProcessingAlgorithm::FlagDeprecated )
{
std::cout << "\n****************\n";
std::cout << "Warning: this algorithm is deprecated and may be removed in a future QGIS version!\n";
std::cout << "****************\n\n";
}
}

std::cout << "\n----------------\n";
Expand Down

0 comments on commit 04e07f0

Please sign in to comment.