Skip to content
Permalink
Browse files

[dbmanager] Fix deprecation warning

Replace deprecated QgsCodeEditor setMarginVisible() with setLineNumbersVisible() for SQL dialog windows
  • Loading branch information
agiudiceandrea authored and nyalldawson committed Mar 28, 2021
1 parent c3771b0 commit 57f589dd36f68f1a5a74ae065cc4a3d0089b065f
@@ -115,7 +115,7 @@ def __init__(self, iface, layer, parent=None):

self.editSql.setFocus()
self.editSql.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.editSql.setMarginVisible(True)
self.editSql.setLineNumbersVisible(True)
self.initCompleter()
self.editSql.textChanged.connect(lambda: self.setHasChanged(True))

@@ -137,7 +137,7 @@ def __init__(self, iface, db, parent=None):

self.editSql.setFocus()
self.editSql.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.editSql.setMarginVisible(True)
self.editSql.setLineNumbersVisible(True)
self.initCompleter()
self.editSql.textChanged.connect(lambda: self.setHasChanged(True))

@@ -172,6 +172,3 @@ def initLexer(self):

def lexer(self):
return self.mylexer

def setMarginVisible(self, visible):
pass

0 comments on commit 57f589d

Please sign in to comment.