mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
Fixed GxsGroup TreeWidget's Context Menu by Phenom
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7387 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f54162db76
commit
5e1099f47f
@ -297,12 +297,22 @@ QString GroupTreeWidget::itemId(QTreeWidgetItem *item)
|
||||
return "";
|
||||
}
|
||||
|
||||
return item->data(COLUMN_DATA, ROLE_ID).toString();
|
||||
}
|
||||
|
||||
void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<GroupItemInfo> &itemList)
|
||||
{
|
||||
if (categoryItem == NULL) {
|
||||
return item->data(COLUMN_DATA, ROLE_ID).toString();
|
||||
}
|
||||
|
||||
QString GroupTreeWidget::itemIdAt(QPoint &point)
|
||||
{
|
||||
QTreeWidgetItem *item = ui->treeWidget->itemAt(point);
|
||||
if (item == NULL) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return item->data(COLUMN_DATA, ROLE_ID).toString();
|
||||
}
|
||||
|
||||
void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<GroupItemInfo> &itemList)
|
||||
{
|
||||
if (categoryItem == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -80,12 +80,13 @@ public:
|
||||
void processSettings(RshareSettings *settings, bool load);
|
||||
|
||||
// Add a new category item
|
||||
QTreeWidgetItem *addCategoryItem(const QString &name, const QIcon &icon, bool expand);
|
||||
// Get id of item
|
||||
QString itemId(QTreeWidgetItem *item);
|
||||
// Fill items of a group
|
||||
void fillGroupItems(QTreeWidgetItem *categoryItem, const QList<GroupItemInfo> &itemList);
|
||||
// Set the unread count of an item
|
||||
QTreeWidgetItem *addCategoryItem(const QString &name, const QIcon &icon, bool expand);
|
||||
// Get id of item
|
||||
QString itemId(QTreeWidgetItem *item);
|
||||
QString itemIdAt(QPoint &point);
|
||||
// Fill items of a group
|
||||
void fillGroupItems(QTreeWidgetItem *categoryItem, const QList<GroupItemInfo> &itemList);
|
||||
// Set the unread count of an item
|
||||
void setUnreadCount(QTreeWidgetItem *item, int unreadCount);
|
||||
|
||||
QTreeWidgetItem *getItemFromId(const QString &id);
|
||||
|
@ -206,7 +206,7 @@ void GxsGroupFrameDialog::todo()
|
||||
|
||||
void GxsGroupFrameDialog::groupTreeCustomPopupMenu(QPoint point)
|
||||
{
|
||||
QString id = "" ;//ui->groupTreeWidget->itemIdAt(point);
|
||||
QString id = ui->groupTreeWidget->itemIdAt(point);
|
||||
if (id.isEmpty()) return;
|
||||
|
||||
mGroupId = RsGxsGroupId(id.toStdString());
|
||||
|
Loading…
Reference in New Issue
Block a user