added missing delete trayMenu

This commit is contained in:
csoler 2020-12-23 21:39:04 +01:00
parent 4654ef020b
commit a8f3a38e72

View File

@ -376,6 +376,8 @@ MainWindow::~MainWindow()
delete toasterDisable;
delete sysTrayStatus;
delete trayIcon;
delete trayMenu;
delete notifyMenu;
#ifdef MESSENGER_WINDOW
MessengerWindow::releaseInstance();
#endif
@ -603,7 +605,7 @@ void MainWindow::displayDiskSpaceWarning(int loc,int size_limit_mb)
void MainWindow::createTrayIcon()
{
/** Tray icon Menu **/
QMenu *trayMenu = new QMenu(this);
trayMenu = new QMenu(this);
if (sysTrayStatus) sysTrayStatus->trayMenu = trayMenu;
QObject::connect(trayMenu, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));
toggleVisibilityAction = trayMenu->addAction(QIcon(IMAGE_RETROSHARE), tr("Show/Hide"), this, SLOT(toggleVisibilitycontextmenu()));