Debugger: Remove return value from AnalyzerManager::createDockWidget()

Change-Id: If6cd2a68f2f99a1977ded0f05a12790194143274
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2016-03-01 07:51:06 +01:00
parent 6492d16408
commit f3bd7412ef
20 changed files with 335 additions and 726 deletions

View File

@@ -49,11 +49,19 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
{
Q_UNUSED(arguments)
QmlProfilerPlugin::instance = this;
if (!Utils::HostOsInfo::canCreateOpenGLContext(errorString))
return false;
return true;
}
void QmlProfilerPlugin::extensionsInitialized()
{
factory = ExtensionSystem::PluginManager::getObject<QmlProfilerTimelineModelFactory>();
auto tool = new QmlProfilerTool(this);
auto widgetCreator = [tool] { return tool->createWidgets(); };
auto runControlCreator = [tool](ProjectExplorer::RunConfiguration *runConfiguration, Core::Id) {
return tool->createRunControl(runConfiguration);
};
@@ -65,20 +73,16 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
ActionDescription desc;
desc.setText(tr("QML Profiler"));
desc.setToolTip(description);
desc.setActionId(Constants::QmlProfilerLocalActionId);
desc.setPerspectiveId(Constants::QmlProfilerPerspective);
desc.setWidgetCreator(widgetCreator);
desc.setPerspectiveId(Constants::QmlProfilerPerspectiveId);
desc.setRunControlCreator(runControlCreator);
desc.setToolPreparer([tool] { return tool->prepareTool(); });
desc.setRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
desc.setMenuGroup(Analyzer::Constants::G_ANALYZER_TOOLS);
AnalyzerManager::addAction(desc);
AnalyzerManager::registerAction(Constants::QmlProfilerLocalActionId, desc);
desc.setText(tr("QML Profiler (External)"));
desc.setToolTip(description);
desc.setActionId(Constants::QmlProfilerRemoteActionId);
desc.setPerspectiveId(Constants::QmlProfilerPerspective);
desc.setWidgetCreator(widgetCreator);
desc.setPerspectiveId(Constants::QmlProfilerPerspectiveId);
desc.setRunControlCreator(runControlCreator);
desc.setCustomToolStarter([tool](ProjectExplorer::RunConfiguration *rc) {
tool->startRemoteTool(rc);
@@ -86,18 +90,12 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
desc.setToolPreparer([tool] { return tool->prepareTool(); });
desc.setRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
desc.setMenuGroup(Analyzer::Constants::G_ANALYZER_REMOTE_TOOLS);
AnalyzerManager::addAction(desc);
AnalyzerManager::registerAction(Constants::QmlProfilerRemoteActionId, desc);
addAutoReleasedObject(new QmlProfilerRunControlFactory());
addAutoReleasedObject(new Internal::QmlProfilerOptionsPage());
QmlProfilerPlugin::instance = this;
return true;
}
void QmlProfilerPlugin::extensionsInitialized()
{
factory = ExtensionSystem::PluginManager::getObject<QmlProfilerTimelineModelFactory>();
AnalyzerManager::registerToolbar(Constants::QmlProfilerPerspectiveId, tool->createWidgets());
}
ExtensionSystem::IPlugin::ShutdownFlag QmlProfilerPlugin::aboutToShutdown()