[QGIS Commit] r12348 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Dec 7 05:43:17 EST 2009


Author: wonder
Date: 2009-12-07 05:43:06 -0500 (Mon, 07 Dec 2009)
New Revision: 12348

Modified:
   trunk/qgis/src/app/qgsconfigureshortcutsdialog.cpp
Log:
Configure shortcuts dialog - make sure output file name has .xml extension.
Contributed by Alexander Bruy.


Modified: trunk/qgis/src/app/qgsconfigureshortcutsdialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsconfigureshortcutsdialog.cpp	2009-12-07 00:36:57 UTC (rev 12347)
+++ trunk/qgis/src/app/qgsconfigureshortcutsdialog.cpp	2009-12-07 10:43:06 UTC (rev 12348)
@@ -78,6 +78,12 @@
   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 ) )
   {



More information about the QGIS-commit mailing list