From aa08d684c3adb88bd4018624534b7bda0d331e57 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Wed, 17 Jul 2024 13:29:15 +1000 Subject: [PATCH] Apply suggestions from code review --- src/app/qgsprojectproperties.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/qgsprojectproperties.cpp b/src/app/qgsprojectproperties.cpp index fbab96ec6504..93f7e2744baa 100644 --- a/src/app/qgsprojectproperties.cpp +++ b/src/app/qgsprojectproperties.cpp @@ -2740,12 +2740,13 @@ void QgsProjectProperties::removeIccProfile() void QgsProjectProperties::saveIccProfile() { - QString fileName = QFileDialog::getSaveFileName( this, tr( "Save ICC profile" ), QDir::homePath(), + QString fileName = QFileDialog::getSaveFileName( this, tr( "Save ICC Profile" ), QDir::homePath(), tr( "ICC profile files (*.icc *.ICC)" ) ); if ( fileName.isEmpty() ) return; + fileName = QgsFileUtils::ensureFileNameHasExtension( fileName, { QStringLiteral( "icc" ) } ); const QString error = QgsColorUtils::saveIccProfile( mColorSpace, fileName ); if ( !error.isEmpty() ) {