Move Session Manager... menu to Sessions > Manage...

Change-Id: If0f11c8c308069290174aa8cc6081108f9b448a1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tasuku Suzuki
2017-01-27 10:00:22 +09:00
parent fd8df8cff2
commit 2d196bd2a1
2 changed files with 7 additions and 5 deletions

View File

@@ -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

View File

@@ -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();