fixed compilation

This commit is contained in:
csoler 2019-12-13 23:58:17 +01:00
parent 3a3fc25205
commit 536c0852d4
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
3 changed files with 10 additions and 13 deletions

View File

@ -192,10 +192,10 @@ void NewsFeed::handleEvent_main_thread(std::shared_ptr<const RsEvent> event)
if(event->mType == RsEventType::GXS_FORUMS && (flags & RS_FEED_TYPE_FORUM))
handleForumEvent(event);
if(event->mType == RsEventType::GXS_POSTED && (flags & RS_FEED_TYPE_MSG))
if(event->mType == RsEventType::GXS_POSTED && (flags & RS_FEED_TYPE_POSTED))
handleMailEvent(event);
if(event->mType == RsEventType::MAIL_STATUS_CHANGE && (flags & RS_FEED_TYPE_MAIL))
if(event->mType == RsEventType::MAIL_STATUS_CHANGE && (flags & RS_FEED_TYPE_MSG))
handlePostedEvent(event);
}
@ -532,22 +532,22 @@ void NewsFeed::updateDisplay()
break;
#endif
#ifdef TO_REMOVE
case RS_FEED_ITEM_CHAT_NEW:
if (flags & RS_FEED_TYPE_CHAT)
addFeedItemChatNew(fi, false);
break;
#ifdef TO_REMOVE
case RS_FEED_ITEM_MESSAGE:
if (flags & RS_FEED_TYPE_MSG)
addFeedItemMessage(fi);
break;
#endif
case RS_FEED_ITEM_FILES_NEW:
if (flags & RS_FEED_TYPE_FILES)
addFeedItemFilesNew(fi);
break;
#endif
default:
std::cerr << "(EE) Unknown type " << std::hex << fi.mType << std::dec << " in news feed." << std::endl;
@ -1566,7 +1566,6 @@ void NewsFeed::addFeedItemBlogMsg(const RsFeedItem &fi)
#endif
}
#endif
void NewsFeed::addFeedItemChatNew(const RsFeedItem &fi, bool addWithoutCheck)
{
@ -1587,7 +1586,6 @@ void NewsFeed::addFeedItemChatNew(const RsFeedItem &fi, bool addWithoutCheck)
addFeedItem(cm);
}
#ifdef TO_REMOVE
void NewsFeed::addFeedItemMessage(const RsFeedItem &fi)
{
/* make new widget */
@ -1689,7 +1687,6 @@ void NewsFeed::deleteFeedItem(QWidget *item, uint32_t /*type*/)
}
}
#ifdef TO_REMOVE
void NewsFeed::openChat(const RsPeerId &peerId)
{
#ifdef NEWS_DEBUG
@ -1705,7 +1702,6 @@ void NewsFeed::openComments(uint32_t /*type*/, const RsGxsGroupId &/*groupId*/,
std::cerr << "NewsFeed::openComments() Not Handled Yet";
std::cerr << std::endl;
}
#endif
static void sendNewsFeedChangedCallback(FeedItem *feedItem, void *data)
{

View File

@ -56,7 +56,7 @@ class RsFeedItem;
class FeedNotify;
class FeedItem;
class NewsFeed : public RsAutoUpdatePage, public FeedHolder, public TokenResponse
class NewsFeed : public RsAutoUpdatePage, public FeedHolder
{
Q_OBJECT
@ -75,8 +75,8 @@ public:
/* FeedHolder Functions (for FeedItem functionality) */
virtual QScrollArea *getScrollArea();
virtual void deleteFeedItem(QWidget *item, uint32_t type);
// virtual void openChat(const RsPeerId& peerId);
// virtual void openComments(uint32_t type, const RsGxsGroupId &groupId, const QVector<RsGxsMessageId> &versions, const RsGxsMessageId &msgId, const QString &title);
virtual void openChat(const RsPeerId& peerId);
virtual void openComments(uint32_t type, const RsGxsGroupId &groupId, const QVector<RsGxsMessageId> &versions, const RsGxsMessageId &msgId, const QString &title);
static void testFeeds(uint notifyFlags);
static void testFeed(FeedNotify *feedNotify);
@ -107,6 +107,7 @@ private:
void handleConnectionEvent(std::shared_ptr<const RsEvent> event);
void handleCircleEvent(std::shared_ptr<const RsEvent> event);
void handleForumEvent(std::shared_ptr<const RsEvent> event);
void handleMailEvent(std::shared_ptr<const RsEvent> event);
void handlePostedEvent(std::shared_ptr<const RsEvent> event);
void handleChannelEvent(std::shared_ptr<const RsEvent> event);

View File

@ -35,8 +35,8 @@ public:
virtual QScrollArea *getScrollArea() = 0;
virtual void deleteFeedItem(QWidget *item, uint32_t type) = 0;
// virtual void openChat(const RsPeerId& peerId) = 0;
// virtual void openComments(uint32_t type, const RsGxsGroupId &groupId, const QVector<RsGxsMessageId> &msg_versions, const RsGxsMessageId &msgId, const QString &title)=0;
virtual void openChat(const RsPeerId& peerId) = 0;
virtual void openComments(uint32_t type, const RsGxsGroupId &groupId, const QVector<RsGxsMessageId> &msg_versions, const RsGxsMessageId &msgId, const QString &title)=0;
// Workaround for QTBUG-3372
void lockLayout(QWidget *feedItem, bool lock);