Bug report #19309

DB Manager exception on SQL Window open

Added by Tõnis Kärdi over 5 years ago. Updated over 5 years ago.

Status:Closed
Priority:High
Assignee:-
Category:DB Manager
Affected QGIS version:3.2 Regression?:Yes
Operating System:Ubuntu 16.04.4 Xenial Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27137

Description

After upgrade to QGIS 3.2 Bonn, opening a "SQL window" in DB Manager raises an exception:

AttributeError: type object 'QKeySequence' has no attribute 'Cancel'

Traceback (most recent call last):
  File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line 195, in runSqlWindow
    query = DlgSqlWindow(self.iface, db, self)
  File "/usr/share/qgis/python/plugins/db_manager/dlg_sql_window.py", line 99, in __init__
    self.btnCancel.setShortcut(QKeySequence.Cancel)
AttributeError: type object 'QKeySequence' has no attribute 'Cancel'

and does not open a new sql window.

OS: Ubuntu 16.04.4 xenial x86_64
Python version: 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609]
QGIS version: 3.2.0-Bonn Bonn, bc43194
QGIS installed from https://qgis.org/ubuntugis using ubuntugis-unstable deps.
QGIS About window says the Qt version compiled against is 5.5.1 and running against 5.5.1 aswell.


Related issues

Duplicates QGIS Application - Bug report #18941: Can't edit GeoPackage using SQL through DBManager Closed 2018-05-12

Associated revisions

Revision 9d8202b6
Added by Nyall Dawson over 5 years ago

[dbmanager] Fix exception on older Qt builds

Fixes #19309

Revision c9f23fdf
Added by Nyall Dawson over 5 years ago

[dbmanager] Fix exception on older Qt builds

Fixes #19309

(cherry-picked from 9d8202b6)

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Regression? changed from No to Yes
  • Priority changed from Normal to High

#2 Updated by Nyall Dawson over 5 years ago

  • Pull Request or Patch supplied changed from No to Yes

#3 Updated by Nyall Dawson over 5 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

#4 Updated by Jürgen Fischer over 5 years ago

  • Duplicates Bug report #18941: Can't edit GeoPackage using SQL through DBManager added

Also available in: Atom PDF