Skip to content

Commit

Permalink
Treat mdb files as a database source in browser
Browse files Browse the repository at this point in the history
Allows these to be expanded so that particular layers can be loaded,
notably allowing projects with broken mdb layer paths to be repaired
by allowing users to pick the correct target layer from an mdb file.
  • Loading branch information
nyalldawson committed Aug 5, 2020
1 parent 38a7e72 commit 463e8ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/providers/ogr/qgsogrdataitems.cpp
Expand Up @@ -604,10 +604,12 @@ QgsDataItem *QgsOgrDataItemProvider::createDataItem( const QString &pathIn, QgsD
QStringLiteral( "gdb" ),
QStringLiteral( "kml" ),
QStringLiteral( "osm" ),
QStringLiteral( "mdb" ),

This comment has been minimized.

Copy link
@nirvn

nirvn Aug 5, 2020

Contributor

@nyalldawson , could you make this conditional to GDAL reporting a MDB driver available?

This comment has been minimized.

Copy link
@nyalldawson

nyalldawson Aug 5, 2020

Author Collaborator

It's not required -- they won't show otherwise

This comment has been minimized.

Copy link
@nirvn

nirvn Aug 5, 2020

Contributor

Hm, it shows up in my browser, and I don't have MDB support in gdal on ubuntu.

This comment has been minimized.

Copy link
@nirvn

nirvn Aug 5, 2020

Contributor

(by showing up I mean the .mdb file shows up, trying to expand it does indeed show nothing since it's unable to open the dataset)

QStringLiteral( "pbf" ) };
static QStringList sOgrSupportedDbDriverNames { QStringLiteral( "GPKG" ),
QStringLiteral( "db" ),
QStringLiteral( "gdb" ) };
QStringLiteral( "gdb" ),
QStringLiteral( "pgdb" )};

// these extensions are trivial to read, so there's no need to rely on
// the extension only scan here -- avoiding it always gives us the correct data type
Expand Down

0 comments on commit 463e8ee

Please sign in to comment.