From 2d196bd2a169cdc6090edf484f47176c3b4086a7 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Fri, 27 Jan 2017 10:00:22 +0900 Subject: [PATCH] Move Session Manager... menu to Sessions > Manage... Change-Id: If0f11c8c308069290174aa8cc6081108f9b448a1 Reviewed-by: hjk Reviewed-by: Leena Miettinen Reviewed-by: Eike Ziller --- doc/src/howto/creator-sessions.qdoc | 4 ++-- src/plugins/projectexplorer/projectexplorer.cpp | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/src/howto/creator-sessions.qdoc b/doc/src/howto/creator-sessions.qdoc index d24b33c59da..dc73f9bceb1 100644 --- a/doc/src/howto/creator-sessions.qdoc +++ b/doc/src/howto/creator-sessions.qdoc @@ -39,7 +39,7 @@ When you exit \QC, a snapshot of your current workspace is stored as a \e session. To restore the session automatically when you start \QC, - select \uicontrol {File > Session Manager > Restore last session on startup}. + select \uicontrol {File > Sessions > Manage > Restore last session on startup}. When you open or create any of the following items, they automatically become a part of the session: @@ -68,7 +68,7 @@ to working on the first project, switch to the saved session. \QC opens the projects and files that belong to the session. - To manage sessions, select \uicontrol File > \uicontrol {Session Manager}. + To manage sessions, select \uicontrol File > \uicontrol Sessions > \uicontrol Manage. \image qtcreator-session-manager.png diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index f4db58d9aaf..126bc193078 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -816,9 +816,9 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er dd, &ProjectExplorerPluginPrivate::updateSessionMenu); // session manager action - dd->m_sessionManagerAction = new QAction(tr("Session &Manager..."), this); - cmd = ActionManager::registerAction(dd->m_sessionManagerAction, Constants::NEWSESSION); - mfile->addAction(cmd, Core::Constants::G_FILE_OPEN); + dd->m_sessionManagerAction = new QAction(tr("&Manage..."), this); + dd->m_sessionMenu->addAction(dd->m_sessionManagerAction); + dd->m_sessionMenu->addSeparator(); cmd->setDefaultKeySequence(QKeySequence()); @@ -3305,6 +3305,8 @@ void ProjectExplorerPluginPrivate::handleSetStartupProject() void ProjectExplorerPluginPrivate::updateSessionMenu() { m_sessionMenu->clear(); + dd->m_sessionMenu->addAction(dd->m_sessionManagerAction); + dd->m_sessionMenu->addSeparator(); QActionGroup *ag = new QActionGroup(m_sessionMenu); connect(ag, &QActionGroup::triggered, this, &ProjectExplorerPluginPrivate::setSession); const QString activeSession = SessionManager::activeSession();