Skip to content

Commit

Permalink
Configure shortcuts dialog - make sure output file name has .xml exte…
Browse files Browse the repository at this point in the history
…nsion.

Contributed by Alexander Bruy.


git-svn-id: http://svn.osgeo.org/qgis/trunk@12348 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Dec 7, 2009
1 parent 40c10fa commit 0da6f38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/qgsconfigureshortcutsdialog.cpp
Expand Up @@ -78,6 +78,12 @@ void QgsConfigureShortcutsDialog::saveShortcuts()
if ( fileName.isEmpty() )
return;

// ensure the user never omitted the extension from the file name
if ( !fileName.toLower().endsWith( ".xml" ) )
{
fileName += ".xml";
}

QFile file( fileName );
if ( !file.open( QIODevice::WriteOnly | QIODevice::Text ) )
{
Expand Down

0 comments on commit 0da6f38

Please sign in to comment.