Fixed x86 build

This commit is contained in:
thunder2 2023-05-28 00:48:10 +02:00
parent c579f0b0d1
commit d642fde9d5
3 changed files with 8 additions and 8 deletions

View File

@ -117,14 +117,14 @@ int RsGxsForumModel::columnCount(const QModelIndex &/*parent*/) const
return COLUMN_THREAD_NB_COLUMNS ;
}
std::vector<std::pair<time_t,RsGxsMessageId> > RsGxsForumModel::getPostVersions(const RsGxsMessageId& mid) const
std::vector<std::pair<rstime_t,RsGxsMessageId> > RsGxsForumModel::getPostVersions(const RsGxsMessageId& mid) const
{
auto it = mPostVersions.find(mid);
if(it != mPostVersions.end())
return it->second;
else
return std::vector<std::pair<time_t,RsGxsMessageId> >();
return std::vector<std::pair<rstime_t,RsGxsMessageId> >();
}
bool RsGxsForumModel::getPostData(const QModelIndex& i,ForumModelPostEntry& fmpe) const
@ -746,7 +746,7 @@ void RsGxsForumModel::clear()
emit forumLoaded();
}
void RsGxsForumModel::setPosts(const RsGxsForumGroup& group, const std::vector<ForumModelPostEntry>& posts,const std::map<RsGxsMessageId,std::vector<std::pair<time_t,RsGxsMessageId> > >& post_versions)
void RsGxsForumModel::setPosts(const RsGxsForumGroup& group, const std::vector<ForumModelPostEntry>& posts,const std::map<RsGxsMessageId,std::vector<std::pair<rstime_t,RsGxsMessageId> > >& post_versions)
{
preMods();
@ -812,7 +812,7 @@ void RsGxsForumModel::update_posts(const RsGxsGroupId& group_id)
// 2 - sort messages into a proper hierarchy
auto post_versions = new std::map<RsGxsMessageId,std::vector<std::pair<time_t, RsGxsMessageId> > >() ;
auto post_versions = new std::map<RsGxsMessageId,std::vector<std::pair<rstime_t, RsGxsMessageId> > >() ;
std::vector<ForumPostEntry> *vect = new std::vector<ForumPostEntry>();
RsGxsForumGroup group = groups[0];

View File

@ -77,7 +77,7 @@ public:
static const QString FilterString ;
std::vector<std::pair<time_t,RsGxsMessageId> > getPostVersions(const RsGxsMessageId& mid) const;
std::vector<std::pair<rstime_t,RsGxsMessageId> > getPostVersions(const RsGxsMessageId& mid) const;
// This method will asynchroneously update the data
void updateForum(const RsGxsGroupId& forumGroup);
@ -170,11 +170,11 @@ private:
static void convertMsgToPostEntry(const RsGxsForumGroup &mForumGroup, const RsMsgMetaData &msg, bool useChildTS, ForumModelPostEntry& fentry);
void computeMessagesHierarchy(const RsGxsForumGroup& forum_group, const std::vector<RsMsgMetaData> &msgs_array, std::vector<ForumModelPostEntry>& posts, std::map<RsGxsMessageId, std::vector<std::pair<time_t, RsGxsMessageId> > > &mPostVersions);
void setPosts(const RsGxsForumGroup& group, const std::vector<ForumModelPostEntry>& posts,const std::map<RsGxsMessageId,std::vector<std::pair<time_t,RsGxsMessageId> > >& post_versions);
void setPosts(const RsGxsForumGroup& group, const std::vector<ForumModelPostEntry>& posts,const std::map<RsGxsMessageId,std::vector<std::pair<rstime_t,RsGxsMessageId> > >& post_versions);
void initEmptyHierarchy(std::vector<ForumModelPostEntry>& posts);
std::vector<ForumModelPostEntry> mPosts ; // store the list of posts updated from rsForums.
std::map<RsGxsMessageId,std::vector<std::pair<time_t,RsGxsMessageId> > > mPostVersions;
std::map<RsGxsMessageId,std::vector<std::pair<rstime_t,RsGxsMessageId> > > mPostVersions;
QColor mTextColorRead ;
QColor mTextColorUnread ;

View File

@ -1193,7 +1193,7 @@ void GxsForumThreadWidget::insertMessage()
// add/show combobox for versions, if applicable, and enable it. If no older versions of the post available, hide the combobox.
std::vector<std::pair<time_t,RsGxsMessageId> > post_versions = mThreadModel->getPostVersions(mOrigThreadId);
std::vector<std::pair<rstime_t,RsGxsMessageId> > post_versions = mThreadModel->getPostVersions(mOrigThreadId);
#ifdef DEBUG_FORUMS
std::cerr << "Looking into existing versions for post " << mOrigThreadId << ", thread history: " << post_versions.size() << std::endl;