mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-24 16:51:25 -04:00
changed the usage of "QMenu*" to a local "QMenu"
removed usage of "new QMouseEvent", it was a memory leak cleaned some includes git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2910 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e49cc6552c
commit
c3c6480f4b
30 changed files with 68 additions and 297 deletions
|
@ -38,14 +38,7 @@
|
|||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include <QContextMenuEvent>
|
||||
#include <QMenu>
|
||||
#include <QCursor>
|
||||
#include <QPoint>
|
||||
#include <QMouseEvent>
|
||||
#include <QPixmap>
|
||||
#include <QMessageBox>
|
||||
#include <QHeaderView>
|
||||
#include <QTimer>
|
||||
|
||||
/* Images for context menu icons */
|
||||
|
@ -144,7 +137,6 @@ void LinksDialog::linkTreeWidgetCostumPopupMenu( QPoint point )
|
|||
{
|
||||
|
||||
QMenu contextMnu( this );
|
||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
||||
|
||||
voteupAct = new QAction(QIcon(IMAGE_EXPORTFRIEND), tr( "Share Link Anonymously" ), this );
|
||||
connect( voteupAct , SIGNAL( triggered() ), this, SLOT( voteup_anon() ) );
|
||||
|
@ -172,14 +164,13 @@ void LinksDialog::linkTreeWidgetCostumPopupMenu( QPoint point )
|
|||
downloadAct = new QAction(QIcon(IMAGE_DOWNLOAD), tr("Download"), this);
|
||||
connect(downloadAct, SIGNAL(triggered()), this, SLOT(downloadSelected()));
|
||||
|
||||
contextMnu.clear();
|
||||
contextMnu.addAction(voteupAct);
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addMenu(voteMenu);
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction(downloadAct);
|
||||
|
||||
contextMnu.exec( mevent->globalPos() );
|
||||
contextMnu.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
void LinksDialog::changedSortRank( int index )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue