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