Skip to content
Permalink
Browse files

[dbmanager] Fix error when opening SQL window

  • Loading branch information
m-kuhn committed Jul 3, 2016
1 parent 0fccb07 commit 5e36de70b026b0986bd51640d6470933783cd4e6
Showing with 0 additions and 1 deletion.
  1. +0 −1 python/plugins/db_manager/dlg_sql_window.py
@@ -70,7 +70,6 @@ def __init__(self, iface, db, parent=None):

self.editSql.setFocus()
self.editSql.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.editSql.setMarginVisible(True)
self.initCompleter()

# allow copying results

5 comments on commit 5e36de7

@jef-n

This comment has been minimized.

Copy link
Member

@jef-n jef-n replied Jul 3, 2016

This rolls back d9f934f. Under which circumstance does it produce an error?

@m-kuhn

This comment has been minimized.

Copy link
Member Author

@m-kuhn m-kuhn replied Jul 3, 2016

I don't know about anything special, I just tried to open an SQL window... Will check

@m-kuhn

This comment has been minimized.

Copy link
Member Author

@m-kuhn m-kuhn replied Jul 3, 2016

Which class provides this method?

I cannot find it in the QScintilla doc nor in the QAbstractScrollView doc.


AttributeError: 'SqlEdit' object has no attribute 'setMarginVisible' 
Traceback (most recent call last):
  File "build/output/python/plugins/db_manager/db_manager.py", line 194, in runSqlWindow
    query = DlgSqlWindow(self.iface, db, self)
  File "build/output/python/plugins/db_manager/dlg_sql_window.py", line 73, in __init__
    self.editSql.setMarginVisible(True)
AttributeError: 'SqlEdit' object has no attribute 'setMarginVisible'

@jef-n

This comment has been minimized.

Copy link
Member

@jef-n jef-n replied Jul 3, 2016

QgsCodeEditor::setMarginVisible - probably fails where QgsCodeEditor is not available in python because of missing QScintilla sip files (see HAVE_QSCI_SIP). Fixed in a6954b2

@m-kuhn

This comment has been minimized.

Copy link
Member Author

@m-kuhn m-kuhn replied Jul 3, 2016

Thanks 👍

Please sign in to comment.
You can’t perform that action at this time.