mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-27 10:05:51 -04:00
fixed forum search by content (patch from Phenom)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7720 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
21fe2413cd
commit
d164428bf9
4 changed files with 22 additions and 9 deletions
|
@ -45,6 +45,7 @@ GxsForumsFillThread::GxsForumsFillThread(GxsForumThreadWidget *parent)
|
|||
mFillComplete = false;
|
||||
|
||||
mFilterColumn = 0;
|
||||
mFilterString = QString();
|
||||
|
||||
mViewType = 0;
|
||||
mFlatView = false;
|
||||
|
@ -110,7 +111,7 @@ void GxsForumsFillThread::run()
|
|||
service->requestMsgInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, grpIds);
|
||||
|
||||
/* wait for the answer */
|
||||
uint32_t requestStatus;
|
||||
uint32_t requestStatus = RsTokenService::GXS_REQUEST_V2_STATUS_PENDING;
|
||||
while (!wasStopped()) {
|
||||
requestStatus = service->requestStatus(token);
|
||||
if (requestStatus == RsTokenService::GXS_REQUEST_V2_STATUS_FAILED ||
|
||||
|
@ -176,7 +177,7 @@ void GxsForumsFillThread::run()
|
|||
std::cerr << "GxsForumsFillThread::run() Adding TopLevel Thread: mId: " << msg.mMeta.mMsgId << std::endl;
|
||||
#endif
|
||||
|
||||
QTreeWidgetItem *item = mParent->convertMsgToThreadWidget(msg, mUseChildTS, mFilterColumn);
|
||||
QTreeWidgetItem *item = mParent->convertMsgToThreadWidget(msg, mUseChildTS, mFilterColumn, mFilterString);
|
||||
if (!mFlatView) {
|
||||
threadList.push_back(QPair<std::string, QTreeWidgetItem*>(msg.mMeta.mMsgId.toStdString(), item));
|
||||
}
|
||||
|
@ -218,9 +219,16 @@ void GxsForumsFillThread::run()
|
|||
std::cerr << "GxsForumsFillThread::run() adding " << msg.mMeta.mMsgId << std::endl;
|
||||
#endif
|
||||
|
||||
QTreeWidgetItem *item = mParent->convertMsgToThreadWidget(msg, mUseChildTS, mFilterColumn);
|
||||
QTreeWidgetItem *item = mParent->convertMsgToThreadWidget(msg, mUseChildTS, mFilterColumn, mFilterString);
|
||||
threadPair.second->addChild(item);
|
||||
|
||||
if ( !item->isHidden() && threadPair.second->isHidden() ){
|
||||
threadPair.second->setHidden(false);
|
||||
for (QTreeWidgetItem *cursIt = threadPair.second->parent(); cursIt; cursIt = cursIt->parent()){
|
||||
cursIt->setHidden(false);
|
||||
}
|
||||
}
|
||||
|
||||
calculateExpand(msg, item);
|
||||
|
||||
/* add item to process list */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue