mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-09 06:42:19 -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
|
@ -39,7 +39,6 @@
|
|||
#include <QMenu>
|
||||
#include <QCursor>
|
||||
#include <QPoint>
|
||||
#include <QMouseEvent>
|
||||
#include <QPixmap>
|
||||
#include <QPrintDialog>
|
||||
#include <QPrinter>
|
||||
|
@ -246,9 +245,6 @@ int MessagesDialog::getSelectedMsgCount ()
|
|||
void MessagesDialog::messageslistWidgetCostumPopupMenu( QPoint point )
|
||||
{
|
||||
QMenu contextMnu( this );
|
||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
||||
|
||||
contextMnu.clear();
|
||||
|
||||
/** Defines the actions for the context menu */
|
||||
QAction* newmsgAct = NULL;
|
||||
|
@ -300,17 +296,16 @@ void MessagesDialog::messageslistWidgetCostumPopupMenu( QPoint point )
|
|||
removemsgAct->setDisabled(true);
|
||||
}
|
||||
|
||||
contextMnu.exec( mevent->globalPos() );
|
||||
contextMnu.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
|
||||
void MessagesDialog::msgfilelistWidgetCostumPopupMenu( QPoint point )
|
||||
{
|
||||
QAction* getRecAct = NULL;
|
||||
QAction* getAllRecAct = NULL;
|
||||
// QAction* getAllRecAct = NULL;
|
||||
|
||||
QMenu contextMnu( this );
|
||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
||||
|
||||
getRecAct = new QAction(QIcon(IMAGE_DOWNLOAD), tr( "Download" ), this );
|
||||
connect( getRecAct , SIGNAL( triggered() ), this, SLOT( getcurrentrecommended() ) );
|
||||
|
@ -318,10 +313,9 @@ void MessagesDialog::msgfilelistWidgetCostumPopupMenu( QPoint point )
|
|||
// getAllRecAct = new QAction(QIcon(IMAGE_DOWNLOADALL), tr( "Download" ), this );
|
||||
// connect( getAllRecAct , SIGNAL( triggered() ), this, SLOT( getallrecommended() ) );
|
||||
|
||||
contextMnu.clear();
|
||||
contextMnu.addAction( getRecAct);
|
||||
// contextMnu.addAction( getAllRecAct);
|
||||
contextMnu.exec( mevent->globalPos() );
|
||||
contextMnu.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
void MessagesDialog::newmessage()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue