PeersDialog/MessengerWindow:

- send recommended friend as message
- paste recommended friends as "retroshare://person|..." from clipboard

reworked retroshare link handling
- added new type -> retroshare://person|<name>|<hash>
- added processing of links to RetroShareLink and RSLinkClipboard and removed all processing in anchorClicked of QTextBrowser 
- fixed parseClipboard to handle all found links in clipboard
- disabled the processing of the clickable links (RetroShareLink::processUrl), because QUrl can't handle the RetroShare links properly

removed memory leaks of the QAction in some context menus


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3292 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-07-15 11:25:34 +00:00
parent 3291e61291
commit daf0ea50ee
21 changed files with 712 additions and 525 deletions

View file

@ -221,13 +221,15 @@ void SharedFilesDialog::forceCheck()
void SharedFilesDialog::shareddirtreeviewCostumPopupMenu( QPoint point )
{
downloadAct = new QAction(QIcon(IMAGE_DOWNLOAD), tr( "Download" ), this );
QMenu contextMnu( this );
QAction *downloadAct = new QAction(QIcon(IMAGE_DOWNLOAD), tr( "Download" ), &contextMnu );
connect( downloadAct , SIGNAL( triggered() ), this, SLOT( downloadRemoteSelected() ) );
copyremotelinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Copy retroshare Link" ), this );
QAction *copyremotelinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Copy retroshare Link" ), &contextMnu );
connect( copyremotelinkAct , SIGNAL( triggered() ), this, SLOT( copyLinkRemote() ) );
sendremotelinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Link" ), this );
QAction *sendremotelinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Link" ), &contextMnu );
connect( sendremotelinkAct , SIGNAL( triggered() ), this, SLOT( sendremoteLinkTo( ) ) );
@ -235,7 +237,6 @@ void SharedFilesDialog::shareddirtreeviewCostumPopupMenu( QPoint point )
// connect( addMsgAct , SIGNAL( triggered() ), this, SLOT( addMsgRemoteSelected() ) );
QMenu contextMnu( this );
contextMnu.addAction( downloadAct);
contextMnu.addSeparator();
contextMnu.addAction( copyremotelinkAct);
@ -291,7 +292,7 @@ void SharedFilesDialog::copyLink (const QModelIndexList& lst, bool remote)
RetroShareLink link(details.name.c_str(), details.count, details.hash.c_str());
if(link.valid())
if(link.valid() && link.type() == RetroShareLink::TYPE_FILE)
urls.push_back(link) ;
}
}
@ -299,7 +300,7 @@ void SharedFilesDialog::copyLink (const QModelIndexList& lst, bool remote)
{
RetroShareLink link(details.name.c_str(), details.count, details.hash.c_str());
if(link.valid())
if(link.valid() && link.type() == RetroShareLink::TYPE_FILE)
urls.push_back(link) ;
}
}