Skip to content

Commit

Permalink
Merge pull request #21 from JPPauly/master
Browse files Browse the repository at this point in the history
Migrated from QSettings to QgsSettings
  • Loading branch information
ejn authored Apr 30, 2021
2 parents 26f4972 + b350b8e commit c0e75ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions wfsclientconfigdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, parent):
self.ui = Ui_WfsClientConfig()
self.ui.setupUi(self)

self.settings = QtCore.QSettings()
self.settings = QgsSettings()

#Restore UI from Settings
resolvexlinkhref = self.settings.value("/Wfs20Client/resolveXpathHref")
Expand All @@ -46,17 +46,17 @@ def __init__(self, parent):
index = self.ui.cmbResolveDepth.findText(resolvedepth)
self.ui.cmbResolveDepth.setCurrentIndex(index)

if resolvexlinkhref:
if resolvexlinkhref is True or resolvexlinkhref == "true":
self.ui.chkResolveXlinkHref.setChecked(True)
else:
self.ui.chkResolveXlinkHref.setChecked(False)

if attributestofields:
if attributestofields is True or attributestofields == "true":
self.ui.chkAttributesToFields.setChecked(True)
else:
self.ui.chkAttributesToFields.setChecked(False)

if disablenasdetection:
if disablenasdetection is True or disablenasdetection == "true":
self.ui.chkDisableNasDetection.setChecked(True)
else:
self.ui.chkDisableNasDetection.setChecked(False)
Expand Down
8 changes: 4 additions & 4 deletions wfsclientdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, parent, url):
self.ui = Ui_WfsClient()
self.ui.setupUi(self)

self.settings = QtCore.QSettings()
self.settings = QgsSettings()
self.qnam = QNetworkAccessManager()
self.qnam.authenticationRequired.connect(self.authenticationRequired)
self.qnam.sslErrors.connect(self.sslErrors)
Expand Down Expand Up @@ -1005,20 +1005,20 @@ def load_vector_layer(self, filename, layername):
gdaltimeout = "5"
self.logger.debug("GDAL_HTTP_TIMEOUT " + gdaltimeout)
gdal.SetConfigOption("GDAL_HTTP_TIMEOUT", gdaltimeout)
if resolvexlinkhref:
if resolvexlinkhref is True or resolvexlinkhref == "true":
gdal.SetConfigOption('GML_SKIP_RESOLVE_ELEMS', 'HUGE')
self.logger.debug("resolveXpathHref " + str(resolvexlinkhref))
else:
gdal.SetConfigOption('GML_SKIP_RESOLVE_ELEMS', 'ALL')

if attributestofields:
if attributestofields is True or attributestofields == "true":
gdal.SetConfigOption('GML_ATTRIBUTES_TO_OGR_FIELDS', 'YES')
self.logger.debug("attributesToFields " + str(attributestofields))
else:
gdal.SetConfigOption('GML_ATTRIBUTES_TO_OGR_FIELDS', 'NO')

nasdetectionstring = "NAS-Operationen.xsd;NAS-Operationen_optional.xsd;AAA-Fachschema.xsd"
if disablenasdetection:
if disablenasdetection is True or disablenasdetection == "true":
nasdetectionstring = 'asdf/asdf/asdf'
self.logger.debug("Using 'NAS_INDICATOR': " + nasdetectionstring)
gdal.SetConfigOption('NAS_INDICATOR', nasdetectionstring)
Expand Down

0 comments on commit c0e75ae

Please sign in to comment.