Skip to content

Commit

Permalink
Remove dead code from DB Manager plugin
Browse files Browse the repository at this point in the history
This is all functionally dead code -- it is not called from anywhere
  • Loading branch information
nyalldawson committed Feb 26, 2025
1 parent d45401c commit 7be2e7c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 1,082 deletions.
10 changes: 0 additions & 10 deletions python/plugins/db_manager/db_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,6 @@ def runSqlWindow(self):
functools.partial(self.update_query_tab_name, index, dbname)
)

def runSqlLayerWindow(self, layer):
from .dlg_sql_layer_window import DlgSqlLayerWindow

query = DlgSqlLayerWindow(self.iface, layer, self)
lname = layer.name()
tabname = self.tr("Layer ({0})").format(lname)
index = self.tabs.addTab(query, tabname)
# self.tabs.setTabIcon(index, db.connection().icon())
self.tabs.setCurrentIndex(index)

def update_query_tab_name(self, index, dbname, queryname):
if not queryname:
queryname = self.tr("Query")
Expand Down
12 changes: 0 additions & 12 deletions python/plugins/db_manager/db_manager_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,6 @@ def unload(self):
if self.dlg is not None:
self.dlg.close()

def onUpdateSqlLayer(self):
# Be able to update every Db layer from Postgres, Spatialite and Oracle
l = self.iface.activeLayer()
if l.dataProvider().name() in ["postgres", "spatialite", "oracle"]:
self.run()
self.dlg.runSqlLayerWindow(l)
# virtual has QUrl source
# url = QUrl(QUrl.fromPercentEncoding(l.source()))
# url.queryItemValue('query')
# url.queryItemValue('uid')
# url.queryItemValue('geometry')

def run(self):
# keep opened only one instance
if self.dlg is None:
Expand Down
Loading

0 comments on commit 7be2e7c

Please sign in to comment.