Skip to content

Commit

Permalink
fix #3595
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@15438 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 11, 2011
1 parent 7a9ccbb commit c4a0367
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
25 changes: 11 additions & 14 deletions src/core/qgsvectorfilewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() + ")";
Expand Down Expand Up @@ -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";
}
Expand All @@ -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" ;
}
Expand All @@ -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";
}
Expand Down
10 changes: 5 additions & 5 deletions src/providers/ogr/qgsogrprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" ) )
{
Expand All @@ -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" ) )
{
Expand Down Expand Up @@ -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" ) )
Expand Down

0 comments on commit c4a0367

Please sign in to comment.