forked from qt-creator/qt-creator
QmlProfiler: Move constants to qmlprofilerconstants.h
Change-Id: Ic4f1b02bbf9e1467811334a16cd9c13d1924c47e Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
@@ -35,7 +35,6 @@ namespace QmlProfiler {
|
||||
namespace Constants {
|
||||
|
||||
const char ATTACH[] = "Menu.Analyzer.Attach";
|
||||
const char TraceFileExtension[] = ".qtd";
|
||||
const char TASK_LOAD[] = "QmlProfiler.TaskLoad";
|
||||
const char TASK_SAVE[] = "QmlProfiler.TaskSave";
|
||||
const char FLUSH_ENABLED[] = "Analyzer.QmlProfiler.FlushEnabled";
|
||||
@@ -45,6 +44,11 @@ const char AGGREGATE_TRACES[] = "Analyzer.QmlProfiler.AggregateTraces";
|
||||
const char SETTINGS[] = "Analyzer.QmlProfiler.Settings";
|
||||
const char ANALYZER[] = "Analyzer";
|
||||
|
||||
const char TraceFileExtension[] = ".qtd";
|
||||
const char QmlProfilerToolId[] = "QmlProfiler";
|
||||
const char QmlProfilerLocalActionId[] = "QmlProfiler.Local";
|
||||
const char QmlProfilerRemoteActionId[] = "QmlProfiler.Remote";
|
||||
|
||||
} // namespace Constants
|
||||
} // namespace QmlProfiler
|
||||
|
||||
|
||||
@@ -71,20 +71,20 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
|
||||
"applications using QML.");
|
||||
|
||||
action = new AnalyzerAction(this);
|
||||
action->setActionId(QmlProfilerLocalActionId);
|
||||
action->setToolId(QmlProfilerToolId);
|
||||
action->setActionId(Constants::QmlProfilerLocalActionId);
|
||||
action->setToolId(Constants::QmlProfilerToolId);
|
||||
action->setWidgetCreator(widgetCreator);
|
||||
action->setRunControlCreator(runControlCreator);
|
||||
action->setToolPreparer([tool] { return tool->prepareTool(); });
|
||||
action->setRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
|
||||
action->setText(tr("QML Profiler"));
|
||||
action->setToolTip(description);
|
||||
action->setMenuGroup(Constants::G_ANALYZER_TOOLS);
|
||||
action->setMenuGroup(Analyzer::Constants::G_ANALYZER_TOOLS);
|
||||
AnalyzerManager::addAction(action);
|
||||
|
||||
action = new AnalyzerAction(this);
|
||||
action->setActionId(QmlProfilerRemoteActionId);
|
||||
action->setToolId(QmlProfilerToolId);
|
||||
action->setActionId(Constants::QmlProfilerRemoteActionId);
|
||||
action->setToolId(Constants::QmlProfilerToolId);
|
||||
action->setWidgetCreator(widgetCreator);
|
||||
action->setRunControlCreator(runControlCreator);
|
||||
action->setCustomToolStarter([tool] { tool->startRemoteTool(); });
|
||||
@@ -92,7 +92,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
|
||||
action->setRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
|
||||
action->setText(tr("QML Profiler (External)"));
|
||||
action->setToolTip(description);
|
||||
action->setMenuGroup(Constants::G_ANALYZER_REMOTE_TOOLS);
|
||||
action->setMenuGroup(Analyzer::Constants::G_ANALYZER_REMOTE_TOOLS);
|
||||
AnalyzerManager::addAction(action);
|
||||
|
||||
addAutoReleasedObject(new QmlProfilerRunControlFactory());
|
||||
|
||||
@@ -31,9 +31,11 @@
|
||||
#ifndef QMLPROFILERTOOL_H
|
||||
#define QMLPROFILERTOOL_H
|
||||
|
||||
#include "qmlprofilerconstants.h"
|
||||
#include "qmldebug/qmlprofilereventtypes.h"
|
||||
|
||||
#include <analyzerbase/ianalyzertool.h>
|
||||
#include <analyzerbase/analyzerruncontrol.h>
|
||||
#include "qmldebug/qmlprofilereventtypes.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QMessageBox;
|
||||
@@ -42,10 +44,6 @@ QT_END_NAMESPACE
|
||||
namespace QmlProfiler {
|
||||
namespace Internal {
|
||||
|
||||
const char QmlProfilerToolId[] = "QmlProfiler";
|
||||
const char QmlProfilerLocalActionId[] = "QmlProfiler.Local";
|
||||
const char QmlProfilerRemoteActionId[] = "QmlProfiler.Remote";
|
||||
|
||||
class QmlProfilerTool : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -109,9 +109,9 @@ void QmlProfilerViewManager::createViews()
|
||||
d->eventsView, &QmlProfilerEventsWidget::onVisibleFeaturesChanged);
|
||||
|
||||
QDockWidget *eventsDock = AnalyzerManager::createDockWidget
|
||||
(QmlProfilerToolId, d->eventsView);
|
||||
(Constants::QmlProfilerToolId, d->eventsView);
|
||||
d->timelineDock = AnalyzerManager::createDockWidget
|
||||
(QmlProfilerToolId, d->traceView);
|
||||
(Constants::QmlProfilerToolId, d->traceView);
|
||||
|
||||
eventsDock->show();
|
||||
d->timelineDock->show();
|
||||
|
||||
Reference in New Issue
Block a user