provide default value when reading output folder setting to generate

destination path in Processing (fix #61965)
This commit is contained in:
Alexander Bruy 2025-09-24 11:21:38 +01:00 committed by Nyall Dawson
parent 5f320b4369
commit e6746493b9

View File

@ -25,6 +25,7 @@
#include "qgsprocessingcontext.h" #include "qgsprocessingcontext.h"
#include "qgsprocessingalgorithm.h" #include "qgsprocessingalgorithm.h"
#include "qgsfieldmappingwidget.h" #include "qgsfieldmappingwidget.h"
#include "qgsapplication.h"
#include <QMenu> #include <QMenu>
#include <QFileDialog> #include <QFileDialog>
#include <QInputDialog> #include <QInputDialog>
@ -175,7 +176,7 @@ QVariant QgsProcessingLayerOutputDestinationWidget::value() const
if ( folder == '.' ) if ( folder == '.' )
{ {
// output name does not include a folder - use default // output name does not include a folder - use default
QString defaultFolder = settings.value( QStringLiteral( "/Processing/Configuration/OUTPUTS_FOLDER" ) ).toString(); QString defaultFolder = settings.value( QStringLiteral( "/Processing/Configuration/OUTPUTS_FOLDER" ), QStringLiteral( "%1/processing/outputs" ).arg( QgsApplication::qgisSettingsDirPath() ) ).toString();
key = QDir( defaultFolder ).filePath( key ); key = QDir( defaultFolder ).filePath( key );
} }
} }