removed multi-callback based distant search result handling, and use rsEvents instead

This commit is contained in:
csoler 2020-06-16 21:13:55 +02:00
parent 8e2c670716
commit 33da5c06b8
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
15 changed files with 204 additions and 123 deletions

View file

@ -463,6 +463,12 @@ void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<
item->setData(COLUMN_DATA, ROLE_NAME, itemInfo.name);
item->setData(COLUMN_DATA, ROLE_DESCRIPTION, itemInfo.description);
// Add children for context strings. This happens in the search.
while(nullptr != item->takeChild(0));
for(auto str:itemInfo.context_strings)
item->addChild(new QTreeWidgetItem(QStringList(QString::fromUtf8(str.c_str()))));
/* Set last post */
qlonglong lastPost = itemInfo.lastpost.toTime_t();
item->setData(COLUMN_DATA, ROLE_LASTPOST, -lastPost); // negative for correct sorting