QmlProfiler: Remove RemoteLinux dependency

Change-Id: I3ff14691b4f9c80793a491b61444f8ceeb05a4fb
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
This commit is contained in:
Aurindam Jana
2013-05-06 09:10:22 +02:00
parent 6e677a97fb
commit e88ec44e71
17 changed files with 706 additions and 181 deletions

View File

@@ -11,7 +11,6 @@ SOURCES += \
qmlprofilerengine.cpp \
qmlprofilerattachdialog.cpp \
localqmlprofilerrunner.cpp \
remotelinuxqmlprofilerrunner.cpp \
qmlprofilereventview.cpp \
qmlprofilerdetailsrewriter.cpp \
qmlprofilertraceview.cpp \
@@ -32,7 +31,6 @@ HEADERS += \
qmlprofilerattachdialog.h \
abstractqmlprofilerrunner.h \
localqmlprofilerrunner.h \
remotelinuxqmlprofilerrunner.h \
qmlprofilereventview.h \
qmlprofilerdetailsrewriter.h \
qmlprofilertraceview.h \

View File

@@ -55,8 +55,6 @@ QtcPlugin {
"qmlprofilerviewmanager.h",
"qv8profilerdatamodel.cpp",
"qv8profilerdatamodel.h",
"remotelinuxqmlprofilerrunner.cpp",
"remotelinuxqmlprofilerrunner.h",
"timelinerenderer.cpp",
"timelinerenderer.h",
"canvas/qdeclarativecanvas.cpp",

View File

@@ -7,5 +7,4 @@ QTC_PLUGIN_DEPENDS += \
analyzerbase \
qmlprojectmanager \
qt4projectmanager \
qmljstools \
remotelinux
qmljstools

View File

@@ -30,7 +30,6 @@
#include "qmlprofilerengine.h"
#include "localqmlprofilerrunner.h"
#include "remotelinuxqmlprofilerrunner.h"
#include <analyzerbase/analyzermanager.h>
#include <coreplugin/icore.h>
@@ -46,7 +45,6 @@
#include <projectexplorer/localapplicationruncontrol.h>
#include <projectexplorer/localapplicationrunconfiguration.h>
#include <qmldebug/qmloutputparser.h>
#include <remotelinux/remotelinuxrunconfiguration.h>
#include <QMainWindow>
#include <QMessageBox>
@@ -91,37 +89,36 @@ QmlProfilerEngine::QmlProfilerEnginePrivate::createRunner(ProjectExplorer::RunCo
if (!runConfiguration) // attaching
return 0;
if (RemoteLinux::RemoteLinuxRunConfiguration *rmConfig =
qobject_cast<RemoteLinux::RemoteLinuxRunConfiguration *>(runConfiguration)) {
runner = new RemoteLinuxQmlProfilerRunner(rmConfig, parent);
QmlProjectManager::QmlProjectRunConfiguration *rc1 =
qobject_cast<QmlProjectManager::QmlProjectRunConfiguration *>(runConfiguration);
LocalApplicationRunConfiguration *rc2 =
qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration);
// Supports only local run configurations
if (!rc1 && !rc2)
return 0;
ProjectExplorer::EnvironmentAspect *environment
= runConfiguration->extraAspect<ProjectExplorer::EnvironmentAspect>();
QTC_ASSERT(environment, return 0);
LocalQmlProfilerRunner::Configuration conf;
if (rc1) {
// This is a "plain" .qmlproject.
conf.executable = rc1->observerPath();
conf.executableArguments = rc1->viewerArguments();
conf.workingDirectory = rc1->workingDirectory();
conf.environment = environment->environment();
} else {
ProjectExplorer::EnvironmentAspect *environment
= runConfiguration->extraAspect<ProjectExplorer::EnvironmentAspect>();
QTC_ASSERT(environment, return 0);
LocalQmlProfilerRunner::Configuration conf;
if (QmlProjectManager::QmlProjectRunConfiguration *rc1 =
qobject_cast<QmlProjectManager::QmlProjectRunConfiguration *>(runConfiguration)) {
// This is a "plain" .qmlproject.
conf.executable = rc1->observerPath();
conf.executableArguments = rc1->viewerArguments();
conf.workingDirectory = rc1->workingDirectory();
conf.environment = environment->environment();
} else if (LocalApplicationRunConfiguration *rc2 =
qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration)) {
// FIXME: Check.
conf.executable = rc2->executable();
conf.executableArguments = rc2->commandLineArguments();
conf.workingDirectory = rc2->workingDirectory();
conf.environment = environment->environment();
} else {
QTC_CHECK(false);
}
const ProjectExplorer::IDevice::ConstPtr device =
ProjectExplorer::DeviceKitInformation::device(runConfiguration->target()->kit());
QTC_ASSERT(device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE, return 0);
conf.port = sp.analyzerPort;
runner = new LocalQmlProfilerRunner(conf, parent);
// FIXME: Check.
conf.executable = rc2->executable();
conf.executableArguments = rc2->commandLineArguments();
conf.workingDirectory = rc2->workingDirectory();
conf.environment = environment->environment();
}
const ProjectExplorer::IDevice::ConstPtr device =
ProjectExplorer::DeviceKitInformation::device(runConfiguration->target()->kit());
QTC_ASSERT(device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE, return 0);
conf.port = sp.analyzerPort;
runner = new LocalQmlProfilerRunner(conf, parent);
return runner;
}
@@ -197,7 +194,7 @@ bool QmlProfilerEngine::start()
this, SLOT(logApplicationMessage(QString,Utils::OutputFormat)));
d->m_runner->start();
d->m_noDebugOutputTimer.start();
} else if (d->sp.startMode == StartQmlAndroid) {
} else if (d->sp.startMode == StartQmlRemote) {
d->m_noDebugOutputTimer.start();
} else {
emit processRunning(startParameters().analyzerPort);

View File

@@ -57,9 +57,6 @@
#include <projectexplorer/localapplicationrunconfiguration.h>
#include <texteditor/itexteditor.h>
#include <remotelinux/remotelinuxrunconfiguration.h>
#include <remotelinux/linuxdevice.h>
#include <android/androidconstants.h>
#include <coreplugin/coreconstants.h>
@@ -97,7 +94,6 @@ using namespace QmlProfiler::Constants;
using namespace QmlDebug;
using namespace ProjectExplorer;
using namespace QmlProjectManager;
using namespace RemoteLinux;
class QmlProfilerTool::QmlProfilerToolPrivate
{
@@ -284,7 +280,6 @@ IAnalyzerEngine *QmlProfilerTool::createEngine(const AnalyzerStartParameters &sp
bool QmlProfilerTool::canRun(RunConfiguration *runConfiguration, RunMode mode) const
{
if (qobject_cast<QmlProjectRunConfiguration *>(runConfiguration)
|| qobject_cast<RemoteLinuxRunConfiguration *>(runConfiguration)
|| qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration))
return mode == runMode();
return false;
@@ -328,16 +323,6 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration
sp.debuggee = rc2->executable();
sp.debuggeeArgs = rc2->commandLineArguments();
sp.displayName = rc2->displayName();
} else if (RemoteLinux::RemoteLinuxRunConfiguration *rc3 =
qobject_cast<RemoteLinux::RemoteLinuxRunConfiguration *>(runConfiguration)) {
sp.debuggee = rc3->remoteExecutableFilePath();
sp.debuggeeArgs = rc3->arguments();
sp.connParams = ProjectExplorer::DeviceKitInformation::device(rc3->target()->kit())->sshParameters();
sp.analyzerCmdPrefix = rc3->commandPrefix();
sp.displayName = rc3->displayName();
sp.sysroot = sysroot(rc3);
sp.analyzerHost = sp.connParams.host;
sp.analyzerPort = sp.connParams.port;
} else {
// What could that be?
QTC_ASSERT(false, return sp);