[QGIS Commit] r15438 - in trunk/qgis/src: core providers/ogr

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Mar 11 15:49:34 EST 2011


Author: jef
Date: 2011-03-11 12:49:34 -0800 (Fri, 11 Mar 2011)
New Revision: 15438

Modified:
   trunk/qgis/src/core/qgsvectorfilewriter.cpp
   trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
Log:
fix #3595

Modified: trunk/qgis/src/core/qgsvectorfilewriter.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorfilewriter.cpp	2011-03-11 19:02:18 UTC (rev 15437)
+++ trunk/qgis/src/core/qgsvectorfilewriter.cpp	2011-03-11 20:49:34 UTC (rev 15438)
@@ -793,10 +793,7 @@
   QString trLongName;
   QString glob;
   QString ext;
-  if ( !QgsVectorFileWriter::driverMetadata( driverName, longName, trLongName, glob, ext )
-       || trLongName.isEmpty()
-       || glob.isEmpty()
-     )
+  if ( !driverMetadata( driverName, longName, trLongName, glob, ext ) || trLongName.isEmpty() || glob.isEmpty() )
     return "";
 
   return trLongName + " [OGR] (" + glob.toLower() + " " + glob.toUpper() + ")";
@@ -855,22 +852,22 @@
   }
   else if ( driverName.startsWith( "GML" ) )
   {
-    longName = "Geography Markup Language (GML)";
-    trLongName = QObject::tr( "Geography Markup Language (GML)" );
+    longName = "Geography Markup Language [GML]";
+    trLongName = QObject::tr( "Geography Markup Language [GML]" );
     glob = "*.gml";
     ext = "gml";
   }
   else if ( driverName.startsWith( "GMT" ) )
   {
-    longName = "Generic Mapping Tools (GMT)";
-    trLongName = QObject::tr( "Generic Mapping Tools (GMT)" );
+    longName = "Generic Mapping Tools [GMT]";
+    trLongName = QObject::tr( "Generic Mapping Tools [GMT]" );
     glob = "*.gmt";
     ext = "gmt";
   }
   else if ( driverName.startsWith( "GPX" ) )
   {
-    longName = "GPS eXchange Format";
-    trLongName = QObject::tr( "GPS eXchange Format" );
+    longName = "GPS eXchange Format [GPX]";
+    trLongName = QObject::tr( "GPS eXchange Format [GPX]" );
     glob = "*.gpx";
     ext = "gpx";
   }
@@ -890,8 +887,8 @@
   }
   else if ( driverName.startsWith( "KML" ) )
   {
-    longName = "Keyhole Markup Language (KML)";
-    trLongName = QObject::tr( "Keyhole Markup Language (KML)" );
+    longName = "Keyhole Markup Language [KML]";
+    trLongName = QObject::tr( "Keyhole Markup Language [KML]" );
     glob = "*.kml" ;
     ext = "kml" ;
   }
@@ -918,8 +915,8 @@
   }
   else if ( driverName.startsWith( "SDTS" ) )
   {
-    longName = "Spatial Data Transfer Standard (SDTS)";
-    trLongName = QObject::tr( "Spatial Data Transfer Standard (SDTS)" );
+    longName = "Spatial Data Transfer Standard [SDTS]";
+    trLongName = QObject::tr( "Spatial Data Transfer Standard [SDTS]" );
     glob = "*catd.ddf";
     ext = "ddf";
   }

Modified: trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
===================================================================
--- trunk/qgis/src/providers/ogr/qgsogrprovider.cpp	2011-03-11 19:02:18 UTC (rev 15437)
+++ trunk/qgis/src/providers/ogr/qgsogrprovider.cpp	2011-03-11 20:49:34 UTC (rev 15438)
@@ -1383,15 +1383,15 @@
       }
       else if ( driverName.startsWith( "GML" ) )
       {
-        myFileFilters += createFileFilter_( QObject::tr( "Geography Markup Language (GML)" ), "*.gml" );
+        myFileFilters += createFileFilter_( QObject::tr( "Geography Markup Language [GML]" ), "*.gml" );
       }
       else if ( driverName.startsWith( "GMT" ) )
       {
-        myFileFilters += createFileFilter_( QObject::tr( "GMT" ), "*.gmt" );
+        myFileFilters += createFileFilter_( QObject::tr( "Generic Mapping Tools [GMT]" ), "*.gmt" );
       }
       else if ( driverName.startsWith( "GPX" ) )
       {
-        myFileFilters += createFileFilter_( QObject::tr( "GPX" ), "*.gpx" );
+        myFileFilters += createFileFilter_( QObject::tr( "GPS eXchange Format [GPX]" ), "*.gpx" );
       }
       else if ( driverName.startsWith( "GRASS" ) )
       {
@@ -1415,7 +1415,7 @@
       }
       else if ( driverName.startsWith( "KML" ) )
       {
-        myFileFilters += createFileFilter_( QObject::tr( "Keyhole Markup Language (KML)" ), "*.kml" );
+        myFileFilters += createFileFilter_( QObject::tr( "Keyhole Markup Language [KML]" ), "*.kml" );
       }
       else if ( driverName.startsWith( "MapInfo File" ) )
       {
@@ -1452,7 +1452,7 @@
       }
       else if ( driverName.startsWith( "SDTS" ) )
       {
-        myFileFilters += createFileFilter_( QObject::tr( "Spatial Data Transfer Standard" ),
+        myFileFilters += createFileFilter_( QObject::tr( "Spatial Data Transfer Standard [SDTS]" ),
                                             "*catd.ddf" );
       }
       else if ( driverName.startsWith( "SQLite" ) )



More information about the QGIS-commit mailing list