X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fabstractsqlstorage.h;h=c6c55212c40862f8b29baa70e3aa1dea15042a18;hp=cc9f619ab29db20a288888c9134cf52edc67d056;hb=f48d324241a262695fed259e87bbf7cf83ab9df0;hpb=f6781dc095957d65e8fc1683fda1c5a5b9cbedbb diff --git a/src/core/abstractsqlstorage.h b/src/core/abstractsqlstorage.h index cc9f619a..c6c55212 100644 --- a/src/core/abstractsqlstorage.h +++ b/src/core/abstractsqlstorage.h @@ -72,6 +72,16 @@ protected: inline virtual QString userName() { return QString(); } inline virtual QString password() { return QString(); } + + //! Initialize db specific features on connect + /** This is called every time a connection to a specific SQL backend is established + * the default implementation does nothing. + * + * When reimplementing this method, don't use logDB() inside this function as + * this would cause as we're just about to initialize that DB connection. + */ + inline virtual void initDbSession(QSqlDatabase & /* db */) {} + private slots: void connectionDestroyed();