From 94b62accf2a1cfc892bc9097cd4dd5f8a1f60ab0 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 12 Oct 2023 09:32:08 +1000 Subject: [PATCH] Don't show help for algorithms which can't be run in qgis_process Fixes #54914 --- src/process/qgsprocess.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/process/qgsprocess.cpp b/src/process/qgsprocess.cpp index 61283b62649..5456c8de66a 100644 --- a/src/process/qgsprocess.cpp +++ b/src/process/qgsprocess.cpp @@ -781,6 +781,12 @@ int QgsProcessingExec::showAlgorithmHelp( const QString &inputId, bool useJson ) } } + if ( alg->flags() & QgsProcessingAlgorithm::FlagNotAvailableInStandaloneTool ) + { + std::cerr << QStringLiteral( "The \"%1\" algorithm is not available for use outside of the QGIS desktop application\n" ).arg( id ).toLocal8Bit().constData(); + return 1; + } + QVariantMap json; if ( !useJson ) {