diff --git a/src/libtomahawk/sip/SipPlugin.h b/src/libtomahawk/sip/SipPlugin.h index 002f9b242..4a882b3d4 100644 --- a/src/libtomahawk/sip/SipPlugin.h +++ b/src/libtomahawk/sip/SipPlugin.h @@ -94,7 +94,8 @@ public slots: // so plugins can clean up after themselves virtual void deletePlugin(); - virtual void reset() {} + //called when there is a new database + virtual void reset() = 0; signals: void error( int, const QString& ); diff --git a/src/sip/jabber/jabber.h b/src/sip/jabber/jabber.h index f77d6bda3..bbdbab73c 100644 --- a/src/sip/jabber/jabber.h +++ b/src/sip/jabber/jabber.h @@ -97,6 +97,8 @@ public slots: void refreshProxy(); void showAddFriendDialog(); + virtual void reset() {} + protected: virtual QString defaultSuffix() const; diff --git a/src/sip/twitter/twitter.cpp b/src/sip/twitter/twitter.cpp index 4fb5befbe..50791ef3a 100644 --- a/src/sip/twitter/twitter.cpp +++ b/src/sip/twitter/twitter.cpp @@ -785,6 +785,18 @@ TwitterPlugin::checkSettings() connectPlugin( false ); } + +void +TwitterPlugin::reset() +{ + qDebug() << Q_FUNC_INFO; + setTwitterCachedDirectMessagesSinceId( 0 ); + setTwitterCachedFriendsSinceId( 0 ); + setTwitterCachedMentionsSinceId( 0 ); + setTwitterCachedPeers( QHash< QString, QVariant >() ); +} + + QString TwitterPlugin::twitterScreenName() const { diff --git a/src/sip/twitter/twitter.h b/src/sip/twitter/twitter.h index 508cacceb..470bbb386 100644 --- a/src/sip/twitter/twitter.h +++ b/src/sip/twitter/twitter.h @@ -78,6 +78,7 @@ signals: public slots: virtual bool connectPlugin( bool startup ); void disconnectPlugin(); + virtual void reset(); void checkSettings(); void refreshProxy(); void deletePlugin(); diff --git a/src/sip/zeroconf/zeroconf.h b/src/sip/zeroconf/zeroconf.h index c60e43698..d345d524c 100644 --- a/src/sip/zeroconf/zeroconf.h +++ b/src/sip/zeroconf/zeroconf.h @@ -67,6 +67,8 @@ public slots: virtual bool connectPlugin( bool startup ); void disconnectPlugin(); + virtual void reset() {} + void sendMsg( const QString& , const QString& ) {} void broadcastMsg( const QString & ) {} void addContact( const QString &, const QString& ) {}