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/qgis@12348 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Dec 7, 2009
1 parent 362ea7f commit 3a7d217
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/qgsconfigureshortcutsdialog.cpp
Original file line number Diff line number Diff line change
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 3a7d217

Please sign in to comment.