Commit 048fbbe5 authored by Montel Laurent's avatar Montel Laurent Committed by Laurent Montel
Browse files

Fix switch session.



When we use action->text() in some theme we have a "&" for
activating it with keyboard.
So session can't work when we search session name.

Change-Id: I3511a740121b5eefb790faa6bf5f92b8f5c8d429
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent 6f29d0c5
......@@ -3216,6 +3216,7 @@ void ProjectExplorerPluginPrivate::updateSessionMenu()
const QString activeSession = SessionManager::activeSession();
foreach (const QString &session, SessionManager::sessions()) {
QAction *act = ag->addAction(session);
act->setData(session);
act->setCheckable(true);
if (session == activeSession)
act->setChecked(true);
......@@ -3226,7 +3227,7 @@ void ProjectExplorerPluginPrivate::updateSessionMenu()
void ProjectExplorerPluginPrivate::setSession(QAction *action)
{
QString session = action->text();
QString session = action->data().toString();
if (session != SessionManager::activeSession())
SessionManager::loadSession(session);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment