mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 14:10:54 -04:00
added paste multiple links
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2516 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ff0b797248
commit
0705d9dfc7
7 changed files with 74 additions and 75 deletions
|
@ -254,11 +254,8 @@ void SearchDialog::searchtableWidgetCostumPopupMenu( QPoint point )
|
|||
contextMnu->addAction( downloadAct);
|
||||
contextMnu->addSeparator();
|
||||
|
||||
if ((ui.searchResultWidget->selectedItems()).size() == 1)
|
||||
{
|
||||
contextMnu->addAction( copysearchlinkAct);
|
||||
contextMnu->addAction( sendrslinkAct);
|
||||
}
|
||||
contextMnu->addAction( copysearchlinkAct);
|
||||
contextMnu->addAction( sendrslinkAct);
|
||||
}
|
||||
|
||||
QMouseEvent *mevent = new QMouseEvent(QEvent::MouseButtonPress,point,Qt::RightButton, Qt::RightButton,Qt::NoModifier);
|
||||
|
@ -1195,26 +1192,31 @@ void SearchDialog::copysearchLink()
|
|||
int numdls = itemsForCopy.size();
|
||||
QTreeWidgetItem * item;
|
||||
|
||||
QList<QUrl> urls ;
|
||||
|
||||
for (int i = 0; i < numdls; ++i)
|
||||
{
|
||||
item = itemsForCopy.at(i);
|
||||
// call copy
|
||||
{
|
||||
item = itemsForCopy.at(i);
|
||||
// call copy
|
||||
|
||||
if (!item->childCount())
|
||||
{
|
||||
std::cerr << "SearchDialog::copysearchLink() Calling set retroshare link";
|
||||
std::cerr << std::endl;
|
||||
if (!item->childCount())
|
||||
{
|
||||
std::cerr << "SearchDialog::copysearchLink() Calling set retroshare link";
|
||||
std::cerr << std::endl;
|
||||
|
||||
QString fhash = item->text(SR_HASH_COL);
|
||||
qulonglong fsize = item->text(SR_REALSIZE_COL).toULongLong();
|
||||
QString fname = item->text(SR_NAME_COL);
|
||||
QString fhash = item->text(SR_HASH_COL);
|
||||
qulonglong fsize = item->text(SR_REALSIZE_COL).toULongLong();
|
||||
QString fname = item->text(SR_NAME_COL);
|
||||
|
||||
RetroShareLink link(fname, fsize, fhash);
|
||||
RetroShareLink link(fname, fsize, fhash);
|
||||
|
||||
QApplication::clipboard()->setText(link.toString());
|
||||
break ;
|
||||
}
|
||||
}
|
||||
if(link.valid())
|
||||
urls.push_back(link.toUrl()) ;
|
||||
}
|
||||
}
|
||||
QMimeData *dt = new QMimeData;
|
||||
dt->setUrls(urls) ;
|
||||
QApplication::clipboard()->setMimeData(dt) ;
|
||||
}
|
||||
|
||||
void SearchDialog::sendLinkTo( )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue