Profile introduction

Introduce Profiles to store sets of values that describe a system/device.

These profiles are held by a target, getting rid of much of the information
stored in the Build-/Run-/DeployConfigurations, greatly simplifying those.

This is a squash of the wip/profile branch which has been on gerrit for a
while, rebased to current master.

Change-Id: I25956c8dd4d1962b2134bfaa8a8076ae3909460f
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Tobias Hunger
2012-04-24 15:49:09 +02:00
parent 8c77b8c9d7
commit 2431456216
379 changed files with 12690 additions and 14437 deletions

View File

@@ -77,6 +77,8 @@
#include <qt4projectmanager/qt-s60/s60deployconfiguration.h>
#include <qt4projectmanager/qt-s60/symbianidevice.h>
#include <qtsupport/qtprofileinformation.h>
#include <QApplication>
#include <QHBoxLayout>
#include <QLabel>
@@ -243,10 +245,9 @@ IAnalyzerEngine *QmlProfilerTool::createEngine(const AnalyzerStartParameters &sp
// Check minimum Qt Version. We cannot really be sure what the Qt version
// at runtime is, but guess that the active build configuraiton has been used.
QtSupport::QtVersionNumber minimumVersion(4, 7, 4);
if (Qt4ProjectManager::Qt4BuildConfiguration *qt4Config
= qobject_cast<Qt4ProjectManager::Qt4BuildConfiguration*>(
runConfiguration->target()->activeBuildConfiguration())) {
if (qt4Config->qtVersion()->isValid() && qt4Config->qtVersion()->qtVersion() < minimumVersion) {
QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(runConfiguration->target()->profile());
if (version) {
if (version->isValid() && version->qtVersion() < minimumVersion) {
int result = QMessageBox::warning(QApplication::activeWindow(), tr("QML Profiler"),
tr("The QML profiler requires Qt 4.7.4 or newer.\n"
"The Qt version configured in your active build configuration is too old.\n"
@@ -306,13 +307,9 @@ bool QmlProfilerTool::canRun(RunConfiguration *runConfiguration, RunMode mode) c
static QString sysroot(RunConfiguration *runConfig)
{
QTC_ASSERT(runConfig, return QString());
if (Qt4ProjectManager::Qt4BuildConfiguration *buildConfig =
qobject_cast<Qt4ProjectManager::Qt4BuildConfiguration*>(
runConfig->target()->activeBuildConfiguration())) {
if (QtSupport::BaseQtVersion *qtVersion = buildConfig->qtVersion())
return qtVersion->systemRoot();
}
ProjectExplorer::Profile *p = runConfig->target()->profile();
if (p && ProjectExplorer::SysRootProfileInformation::hasSysRoot(p))
return ProjectExplorer::SysRootProfileInformation::sysRoot(runConfig->target()->profile()).toString();
return QString();
}
@@ -347,7 +344,7 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration
qobject_cast<RemoteLinux::RemoteLinuxRunConfiguration *>(runConfiguration)) {
sp.debuggee = rc3->remoteExecutableFilePath();
sp.debuggeeArgs = rc3->arguments();
sp.connParams = rc3->deviceConfig()->sshParameters();
sp.connParams = ProjectExplorer::DeviceProfileInformation::device(rc3->target()->profile())->sshParameters();
sp.analyzerCmdPrefix = rc3->commandPrefix();
sp.displayName = rc3->displayName();
sp.sysroot = sysroot(rc3);