Skip to content
Permalink
Browse files

[Geometry Checker] Use a more readable file format list

  • Loading branch information
DelazJ committed Nov 18, 2017
1 parent af6b4cc commit c2a940a0b1d44706611601bf0e7983f700b7ba9b
Showing with 4 additions and 9 deletions.
  1. +4 −9 src/plugins/geometry_checker/qgsgeometrycheckersetuptab.cpp
@@ -54,15 +54,10 @@ QgsGeometryCheckerSetupTab::QgsGeometryCheckerSetupTab( QgisInterface *iface, QD
mAbortButton = new QPushButton( tr( "Abort" ) );
mRunButton->setEnabled( false );

const auto filterFormatMap = QgsVectorFileWriter::supportedFiltersAndFormats( QgsVectorFileWriter::SortRecommended | QgsVectorFileWriter::SkipNonSpatialFormats );
for ( const QgsVectorFileWriter::FilterFormatDetails &filter : filterFormatMap )
const auto drivers = QgsVectorFileWriter::ogrDriverList( QgsVectorFileWriter::SortRecommended | QgsVectorFileWriter::SkipNonSpatialFormats );
for ( const QgsVectorFileWriter::DriverDetails &driver : drivers )
{
QString driverName = filter.driverName;
ui.comboBoxOutputFormat->addItem( driverName );
if ( driverName == QLatin1String( "ESRI Shapefile" ) )
{
ui.comboBoxOutputFormat->setCurrentIndex( ui.comboBoxOutputFormat->count() - 1 );
}
ui.comboBoxOutputFormat->addItem( driver.longName, driver.driverName );
}
ui.listWidgetInputLayers->setIconSize( QSize( 16, 16 ) );

@@ -297,7 +292,7 @@ void QgsGeometryCheckerSetupTab::runChecks()
{
// Get output directory and file extension
QDir outputDir = QDir( ui.lineEditOutputDirectory->text() );
QString outputDriverName = ui.comboBoxOutputFormat->currentText();
QString outputDriverName = ui.comboBoxOutputFormat->currentData().toString();
QgsVectorFileWriter::MetaData metadata;
if ( !QgsVectorFileWriter::driverMetadata( outputDriverName, metadata ) )
{

0 comments on commit c2a940a

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