Skip to content

Commit 3a7d217

Browse files
author
wonder
committed
Configure shortcuts dialog - make sure output file name has .xml extension.
Contributed by Alexander Bruy. git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12348 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 362ea7f commit 3a7d217

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/app/qgsconfigureshortcutsdialog.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ void QgsConfigureShortcutsDialog::saveShortcuts()
7878
if ( fileName.isEmpty() )
7979
return;
8080

81+
// ensure the user never omitted the extension from the file name
82+
if ( !fileName.toLower().endsWith( ".xml" ) )
83+
{
84+
fileName += ".xml";
85+
}
86+
8187
QFile file( fileName );
8288
if ( !file.open( QIODevice::WriteOnly | QIODevice::Text ) )
8389
{

0 commit comments

Comments
 (0)