Skip to content

Commit

Permalink
revive QSqlDatabase (followup c894357)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Sep 30, 2015
1 parent c531b2d commit 2126011
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions python/core/auth/qgsauthmanager.sip
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
class QSqlDatabase;

class QgsAuthManager : QObject
{
%TypeHeaderCode
Expand Down
1 change: 1 addition & 0 deletions python/core/core.sip
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
%Import QtGui/QtGuimod.sip
%Import QtXml/QtXmlmod.sip
%Import QtNetwork/QtNetworkmod.sip
%Import QtSql/QtSqlmod.sip

%Include conversions.sip
%Include qgsexception.sip
Expand Down

5 comments on commit 2126011

@dakcarto
Copy link
Member

Choose a reason for hiding this comment

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

Hi @jef-n,

Can you give a little background on this? Was the QtSql module previously deprecated in favor of some custom Qgs* SQLite implementation.

Or, is this just a sip import that was previously dropped because it was unneeded in bindings?

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jef-n do you know what package provides QtSql python bindings on ubuntu/debian? I'm (also Travis) getting a "No module named QtSql" error on startup now, and can't work out how to satisfy this dependancy.

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

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

actually ignore that - it's python-qt4-sql

@jef-n
Copy link
Member Author

@jef-n jef-n commented on 2126011 Sep 30, 2015

Choose a reason for hiding this comment

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

@dakcarto QSqlDatabase was masked by this. Using QSqlDatabase.removeDatabase produced
AttributeError: type object 'QSqlDatabase' has no attribute 'removeDatabase'

@dakcarto
Copy link
Member

Choose a reason for hiding this comment

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

Oh that makes sense. Thanks for the explanation.

Please sign in to comment.