New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[processing] handle Processing.TEMPORARY_OUTPUT for folder parameters #8998
Conversation
@nyalldawson not sure that this is the best solution, probably we need to introduce special method for directory outputs, like we already have for files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, can we get a unit test covering this?
parameterAsString() method which is used also for folder outputs
@nyalldawson on the second though, we can use I tend to close this and use |
@alexbruy I think we need this PR and it's safer to continue here -- there's potentially external plugins using parameterAsString for this which would have broken with the change. |
@@ -695,7 +701,7 @@ QString QgsProcessingParameters::parameterAsFileOutput( const QgsProcessingParam | |||
if ( dest == QgsProcessing::TEMPORARY_OUTPUT ) | |||
{ | |||
if ( const QgsProcessingDestinationParameter *destParam = dynamic_cast< const QgsProcessingDestinationParameter * >( definition ) ) | |||
val = destParam->generateTemporaryDestination(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyalldawson not 100% sure, but seems there is a typo here and temporary file was never resolved to the correct path. Fixed it too, when adding test for temporary directory output.
Test added. Also seems we missed a typo in the #8979, so fixed it too. |
Thanks! |
Description
Follow up #8979. Seems we missed that
QgsProcessingParameterFolderDestination
also needs to handle temporaty outputs.Checklist
fixes #11111
in the commit message next to the description[FEATURE]
in the commit message[needs-docs]
in the commit message and contain sufficient information in the commit message to be documentedscripts/prepare-commit.sh
script before each commit