Fix small leak in TrayIcon

pull/547/head
Nicolas Werner 4 years ago
parent ec6f0f9296
commit 795b8fb7dd
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 8
      src/TrayIcon.cpp

@ -107,16 +107,16 @@ TrayIcon::TrayIcon(const QString &filename, QWidget *parent)
#endif
QMenu *menu = new QMenu(parent);
viewAction_ = new QAction(tr("Show"), parent);
quitAction_ = new QAction(tr("Quit"), parent);
setContextMenu(menu);
viewAction_ = new QAction(tr("Show"), this);
quitAction_ = new QAction(tr("Quit"), this);
connect(viewAction_, SIGNAL(triggered()), parent, SLOT(show()));
connect(quitAction_, &QAction::triggered, this, QApplication::quit);
menu->addAction(viewAction_);
menu->addAction(quitAction_);
setContextMenu(menu);
}
void

Loading…
Cancel
Save