Fix context of Locator input

- In the main window, the locator input (actually the status bar)
  visually feels like being part of the mode widget, so give
  it its context.
- In extra editor windows, the whole editor window should have
  "editor manager" context, so that is also active for the locator
  input.

Task-number: QTCREATORBUG-20626
Task-number: QTCREATORBUG-20071
Change-Id: Ib68d6a8177446572ea59c3cc057eca0706173e11
Reviewed-by: Xing Xiong
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2018-07-10 15:49:50 +02:00
parent 735aeb3e38
commit 8fa449126c
13 changed files with 66 additions and 16 deletions

View File

@@ -2758,7 +2758,7 @@ void DebuggerPluginPrivate::dumpLog()
/*! Activates the previous mode when the current mode is the debug mode. */
void DebuggerPluginPrivate::activatePreviousMode()
{
if (ModeManager::currentMode() == MODE_DEBUG && m_previousMode.isValid()) {
if (ModeManager::currentModeId() == MODE_DEBUG && m_previousMode.isValid()) {
// If stopping the application also makes Qt Creator active (as the
// "previously active application"), doing the switch synchronously
// leads to funny effects with floating dock widgets
@@ -3390,7 +3390,7 @@ void DebuggerPluginPrivate::onModeChanged(Id mode)
void saveModeToRestore()
{
dd->m_previousMode = ModeManager::currentMode();
dd->m_previousMode = ModeManager::currentModeId();
}
} // namespace Internal
@@ -3522,7 +3522,7 @@ void setPerspectiveEnabled(const QByteArray &perspectiveId, bool enabled)
void selectPerspective(const QByteArray &perspectiveId)
{
if (ModeManager::currentMode() == MODE_DEBUG
if (ModeManager::currentModeId() == MODE_DEBUG
&& dd->m_mainWindow->currentPerspective() == perspectiveId) {
return;
}