mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 23:25:32 -04:00
Addition of sorting algorithms to the LinksDialog.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@330 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
63e177b6ef
commit
07a458367b
2 changed files with 192 additions and 26 deletions
|
@ -344,7 +344,14 @@ void LinksDialog::updateLinks()
|
|||
QTreeWidgetItem *child = new QTreeWidgetItem((QTreeWidget*)0);
|
||||
|
||||
/* (0) Comment */
|
||||
child -> setText(0, QString::fromStdWString(cit->comment));
|
||||
if (cit->comment != L"")
|
||||
{
|
||||
child -> setText(0, QString::fromStdWString(cit->comment));
|
||||
}
|
||||
else
|
||||
{
|
||||
child -> setText(0, "No Comment");
|
||||
}
|
||||
|
||||
/* (2) Peer / Date */
|
||||
{
|
||||
|
@ -412,14 +419,12 @@ void LinksDialog::openLink ( QTreeWidgetItem * item, int column )
|
|||
return;
|
||||
}
|
||||
|
||||
std::cerr << "LinksDialog::openLink() " << (item->text(0)).toStdString() << std::endl;
|
||||
std::cerr << "LinksDialog::openLink() " << (item->text(2)).toStdString() << std::endl;
|
||||
/* open a browser */
|
||||
QUrl url(item->text(0));
|
||||
QUrl url(item->text(2));
|
||||
QDesktopServices::openUrl ( url );
|
||||
|
||||
/* close expansion */
|
||||
//ui.linkTreeWidget->collapseItem(item);
|
||||
|
||||
bool state = item->isExpanded();
|
||||
item->setExpanded(!state);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue