mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-29 19:11:24 -04:00
Fixed navigate to channel post when clicking a channel post link.
Fixed navigate to forum message when clicking a forum message link. Fixed copy of forum message link to clipboard git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7640 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6c2cc75f2b
commit
cfd6a7b8b5
15 changed files with 129 additions and 45 deletions
|
@ -316,6 +316,23 @@ QTreeWidgetItem *RSFeedWidget::findTreeWidgetItem(FeedItem *feedItem)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
bool RSFeedWidget::scrollTo(FeedItem *feedItem, bool focus)
|
||||
{
|
||||
QTreeWidgetItem *item = findTreeWidgetItem(feedItem);
|
||||
if (!feedItem) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ui->treeWidget->scrollToItem(item);
|
||||
ui->treeWidget->setCurrentItem(item);
|
||||
|
||||
if (focus) {
|
||||
ui->treeWidget->setFocus();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
class RSFeedWidgetCallback
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -67,6 +67,8 @@ public:
|
|||
void enableRemove(bool enable);
|
||||
void setSelectionMode(QAbstractItemView::SelectionMode mode);
|
||||
|
||||
bool scrollTo(FeedItem *feedItem, bool focus);
|
||||
|
||||
void withAll(RSFeedWidgetCallbackFunction callback, const QVariant &data);
|
||||
FeedItem *findFeedItem(RSFeedWidgetFindCallbackFunction callback, const QVariant &data1, const QVariant &data2);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue