File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 56
56
#include " qgshillshaderendererwidget.h"
57
57
#include " qgssettings.h"
58
58
#include " qgsmaplayerlegend.h"
59
+ #include " qgsfileutils.h"
59
60
60
61
#include < QDesktopServices>
61
62
#include < QTableWidgetItem>
@@ -1873,8 +1874,7 @@ void QgsRasterLayerProperties::saveStyleAs_clicked()
1873
1874
type = StyleType::SLD;
1874
1875
else
1875
1876
// ensure the user never omits the extension from the file name
1876
- if ( !outputFileName.endsWith ( QLatin1String ( " .qml" ), Qt::CaseInsensitive ) )
1877
- outputFileName += QLatin1String ( " .qml" );
1877
+ outputFileName = QgsFileUtils::ensureFileNameHasExtension ( outputFileName, QStringList () << QStringLiteral ( " qml" ) );
1878
1878
1879
1879
apply (); // make sure the style to save is uptodate
1880
1880
You can’t perform that action at this time.
0 commit comments