From cef70ef3df23b6aab181aaa90d29f89cb4ce6366 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Sun, 28 Sep 2014 22:33:17 +0000 Subject: [PATCH] Fixed load/save config of FeedReader plugin git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7574 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- plugins/FeedReader/FeedReaderPlugin.cpp | 21 +++++++-------------- plugins/FeedReader/FeedReaderPlugin.h | 3 ++- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/plugins/FeedReader/FeedReaderPlugin.cpp b/plugins/FeedReader/FeedReaderPlugin.cpp index 4e4892144..8b69bbb5c 100644 --- a/plugins/FeedReader/FeedReaderPlugin.cpp +++ b/plugins/FeedReader/FeedReaderPlugin.cpp @@ -86,6 +86,13 @@ FeedReaderPlugin::FeedReaderPlugin() void FeedReaderPlugin::setInterfaces(RsPlugInInterfaces &interfaces) { mInterfaces = interfaces; + + //Todo: Replace with gxs forums + mFeedReader = new p3FeedReader(mPlugInHandler, NULL /*mInterfaces.mForums*/); + rsFeedReader = mFeedReader; + + mNotify = new FeedReaderNotify(); + mFeedReader->setNotify(mNotify); } ConfigPage *FeedReaderPlugin::qt_config_page() const @@ -110,20 +117,6 @@ FeedNotify *FeedReaderPlugin::qt_feedNotify() return mFeedNotify; } -p3Service *FeedReaderPlugin::p3_service() const -{ - if (mFeedReader == NULL) { - //Todo: Replace with gxs forums - mFeedReader = new p3FeedReader(mPlugInHandler, NULL /*mInterfaces.mForums*/); - rsFeedReader = mFeedReader; - - mNotify = new FeedReaderNotify(); - mFeedReader->setNotify(mNotify); - } - - return mFeedReader; -} - void FeedReaderPlugin::stop() { if (mFeedReader) { diff --git a/plugins/FeedReader/FeedReaderPlugin.h b/plugins/FeedReader/FeedReaderPlugin.h index 757b2f14a..e51010a85 100644 --- a/plugins/FeedReader/FeedReaderPlugin.h +++ b/plugins/FeedReader/FeedReaderPlugin.h @@ -36,7 +36,8 @@ public: FeedReaderPlugin(); virtual uint16_t rs_service_id() const { return RS_SERVICE_TYPE_PLUGIN_FEEDREADER; } - virtual p3Service *p3_service() const; + virtual p3Service *p3_service() const { return mFeedReader; } + virtual p3Config *p3_config() const { return mFeedReader; } virtual void stop(); virtual MainPage *qt_page() const;