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
|
@ -19,12 +19,6 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
#include <QtGui>
|
||||
#include <QContextMenuEvent>
|
||||
#include <QCursor>
|
||||
#include <QMenu>
|
||||
#include <QMouseEvent>
|
||||
#include <QPixmap>
|
||||
#include <QPoint>
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
|
@ -143,7 +137,6 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
|||
}
|
||||
|
||||
QMenu contextMnu( this );
|
||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
||||
|
||||
postchannelAct = new QAction(QIcon(":/images/mail_reply.png"), tr( "Post to Channel" ), this );
|
||||
connect( postchannelAct , SIGNAL( triggered() ), this, SLOT( createMsg() ) );
|
||||
|
@ -157,8 +150,6 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
|||
channeldetailsAct = new QAction(QIcon(":/images/info16.png"), tr( "Show Channel Details" ), this );
|
||||
connect( channeldetailsAct , SIGNAL( triggered() ), this, SLOT( showChannelDetails() ) );
|
||||
|
||||
contextMnu.clear();
|
||||
|
||||
if (ci.channelFlags & RS_DISTRIB_PUBLISH)
|
||||
{
|
||||
contextMnu.addAction( postchannelAct );
|
||||
|
@ -178,9 +169,7 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
|||
contextMnu.addAction( channeldetailsAct );
|
||||
}
|
||||
|
||||
contextMnu.exec( mevent->globalPos() );
|
||||
|
||||
|
||||
contextMnu.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
void ChannelFeed::createChannel()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue