Skip to content
Permalink
Browse files

fix #3595

git-svn-id: http://svn.osgeo.org/qgis/trunk@15438 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Mar 11, 2011
1 parent 7a9ccbb commit c4a036743d6388aced6383d2a0395a14141ce177
Showing with 16 additions and 19 deletions.
  1. +11 −14 src/core/qgsvectorfilewriter.cpp
  2. +5 −5 src/providers/ogr/qgsogrprovider.cpp
@@ -793,10 +793,7 @@ QString QgsVectorFileWriter::filterForDriver( const QString& driverName )
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 @@ bool QgsVectorFileWriter::driverMetadata( QString driverName, QString &longName,
}
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 @@ bool QgsVectorFileWriter::driverMetadata( QString driverName, QString &longName,
}
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 @@ bool QgsVectorFileWriter::driverMetadata( QString driverName, QString &longName,
}
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";
}
@@ -1383,15 +1383,15 @@ QString createFilters( QString type )
}
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 @@ QString createFilters( QString type )
}
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 @@ QString createFilters( QString type )
}
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" ) )

0 comments on commit c4a0367

Please sign in to comment.
You can’t perform that action at this time.