forked from qt-creator/qt-creator
Fix initial layout in analyze mode.
Task-number: QTCREATORBUG-5414 Change-Id: I4ac8d150f20e35a769e6f7f13db420d81e93e7e2 Reviewed-on: http://codereview.qt.nokia.com/1552 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -616,9 +616,15 @@ void AnalyzerManagerPrivate::selectSavedTool()
|
|||||||
StartMode mode = m_modeFromAction.value(action);
|
StartMode mode = m_modeFromAction.value(action);
|
||||||
if (tool->actionId(mode) == lastActiveAction) {
|
if (tool->actionId(mode) == lastActiveAction) {
|
||||||
selectTool(tool, mode);
|
selectTool(tool, mode);
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// fallback to first available tool
|
||||||
|
if (!m_actions.isEmpty()) {
|
||||||
|
IAnalyzerTool *tool = m_toolFromAction.value(m_actions.first());
|
||||||
|
StartMode mode = m_modeFromAction.value(m_actions.first());
|
||||||
|
selectTool(tool, mode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnalyzerManagerPrivate::selectMenuAction()
|
void AnalyzerManagerPrivate::selectMenuAction()
|
||||||
@@ -727,6 +733,8 @@ void AnalyzerManagerPrivate::loadToolSettings(IAnalyzerTool *tool)
|
|||||||
settings->beginGroup(QLatin1String("AnalyzerViewSettings_") + tool->id());
|
settings->beginGroup(QLatin1String("AnalyzerViewSettings_") + tool->id());
|
||||||
if (settings->value("ToolSettingsSaved", false).toBool())
|
if (settings->value("ToolSettingsSaved", false).toBool())
|
||||||
m_mainWindow->restoreSettings(settings);
|
m_mainWindow->restoreSettings(settings);
|
||||||
|
else
|
||||||
|
m_mainWindow->restoreSettings(m_defaultSettings.value(tool));
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@
|
|||||||
#include <QtGui/QTabWidget>
|
#include <QtGui/QTabWidget>
|
||||||
#include <QtGui/QToolButton>
|
#include <QtGui/QToolButton>
|
||||||
#include <QtGui/QMessageBox>
|
#include <QtGui/QMessageBox>
|
||||||
|
#include <QtGui/QDockWidget>
|
||||||
|
|
||||||
using namespace Analyzer;
|
using namespace Analyzer;
|
||||||
using namespace QmlProfiler::Internal;
|
using namespace QmlProfiler::Internal;
|
||||||
@@ -295,6 +296,11 @@ QWidget *QmlProfilerTool::createWidgets()
|
|||||||
QDockWidget *callerDock = AnalyzerManager::createDockWidget
|
QDockWidget *callerDock = AnalyzerManager::createDockWidget
|
||||||
(this, tr("Callers"), d->m_callerView, Qt::BottomDockWidgetArea);
|
(this, tr("Callers"), d->m_callerView, Qt::BottomDockWidgetArea);
|
||||||
|
|
||||||
|
eventsDock->show();
|
||||||
|
timelineDock->show();
|
||||||
|
calleeDock->show();
|
||||||
|
callerDock->show();
|
||||||
|
|
||||||
mw->splitDockWidget(mw->toolBarDockWidget(), eventsDock, Qt::Vertical);
|
mw->splitDockWidget(mw->toolBarDockWidget(), eventsDock, Qt::Vertical);
|
||||||
mw->tabifyDockWidget(eventsDock, timelineDock);
|
mw->tabifyDockWidget(eventsDock, timelineDock);
|
||||||
mw->tabifyDockWidget(timelineDock, calleeDock);
|
mw->tabifyDockWidget(timelineDock, calleeDock);
|
||||||
|
|||||||
@@ -380,6 +380,7 @@ QWidget *MemcheckTool::createWidgets()
|
|||||||
|
|
||||||
QDockWidget *errorDock = AnalyzerManager::createDockWidget
|
QDockWidget *errorDock = AnalyzerManager::createDockWidget
|
||||||
(this, tr("Memory Issues"), m_errorView, Qt::BottomDockWidgetArea);
|
(this, tr("Memory Issues"), m_errorView, Qt::BottomDockWidgetArea);
|
||||||
|
errorDock->show();
|
||||||
mw->splitDockWidget(mw->toolBarDockWidget(), errorDock, Qt::Vertical);
|
mw->splitDockWidget(mw->toolBarDockWidget(), errorDock, Qt::Vertical);
|
||||||
|
|
||||||
connect(ProjectExplorer::ProjectExplorerPlugin::instance(),
|
connect(ProjectExplorer::ProjectExplorerPlugin::instance(),
|
||||||
|
|||||||
Reference in New Issue
Block a user