This one is legitimate: If no network is selected, the freshly
created ChannelListDlg instance is never deleted. Move instantiation
after the network ID check, so the dialog is shown (and self-deletes
on close). Set a parent for good measure, too.
void MainWin::showChannelList(NetworkId netId, const QString &channelFilters, bool listImmediately)
{
void MainWin::showChannelList(NetworkId netId, const QString &channelFilters, bool listImmediately)
{
- ChannelListDlg *channelListDlg = new ChannelListDlg();
-
if (!netId.isValid()) {
QAction *action = qobject_cast<QAction *>(sender());
if (action)
if (!netId.isValid()) {
QAction *action = qobject_cast<QAction *>(sender());
if (action)
+ ChannelListDlg *channelListDlg = new ChannelListDlg(this);
channelListDlg->setAttribute(Qt::WA_DeleteOnClose);
channelListDlg->setNetwork(netId);
if (!channelFilters.isEmpty()) {
channelListDlg->setAttribute(Qt::WA_DeleteOnClose);
channelListDlg->setNetwork(netId);
if (!channelFilters.isEmpty()) {