Skip to content
Permalink
Browse files

Merge pull request #5019 from boundlessgeo/gpkg-dbmanager-sync

Geopackage: Use the same settings for DB Manager and browser
  • Loading branch information
elpaso committed Aug 14, 2017
2 parents 80e8ff0 + 04f79d1 commit 7d4f81d4c65de067a048d30b2b8c525e36a7420f
Showing with 4 additions and 4 deletions.
  1. +4 −4 python/plugins/db_manager/db_plugins/gpkg/plugin.py
@@ -61,7 +61,7 @@ def providerName(self):

@classmethod
def connectionSettingsKey(self):
return '/GPKG/connections'
return '/providers/geopackage/connections'

def databasesFactory(self, connection, uri):
return GPKGDatabase(connection, uri)
@@ -71,10 +71,10 @@ def connect(self, parent=None):
settings = QgsSettings()
settings.beginGroup(u"/%s/%s" % (self.connectionSettingsKey(), conn_name))

if not settings.contains("gpkgpath"): # non-existent entry?
if not settings.contains("path"): # non-existent entry?
raise InvalidDataException(self.tr(u'There is no defined database connection "{0}".').format(conn_name))

database = settings.value("gpkgpath")
database = settings.value("path")

uri = QgsDataSourceUri()
uri.setDatabase(database)
@@ -84,7 +84,7 @@ def connect(self, parent=None):
def addConnection(self, conn_name, uri):
settings = QgsSettings()
settings.beginGroup(u"/%s/%s" % (self.connectionSettingsKey(), conn_name))
settings.setValue("gpkgpath", uri.database())
settings.setValue("path", uri.database())
return True

@classmethod

0 comments on commit 7d4f81d

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