diff --git a/python/plugins/db_manager/db_plugins/oracle/QtSqlDB.py b/python/plugins/db_manager/db_plugins/oracle/QtSqlDB.py index 867cef28855..d3130333dfb 100644 --- a/python/plugins/db_manager/db_plugins/oracle/QtSqlDB.py +++ b/python/plugins/db_manager/db_plugins/oracle/QtSqlDB.py @@ -144,7 +144,7 @@ class QtSqlDBCursor(object): return self.qry.seek(row) def fetchone(self): - if not next(self.qry): + if not self.qry.next(): return None row = [] diff --git a/python/plugins/db_manager/db_plugins/oracle/connector.py b/python/plugins/db_manager/db_plugins/oracle/connector.py index a76de5adac5..fffe8ba68fd 100644 --- a/python/plugins/db_manager/db_plugins/oracle/connector.py +++ b/python/plugins/db_manager/db_plugins/oracle/connector.py @@ -541,11 +541,11 @@ class OracleDBConnector(DBConnector): buf = list(item) geomtype = geomtypes[j] srid = srids[j] - datatype = Qgis.featureType(Qgis.singleType(geomtype)) - geo = datatype[3:].upper().strip(u"25D") + datatype = QgsWkbTypes.displayString(QgsWkbTypes.flatType(QgsWkbTypes.singleType(geomtype))) + geo = datatype.upper() buf.append(geo) buf.append(geomtype) - buf.append(Qgis.wkbDimensions(geomtype)) # Dimensions + buf.append(QgsWkbTypes.coordDimensions(geomtype)) # Dimensions buf.append(srid) buf.append(None) # To respect ORTableVector row buf.append(None) # To respect ORTableVector row @@ -636,11 +636,11 @@ class OracleDBConnector(DBConnector): for j in range(len(geomtypes)): buf = list(item) geomtype = geomtypes[j] - datatype = Qgis.featureType(Qgis.singleType(geomtype)) - geo = datatype[3:].upper().strip(u"25D") + datatype = QgsWkbTypes.displayString(QgsWkbTypes.flatType(QgsWkbTypes.singleType(geomtype))) + geo = datatype.upper() buf.append(geo) # Geometry type as String buf.append(geomtype) # Qgis.WkbType - buf.append(Qgis.wkbDimensions(geomtype)) # Dimensions + buf.append(QgsWkbTypes.coordDimensions(geomtype)) # Dimensions buf.append(detectedSrid) # srid if not self.onlyExistingTypes: geomMultiTypes.append(0) diff --git a/python/plugins/db_manager/db_plugins/oracle/info_model.py b/python/plugins/db_manager/db_plugins/oracle/info_model.py index aa5854dee08..8668436c7cd 100644 --- a/python/plugins/db_manager/db_plugins/oracle/info_model.py +++ b/python/plugins/db_manager/db_plugins/oracle/info_model.py @@ -24,7 +24,7 @@ The content of this file is based on """ from qgis.PyQt.QtWidgets import QApplication -from qgis.core import Qgis +from qgis.core import QgsWkbTypes from ..info_model import TableInfo, VectorTableInfo, DatabaseInfo from ..html_elems import HtmlContent, HtmlSection, HtmlParagraph, \ @@ -576,7 +576,7 @@ class ORVectorTableInfo(ORTableInfo, VectorTableInfo): self.table.geomType), (QApplication.translate("DBManagerPlugin", "Qgis Geometry type:"), - Qgis.featureType(self.table.wkbType)) + QgsWkbTypes.displayString(self.table.wkbType)) ] # only if we have info from geometry_columns