1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

MainMenu: Fix null session manager warnings in test mode

This commit is contained in:
David Rosca 2018-01-30 11:17:25 +01:00
parent 0d71069122
commit f8531ac632
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -79,7 +79,7 @@ void MainMenu::initSuperMenu(QMenu* superMenu) const
superMenu->addAction(m_actions[QSL("File/NewWindow")]);
superMenu->addAction(m_actions[QSL("File/NewPrivateWindow")]);
superMenu->addAction(m_actions[QSL("File/OpenFile")]);
if (!mApp->isPrivate()) {
if (mApp->sessionManager()) {
superMenu->addSeparator();
QMenu* sessionsSubmenu = new QMenu(tr("Sessions"));
connect(sessionsSubmenu, SIGNAL(aboutToShow()), mApp->sessionManager(), SLOT(aboutToShowSessionsMenu()));
@ -493,7 +493,7 @@ void MainMenu::init()
ADD_ACTION("File/CloseWindow", m_menuFile, QIcon::fromTheme(QSL("window-close")), tr("Close Window"), SLOT(closeWindow()), "Ctrl+Shift+W");
m_menuFile->addSeparator();
if (!mApp->isPrivate()) {
if (mApp->sessionManager()) {
QMenu* sessionsSubmenu = new QMenu(tr("Sessions"));
connect(sessionsSubmenu, SIGNAL(aboutToShow()), mApp->sessionManager(), SLOT(aboutToShowSessionsMenu()));
m_menuFile->addMenu(sessionsSubmenu);