Skip to content

Commit

Permalink
Fix mutliple About dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd committed Aug 30, 2023
1 parent e2a3225 commit 934d978
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/appmenuwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,16 @@ void AppMenuWidget::populateSystemMenu(QWidget *parent) {
}
}



// If we were using a QMenu, we would do:
// QAction *aboutAction = m_systemMenu->addAction(tr("About This Computer"));
// connect(aboutAction, SIGNAL(triggered()), this, SLOT(actionAbout()));
// Since we are using our SystemMenu subclass instead which already contains the first menu
// item, we do:
// Remove existing connection from m_systemMenu->actions().constFirst(),
m_systemMenu->actions().constFirst()->disconnect();
// and connect it to our new slot
connect(m_systemMenu->actions().constFirst(), SIGNAL(triggered()), this, SLOT(actionAbout()));

m_systemMenu->addSeparator();
Expand Down

0 comments on commit 934d978

Please sign in to comment.