Skip to content

Commit

Permalink
More QgsMapLayer python fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 26, 2019
1 parent ac651ee commit ef8d893
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def uniqueIdFunction(self):
return "row_number() over ()"

def toSqlLayer(self, sql, geomCol, uniqueCol, layerName="QueryLayer", layerType=None, avoidSelectById=False, filter=""):
from qgis.core import QgsMapLayer, QgsVectorLayer, QgsRasterLayer
from qgis.core import QgsVectorLayer, QgsRasterLayer

if uniqueCol is None:
if hasattr(self, 'uniqueIdFunction'):
Expand Down
2 changes: 0 additions & 2 deletions python/plugins/db_manager/dlg_sql_layer_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@ def _getSqlLayer(self, _filter):
if query.strip().endswith(';'):
query = query.strip()[:-1]

from qgis.core import QgsMapLayer

layerType = QgsMapLayerType.VectorLayer if self.vectorRadio.isChecked() else QgsMapLayerType.RasterLayer

# get a new layer name
Expand Down
2 changes: 0 additions & 2 deletions python/plugins/db_manager/dlg_sql_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,6 @@ def _getSqlLayer(self, _filter):
if query.strip().endswith(';'):
query = query.strip()[:-1]

from qgis.core import QgsMapLayer

layerType = QgsMapLayerType.VectorLayer if self.vectorRadio.isChecked() else QgsMapLayerType.RasterLayer

# get a new layer name
Expand Down
1 change: 1 addition & 0 deletions python/plugins/processing/gui/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
QgsWkbTypes,
QgsSettings,
QgsProject,
QgsMapLayer,
QgsMapLayerType,
QgsVectorLayer,
QgsProcessing,
Expand Down

0 comments on commit ef8d893

Please sign in to comment.