X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fabstractsqlstorage.h;h=8990551348d60446695c94bdc77d63c34cb0e193;hb=745f33ace5377addd6fec7991db594dd8c64984d;hp=cc9f619ab29db20a288888c9134cf52edc67d056;hpb=f6781dc095957d65e8fc1683fda1c5a5b9cbedbb;p=quassel.git diff --git a/src/core/abstractsqlstorage.h b/src/core/abstractsqlstorage.h index cc9f619a..89905513 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(); @@ -188,6 +198,7 @@ public: QString buffercname; int buffertype; int lastseenmsgid; + int markerlinemsgid; QString key; bool joined; };