File tree Expand file tree Collapse file tree 1 file changed +2
-21
lines changed Expand file tree Collapse file tree 1 file changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -155,27 +155,8 @@ void QgsRasterCalcDialog::insertAvailableOutputFormats()
155155
156156 // store the driver shortnames and the corresponding extensions
157157 // (just in case the user does not give an extension for the output file name)
158- int index = 0 ;
159- while (( driverMetadata ) && driverMetadata[index] != 0 )
160- {
161- QStringList metadataTokens = QString ( driverMetadata[index] ).split ( " =" , QString::SkipEmptyParts );
162- if ( metadataTokens.size () < 1 )
163- {
164- break ;
165- }
166-
167- if ( metadataTokens[0 ] == " DMD_EXTENSION" )
168- {
169- if ( metadataTokens.size () < 2 )
170- {
171- ++index;
172- continue ;
173- }
174- mDriverExtensionMap .insert ( QString ( GDALGetDriverShortName ( driver ) ), metadataTokens[1 ] );
175- break ;
176- }
177- ++index;
178- }
158+ QString driverExtension = GDALGetMetadataItem ( driver, GDAL_DMD_EXTENSION, NULL );
159+ mDriverExtensionMap .insert ( QString ( GDALGetDriverShortName ( driver ) ), driverExtension );
179160 }
180161 }
181162 }
You can’t perform that action at this time.
0 commit comments