Skip to content

Commit

Permalink
[dbmanager] Fix error when opening SQL window
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jul 3, 2016
1 parent 0fccb07 commit 5e36de7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion python/plugins/db_manager/dlg_sql_window.py
Expand Up @@ -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
Expand Down

5 comments on commit 5e36de7

@jef-n
Copy link
Member

@jef-n jef-n commented on 5e36de7 Jul 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@m-kuhn
Copy link
Member Author

@m-kuhn m-kuhn commented on 5e36de7 Jul 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@m-kuhn
Copy link
Member Author

@m-kuhn m-kuhn commented on 5e36de7 Jul 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

@jef-n jef-n commented on 5e36de7 Jul 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member Author

@m-kuhn m-kuhn commented on 5e36de7 Jul 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

Please sign in to comment.