forked from qt-creator/qt-creator
Android: Add QML profiling
Change-Id: Ie06c0b49707f8ec549f180f41c565fd223240186 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -44,7 +44,8 @@ enum StartMode
|
||||
{
|
||||
StartLocal = -1,
|
||||
StartRemote = -2,
|
||||
StartQml = -3
|
||||
StartQml = -3,
|
||||
StartQmlAndroid = -4 // TODO: remove this enum and make it generic
|
||||
};
|
||||
|
||||
namespace Constants {
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <projectexplorer/taskhub.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QAction>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
@@ -85,6 +86,8 @@ AnalyzerRunControl::AnalyzerRunControl(IAnalyzerTool *tool,
|
||||
SLOT(addTask(ProjectExplorer::Task::TaskType,QString,QString,int)));
|
||||
connect(d->m_engine, SIGNAL(finished()),
|
||||
SLOT(engineFinished()));
|
||||
|
||||
connect(AnalyzerManager::stopAction(), SIGNAL(triggered()), SLOT(stopIt()));
|
||||
}
|
||||
|
||||
AnalyzerRunControl::~AnalyzerRunControl()
|
||||
@@ -159,6 +162,11 @@ QIcon AnalyzerRunControl::icon() const
|
||||
return QIcon(QLatin1String(":/images/analyzer_start_small.png"));
|
||||
}
|
||||
|
||||
IAnalyzerEngine *AnalyzerRunControl::engine() const
|
||||
{
|
||||
return d->m_engine;
|
||||
}
|
||||
|
||||
void AnalyzerRunControl::receiveOutput(const QString &text, Utils::OutputFormat format)
|
||||
{
|
||||
appendMessage(text, format);
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace Analyzer {
|
||||
|
||||
class AnalyzerStartParameters;
|
||||
class IAnalyzerTool;
|
||||
class IAnalyzerEngine;
|
||||
|
||||
class ANALYZER_EXPORT AnalyzerRunControl : public ProjectExplorer::RunControl
|
||||
{
|
||||
@@ -57,6 +58,8 @@ public:
|
||||
QString displayName() const;
|
||||
QIcon icon() const;
|
||||
|
||||
IAnalyzerEngine *engine() const;
|
||||
|
||||
private slots:
|
||||
void stopIt();
|
||||
void receiveOutput(const QString &, Utils::OutputFormat format);
|
||||
|
||||
@@ -71,7 +71,6 @@ RunControl *AnalyzerRunControlFactory::create(RunConfiguration *runConfiguration
|
||||
sp.toolId = tool->id();
|
||||
|
||||
AnalyzerRunControl *rc = new AnalyzerRunControl(tool, sp, runConfiguration);
|
||||
QObject::connect(AnalyzerManager::stopAction(), SIGNAL(triggered()), rc, SLOT(stopIt()));
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +83,11 @@ public:
|
||||
IAnalyzerTool *tool() const { return m_tool; }
|
||||
StartMode mode() const { return m_sp.startMode; }
|
||||
|
||||
virtual void notifyRemoteSetupDone(quint16) {}
|
||||
|
||||
public slots:
|
||||
virtual void logApplicationMessage(const QString &, Utils::OutputFormat) {}
|
||||
|
||||
signals:
|
||||
/// Should be emitted when the debuggee outputted something.
|
||||
void outputReceived(const QString &, Utils::OutputFormat format);
|
||||
|
||||
@@ -54,6 +54,7 @@ Id IAnalyzerTool::defaultActionId(const IAnalyzerTool *tool, StartMode mode)
|
||||
case StartRemote:
|
||||
return id.withSuffix(".Remote");
|
||||
case StartQml:
|
||||
case StartQmlAndroid:
|
||||
return id.withSuffix(".Qml");
|
||||
}
|
||||
return Id();
|
||||
|
||||
Reference in New Issue
Block a user