Commit ce9c2efd authored by hjk's avatar hjk

Qt4ProjectManager: Rename {Qt4,Qmake}{Project,Pr{i,o}FileNode}

Change-Id: I27139d8ccc17b665853bec4a37e80568680b5fcc
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
Reviewed-by: default avatarDavid Schulz <david.schulz@digia.com>
parent 262a1e26
...@@ -86,7 +86,7 @@ static QStringList qtSoPaths(QtSupport::BaseQtVersion *qtVersion) ...@@ -86,7 +86,7 @@ static QStringList qtSoPaths(QtSupport::BaseQtVersion *qtVersion)
RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *runConfig, QString *errorMessage) RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *runConfig, QString *errorMessage)
{ {
Target *target = runConfig->target(); Target *target = runConfig->target();
Qt4Project *project = static_cast<Qt4Project *>(target->project()); QmakeProject *project = static_cast<QmakeProject *>(target->project());
DebuggerStartParameters params; DebuggerStartParameters params;
params.startMode = AttachToRemoteServer; params.startMode = AttachToRemoteServer;
...@@ -102,11 +102,11 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration * ...@@ -102,11 +102,11 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
params.debuggerCommand = DebuggerKitInformation::debuggerCommand(kit).toString(); params.debuggerCommand = DebuggerKitInformation::debuggerCommand(kit).toString();
if (ToolChain *tc = ToolChainKitInformation::toolChain(kit)) if (ToolChain *tc = ToolChainKitInformation::toolChain(kit))
params.toolChainAbi = tc->targetAbi(); params.toolChainAbi = tc->targetAbi();
params.executable = project->rootQt4ProjectNode()->buildDir() + QLatin1String("/app_process"); params.executable = project->rootQmakeProjectNode()->buildDir() + QLatin1String("/app_process");
params.remoteChannel = runConfig->remoteChannel(); params.remoteChannel = runConfig->remoteChannel();
params.solibSearchPath.clear(); params.solibSearchPath.clear();
QList<Qt4ProFileNode *> nodes = project->allProFiles(); QList<QmakeProFileNode *> nodes = project->allProFiles();
foreach (Qt4ProFileNode *node, nodes) foreach (QmakeProFileNode *node, nodes)
if (node->projectType() == ApplicationTemplate) if (node->projectType() == ApplicationTemplate)
params.solibSearchPath.append(node->targetInformation().buildDir); params.solibSearchPath.append(node->targetInformation().buildDir);
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit); QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
...@@ -121,8 +121,8 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration * ...@@ -121,8 +121,8 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
params.remoteSetupNeeded = true; params.remoteSetupNeeded = true;
//TODO: Not sure if these are the right paths. //TODO: Not sure if these are the right paths.
params.projectSourceDirectory = project->projectDirectory(); params.projectSourceDirectory = project->projectDirectory();
params.projectSourceFiles = project->files(Qt4Project::ExcludeGeneratedFiles); params.projectSourceFiles = project->files(QmakeProject::ExcludeGeneratedFiles);
params.projectBuildDirectory = project->rootQt4ProjectNode()->buildDir(); params.projectBuildDirectory = project->rootQmakeProjectNode()->buildDir();
} }
DebuggerRunControl * const debuggerRunControl DebuggerRunControl * const debuggerRunControl
......
...@@ -124,7 +124,7 @@ DeployConfiguration *AndroidDeployConfigurationFactory::clone(Target *parent, De ...@@ -124,7 +124,7 @@ DeployConfiguration *AndroidDeployConfigurationFactory::clone(Target *parent, De
QList<Core::Id> AndroidDeployConfigurationFactory::availableCreationIds(Target *parent) const QList<Core::Id> AndroidDeployConfigurationFactory::availableCreationIds(Target *parent) const
{ {
QList<Core::Id> ids; QList<Core::Id> ids;
if (!qobject_cast<QmakeProjectManager::Qt4Project *>(parent->project())) if (!qobject_cast<QmakeProjectManager::QmakeProject *>(parent->project()))
return ids; return ids;
if (!parent->project()->supportsKit(parent->kit())) if (!parent->project()->supportsKit(parent->kit()))
......
...@@ -345,11 +345,11 @@ void AndroidDeployQtStep::runCommand(const QString &program, const QStringList & ...@@ -345,11 +345,11 @@ void AndroidDeployQtStep::runCommand(const QString &program, const QStringList &
void AndroidDeployQtStep::updateInputFile() void AndroidDeployQtStep::updateInputFile()
{ {
QmakeProjectManager::Qt4Project *pro = static_cast<QmakeProjectManager::Qt4Project *>(project()); QmakeProjectManager::QmakeProject *pro = static_cast<QmakeProjectManager::QmakeProject *>(project());
QList<QmakeProjectManager::Qt4ProFileNode *> nodes = pro->applicationProFiles(); QList<QmakeProjectManager::QmakeProFileNode *> nodes = pro->applicationProFiles();
QStringList inputFiles; QStringList inputFiles;
foreach (QmakeProjectManager::Qt4ProFileNode *node, nodes) foreach (QmakeProjectManager::QmakeProFileNode *node, nodes)
inputFiles << node->singleVariableValue(QmakeProjectManager::AndroidDeploySettingsFile); inputFiles << node->singleVariableValue(QmakeProjectManager::AndroidDeploySettingsFile);
if (!inputFiles.contains(m_inputFile)) if (!inputFiles.contains(m_inputFile))
......
...@@ -135,7 +135,7 @@ AndroidDeployQtWidget::AndroidDeployQtWidget(AndroidDeployQtStep *step) ...@@ -135,7 +135,7 @@ AndroidDeployQtWidget::AndroidDeployQtWidget(AndroidDeployQtStep *step)
connect(m_ui->createAndroidManifestButton, SIGNAL(clicked()), connect(m_ui->createAndroidManifestButton, SIGNAL(clicked()),
this, SLOT(createManifestButton())); this, SLOT(createManifestButton()));
m_extraLibraryListModel = new AndroidExtraLibraryListModel(static_cast<QmakeProjectManager::Qt4Project *>(m_step->project()), m_extraLibraryListModel = new AndroidExtraLibraryListModel(static_cast<QmakeProjectManager::QmakeProject *>(m_step->project()),
this); this);
m_ui->androidExtraLibsListView->setModel(m_extraLibraryListModel); m_ui->androidExtraLibsListView->setModel(m_extraLibraryListModel);
...@@ -156,8 +156,8 @@ AndroidDeployQtWidget::~AndroidDeployQtWidget() ...@@ -156,8 +156,8 @@ AndroidDeployQtWidget::~AndroidDeployQtWidget()
void AndroidDeployQtWidget::checkProjectTemplate() void AndroidDeployQtWidget::checkProjectTemplate()
{ {
QmakeProjectManager::Qt4Project *project = static_cast<QmakeProjectManager::Qt4Project *>(m_step->project()); QmakeProjectManager::QmakeProject *project = static_cast<QmakeProjectManager::QmakeProject *>(m_step->project());
if (project->rootQt4ProjectNode()->projectType() == QmakeProjectManager::ApplicationTemplate) if (project->rootQmakeProjectNode()->projectType() == QmakeProjectManager::ApplicationTemplate)
m_ui->additionalLibrariesGroupBox->setEnabled(true); m_ui->additionalLibrariesGroupBox->setEnabled(true);
else else
m_ui->additionalLibrariesGroupBox->setEnabled(false); m_ui->additionalLibrariesGroupBox->setEnabled(false);
...@@ -171,9 +171,9 @@ void AndroidDeployQtWidget::createManifestButton() ...@@ -171,9 +171,9 @@ void AndroidDeployQtWidget::createManifestButton()
void AndroidDeployQtWidget::updateInputFileUi() void AndroidDeployQtWidget::updateInputFileUi()
{ {
QmakeProjectManager::Qt4Project *project QmakeProjectManager::QmakeProject *project
= static_cast<QmakeProjectManager::Qt4Project *>(m_step->project()); = static_cast<QmakeProjectManager::QmakeProject *>(m_step->project());
QList<QmakeProjectManager::Qt4ProFileNode *> nodes = project->applicationProFiles(); QList<QmakeProjectManager::QmakeProFileNode *> nodes = project->applicationProFiles();
int size = nodes.size(); int size = nodes.size();
if (size == 0 || size == 1) { if (size == 0 || size == 1) {
// there's nothing to select, e.g. before parsing // there's nothing to select, e.g. before parsing
...@@ -185,7 +185,7 @@ void AndroidDeployQtWidget::updateInputFileUi() ...@@ -185,7 +185,7 @@ void AndroidDeployQtWidget::updateInputFileUi()
m_ui->inputFileComboBox->setVisible(true); m_ui->inputFileComboBox->setVisible(true);
m_ui->inputFileComboBox->clear(); m_ui->inputFileComboBox->clear();
foreach (QmakeProjectManager::Qt4ProFileNode *node, nodes) { foreach (QmakeProjectManager::QmakeProFileNode *node, nodes) {
QString file = node->singleVariableValue(QmakeProjectManager::AndroidDeploySettingsFile); QString file = node->singleVariableValue(QmakeProjectManager::AndroidDeploySettingsFile);
m_ui->inputFileComboBox->addItem(node->displayName(), file); m_ui->inputFileComboBox->addItem(node->displayName(), file);
} }
......
...@@ -134,7 +134,7 @@ bool AndroidDeployStep::init() ...@@ -134,7 +134,7 @@ bool AndroidDeployStep::init()
m_androidDirPath = AndroidManager::dirPath(target()); m_androidDirPath = AndroidManager::dirPath(target());
m_apkPathDebug = AndroidManager::apkPath(target(), AndroidManager::DebugBuild).toString(); m_apkPathDebug = AndroidManager::apkPath(target(), AndroidManager::DebugBuild).toString();
m_apkPathRelease = AndroidManager::apkPath(target(), AndroidManager::ReleaseBuildSigned).toString(); m_apkPathRelease = AndroidManager::apkPath(target(), AndroidManager::ReleaseBuildSigned).toString();
m_buildDirectory = static_cast<Qt4Project *>(target()->project())->rootQt4ProjectNode()->buildDir(); m_buildDirectory = static_cast<QmakeProject *>(target()->project())->rootQmakeProjectNode()->buildDir();
m_runDeployAction = m_deployAction; m_runDeployAction = m_deployAction;
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit()); ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
if (!tc || tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE)) { if (!tc || tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE)) {
...@@ -143,7 +143,7 @@ bool AndroidDeployStep::init() ...@@ -143,7 +143,7 @@ bool AndroidDeployStep::init()
} }
m_ndkToolChainVersion = static_cast<AndroidToolChain *>(tc)->ndkToolChainVersion(); m_ndkToolChainVersion = static_cast<AndroidToolChain *>(tc)->ndkToolChainVersion();
QString arch = static_cast<Qt4Project *>(project())->rootQt4ProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar); QString arch = static_cast<QmakeProject *>(project())->rootQmakeProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar);
if (!arch.isEmpty()) if (!arch.isEmpty())
m_libgnustl = AndroidManager::libGnuStl(arch, m_ndkToolChainVersion); m_libgnustl = AndroidManager::libGnuStl(arch, m_ndkToolChainVersion);
return true; return true;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
using namespace Android; using namespace Android;
using namespace Internal; using namespace Internal;
AndroidExtraLibraryListModel::AndroidExtraLibraryListModel(QmakeProjectManager::Qt4Project *project, AndroidExtraLibraryListModel::AndroidExtraLibraryListModel(QmakeProjectManager::QmakeProject *project,
QObject *parent) QObject *parent)
: QAbstractItemModel(parent) : QAbstractItemModel(parent)
, m_project(project) , m_project(project)
...@@ -77,18 +77,18 @@ QVariant AndroidExtraLibraryListModel::data(const QModelIndex &index, int role) ...@@ -77,18 +77,18 @@ QVariant AndroidExtraLibraryListModel::data(const QModelIndex &index, int role)
void AndroidExtraLibraryListModel::reset() void AndroidExtraLibraryListModel::reset()
{ {
if (m_project->rootQt4ProjectNode()->projectType() != QmakeProjectManager::ApplicationTemplate) if (m_project->rootQmakeProjectNode()->projectType() != QmakeProjectManager::ApplicationTemplate)
return; return;
beginResetModel(); beginResetModel();
QmakeProjectManager::Qt4ProFileNode *node = m_project->rootQt4ProjectNode(); QmakeProjectManager::QmakeProFileNode *node = m_project->rootQmakeProjectNode();
m_entries = node->variableValue(QmakeProjectManager::AndroidExtraLibs); m_entries = node->variableValue(QmakeProjectManager::AndroidExtraLibs);
endResetModel(); endResetModel();
} }
void AndroidExtraLibraryListModel::addEntries(const QStringList &list) void AndroidExtraLibraryListModel::addEntries(const QStringList &list)
{ {
if (m_project->rootQt4ProjectNode()->projectType() != QmakeProjectManager::ApplicationTemplate) if (m_project->rootQmakeProjectNode()->projectType() != QmakeProjectManager::ApplicationTemplate)
return; return;
beginInsertRows(QModelIndex(), m_entries.size(), m_entries.size() + list.size()); beginInsertRows(QModelIndex(), m_entries.size(), m_entries.size() + list.size());
...@@ -96,7 +96,7 @@ void AndroidExtraLibraryListModel::addEntries(const QStringList &list) ...@@ -96,7 +96,7 @@ void AndroidExtraLibraryListModel::addEntries(const QStringList &list)
foreach (QString path, list) foreach (QString path, list)
m_entries += QDir(m_project->projectDirectory()).relativeFilePath(path); m_entries += QDir(m_project->projectDirectory()).relativeFilePath(path);
QmakeProjectManager::Qt4ProFileNode *node = m_project->rootQt4ProjectNode(); QmakeProjectManager::QmakeProFileNode *node = m_project->rootQmakeProjectNode();
node->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries.join(QLatin1String(" "))); node->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries.join(QLatin1String(" ")));
endInsertRows(); endInsertRows();
...@@ -109,7 +109,7 @@ bool greaterModelIndexByRow(const QModelIndex &a, const QModelIndex &b) ...@@ -109,7 +109,7 @@ bool greaterModelIndexByRow(const QModelIndex &a, const QModelIndex &b)
void AndroidExtraLibraryListModel::removeEntries(QModelIndexList list) void AndroidExtraLibraryListModel::removeEntries(QModelIndexList list)
{ {
if (list.isEmpty() || m_project->rootQt4ProjectNode()->projectType() != QmakeProjectManager::ApplicationTemplate) if (list.isEmpty() || m_project->rootQmakeProjectNode()->projectType() != QmakeProjectManager::ApplicationTemplate)
return; return;
std::sort(list.begin(), list.end(), greaterModelIndexByRow); std::sort(list.begin(), list.end(), greaterModelIndexByRow);
...@@ -128,6 +128,6 @@ void AndroidExtraLibraryListModel::removeEntries(QModelIndexList list) ...@@ -128,6 +128,6 @@ void AndroidExtraLibraryListModel::removeEntries(QModelIndexList list)
endRemoveRows(); endRemoveRows();
} }
QmakeProjectManager::Qt4ProFileNode *node = m_project->rootQt4ProjectNode(); QmakeProjectManager::QmakeProFileNode *node = m_project->rootQmakeProjectNode();
node->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries.join(QLatin1String(" "))); node->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries.join(QLatin1String(" ")));
} }
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <QAbstractItemModel> #include <QAbstractItemModel>
#include <QStringList> #include <QStringList>
namespace QmakeProjectManager { class Qt4Project; } namespace QmakeProjectManager { class QmakeProject; }
namespace Android { namespace Android {
namespace Internal { namespace Internal {
...@@ -42,7 +42,7 @@ class AndroidExtraLibraryListModel : public QAbstractItemModel ...@@ -42,7 +42,7 @@ class AndroidExtraLibraryListModel : public QAbstractItemModel
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit AndroidExtraLibraryListModel(QmakeProjectManager::Qt4Project *project, explicit AndroidExtraLibraryListModel(QmakeProjectManager::QmakeProject *project,
QObject *parent = 0); QObject *parent = 0);
QModelIndex index(int row, int column, const QModelIndex &parent) const; QModelIndex index(int row, int column, const QModelIndex &parent) const;
...@@ -58,7 +58,7 @@ private slots: ...@@ -58,7 +58,7 @@ private slots:
void reset(); void reset();
private: private:
QmakeProjectManager::Qt4Project *m_project; QmakeProjectManager::QmakeProject *m_project;
QStringList m_entries; QStringList m_entries;
}; };
......
...@@ -127,7 +127,7 @@ namespace Internal { ...@@ -127,7 +127,7 @@ namespace Internal {
bool AndroidManager::supportsAndroid(ProjectExplorer::Target *target) bool AndroidManager::supportsAndroid(ProjectExplorer::Target *target)
{ {
if (!qobject_cast<QmakeProjectManager::Qt4Project *>(target->project())) if (!qobject_cast<QmakeProjectManager::QmakeProject *>(target->project()))
return false; return false;
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit()); QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
return version && version->platformName() == QLatin1String(QtSupport::Constants::ANDROID_PLATFORM); return version && version->platformName() == QLatin1String(QtSupport::Constants::ANDROID_PLATFORM);
...@@ -259,10 +259,10 @@ bool AndroidManager::setBuildTargetSDK(ProjectExplorer::Target *target, const QS ...@@ -259,10 +259,10 @@ bool AndroidManager::setBuildTargetSDK(ProjectExplorer::Target *target, const QS
QString AndroidManager::targetArch(ProjectExplorer::Target *target) QString AndroidManager::targetArch(ProjectExplorer::Target *target)
{ {
QmakeProjectManager::Qt4Project *pro = qobject_cast<QmakeProjectManager::Qt4Project *>(target->project()); QmakeProjectManager::QmakeProject *pro = qobject_cast<QmakeProjectManager::QmakeProject *>(target->project());
if (!pro) if (!pro)
return QString(); return QString();
QmakeProjectManager::Qt4ProFileNode *node = pro->rootQt4ProjectNode(); QmakeProjectManager::QmakeProFileNode *node = pro->rootQmakeProjectNode();
if (!node) if (!node)
return QString(); return QString();
return node->singleVariableValue(QmakeProjectManager::AndroidArchVar); return node->singleVariableValue(QmakeProjectManager::AndroidArchVar);
...@@ -330,10 +330,10 @@ Utils::FileName AndroidManager::apkPath(ProjectExplorer::Target *target, BuildTy ...@@ -330,10 +330,10 @@ Utils::FileName AndroidManager::apkPath(ProjectExplorer::Target *target, BuildTy
QStringList AndroidManager::availableTargetApplications(ProjectExplorer::Target *target) QStringList AndroidManager::availableTargetApplications(ProjectExplorer::Target *target)
{ {
QStringList apps; QStringList apps;
QmakeProjectManager::Qt4Project *qt4Project = qobject_cast<QmakeProjectManager::Qt4Project *>(target->project()); QmakeProjectManager::QmakeProject *qt4Project = qobject_cast<QmakeProjectManager::QmakeProject *>(target->project());
if (!qt4Project) if (!qt4Project)
return apps; return apps;
foreach (QmakeProjectManager::Qt4ProFileNode *proFile, qt4Project->applicationProFiles()) { foreach (QmakeProjectManager::QmakeProFileNode *proFile, qt4Project->applicationProFiles()) {
if (proFile->projectType() == QmakeProjectManager::ApplicationTemplate) { if (proFile->projectType() == QmakeProjectManager::ApplicationTemplate) {
if (proFile->targetInformation().target.startsWith(QLatin1String("lib")) if (proFile->targetInformation().target.startsWith(QLatin1String("lib"))
&& proFile->targetInformation().target.endsWith(QLatin1String(".so"))) && proFile->targetInformation().target.endsWith(QLatin1String(".so")))
...@@ -509,8 +509,8 @@ QString AndroidManager::targetApplicationPath(ProjectExplorer::Target *target) ...@@ -509,8 +509,8 @@ QString AndroidManager::targetApplicationPath(ProjectExplorer::Target *target)
QString selectedApp = targetApplication(target); QString selectedApp = targetApplication(target);
if (selectedApp.isEmpty()) if (selectedApp.isEmpty())
return QString(); return QString();
QmakeProjectManager::Qt4Project *qt4Project = qobject_cast<QmakeProjectManager::Qt4Project *>(target->project()); QmakeProjectManager::QmakeProject *qt4Project = qobject_cast<QmakeProjectManager::QmakeProject *>(target->project());
foreach (QmakeProjectManager::Qt4ProFileNode *proFile, qt4Project->applicationProFiles()) { foreach (QmakeProjectManager::QmakeProFileNode *proFile, qt4Project->applicationProFiles()) {
if (proFile->projectType() == QmakeProjectManager::ApplicationTemplate) { if (proFile->projectType() == QmakeProjectManager::ApplicationTemplate) {
if (proFile->targetInformation().target.startsWith(QLatin1String("lib")) if (proFile->targetInformation().target.startsWith(QLatin1String("lib"))
&& proFile->targetInformation().target.endsWith(QLatin1String(".so"))) { && proFile->targetInformation().target.endsWith(QLatin1String(".so"))) {
...@@ -529,7 +529,7 @@ QString AndroidManager::targetApplicationPath(ProjectExplorer::Target *target) ...@@ -529,7 +529,7 @@ QString AndroidManager::targetApplicationPath(ProjectExplorer::Target *target)
bool AndroidManager::createAndroidTemplatesIfNecessary(ProjectExplorer::Target *target) bool AndroidManager::createAndroidTemplatesIfNecessary(ProjectExplorer::Target *target)
{ {
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit()); QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
QmakeProjectManager::Qt4Project *qt4Project = qobject_cast<QmakeProjectManager::Qt4Project*>(target->project()); QmakeProjectManager::QmakeProject *qt4Project = qobject_cast<QmakeProjectManager::QmakeProject*>(target->project());
if (!qt4Project || !qt4Project->rootProjectNode() || !version) if (!qt4Project || !qt4Project->rootProjectNode() || !version)
return false; return false;
...@@ -804,16 +804,16 @@ QVector<AndroidManager::Library> AndroidManager::availableQtLibsWithDependencies ...@@ -804,16 +804,16 @@ QVector<AndroidManager::Library> AndroidManager::availableQtLibsWithDependencies
if (tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE)) if (tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE))
return QVector<AndroidManager::Library>(); return QVector<AndroidManager::Library>();
QmakeProjectManager::Qt4Project *project = static_cast<QmakeProjectManager::Qt4Project *>(target->project()); QmakeProjectManager::QmakeProject *project = static_cast<QmakeProjectManager::QmakeProject *>(target->project());
QString arch = project->rootQt4ProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar); QString arch = project->rootQmakeProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar);
AndroidToolChain *atc = static_cast<AndroidToolChain *>(tc); AndroidToolChain *atc = static_cast<AndroidToolChain *>(tc);
QString libgnustl = libGnuStl(arch, atc->ndkToolChainVersion()); QString libgnustl = libGnuStl(arch, atc->ndkToolChainVersion());
Utils::FileName readelfPath = AndroidConfigurations::instance().readelfPath(target->activeRunConfiguration()->abi().architecture(), Utils::FileName readelfPath = AndroidConfigurations::instance().readelfPath(target->activeRunConfiguration()->abi().architecture(),
atc->ndkToolChainVersion()); atc->ndkToolChainVersion());
const QmakeProjectManager::Qt4Project *const qt4Project const QmakeProjectManager::QmakeProject *const qt4Project
= qobject_cast<const QmakeProjectManager::Qt4Project *>(target->project()); = qobject_cast<const QmakeProjectManager::QmakeProject *>(target->project());
if (!qt4Project || !version) if (!qt4Project || !version)
return QVector<AndroidManager::Library>(); return QVector<AndroidManager::Library>();
QString qtLibsPath = version->qmakeProperty("QT_INSTALL_LIBS"); QString qtLibsPath = version->qmakeProperty("QT_INSTALL_LIBS");
...@@ -904,11 +904,11 @@ bool AndroidManager::setBundledInLib(ProjectExplorer::Target *target, const QStr ...@@ -904,11 +904,11 @@ bool AndroidManager::setBundledInLib(ProjectExplorer::Target *target, const QStr
QStringList AndroidManager::availablePrebundledLibs(ProjectExplorer::Target *target) QStringList AndroidManager::availablePrebundledLibs(ProjectExplorer::Target *target)
{ {
QStringList libs; QStringList libs;
QmakeProjectManager::Qt4Project *qt4Project = qobject_cast<QmakeProjectManager::Qt4Project *>(target->project()); QmakeProjectManager::QmakeProject *qt4Project = qobject_cast<QmakeProjectManager::QmakeProject *>(target->project());
if (!qt4Project) if (!qt4Project)
return libs; return libs;
foreach (QmakeProjectManager::Qt4ProFileNode *node, qt4Project->allProFiles()) foreach (QmakeProjectManager::QmakeProFileNode *node, qt4Project->allProFiles())
if (node->projectType() == QmakeProjectManager::LibraryTemplate) if (node->projectType() == QmakeProjectManager::LibraryTemplate)
libs << node->targetInformation().target; libs << node->targetInformation().target;
return libs; return libs;
......
...@@ -103,13 +103,13 @@ bool AndroidPackageCreationStep::init() ...@@ -103,13 +103,13 @@ bool AndroidPackageCreationStep::init()
raiseError(tr("Cannot create Android package: current build configuration is not Qt 4.")); raiseError(tr("Cannot create Android package: current build configuration is not Qt 4."));
return false; return false;
} }
Qt4Project *project = static_cast<Qt4Project *>(target()->project()); QmakeProject *project = static_cast<QmakeProject *>(target()->project());
m_outputParser.setProjectFileList(project->files(Project::AllFiles)); m_outputParser.setProjectFileList(project->files(Project::AllFiles));
// Copying // Copying
m_androidDir = AndroidManager::dirPath(target()); m_androidDir = AndroidManager::dirPath(target());
Utils::FileName path = m_androidDir; Utils::FileName path = m_androidDir;
QString androidTargetArch = project->rootQt4ProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar); QString androidTargetArch = project->rootQmakeProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar);
if (androidTargetArch.isEmpty()) { if (androidTargetArch.isEmpty()) {
raiseError(tr("Cannot create Android package: No ANDROID_TARGET_ARCH set in make spec.")); raiseError(tr("Cannot create Android package: No ANDROID_TARGET_ARCH set in make spec."));
return false; return false;
...@@ -434,8 +434,8 @@ void AndroidPackageCreationStep::collectFiles(QList<DeployItem> *deployList, ...@@ -434,8 +434,8 @@ void AndroidPackageCreationStep::collectFiles(QList<DeployItem> *deployList,
if (!version) if (!version)
return; return;
Qt4Project *project = static_cast<Qt4Project *>(target()->project()); QmakeProject *project = static_cast<QmakeProject *>(target()->project());
QString androidTargetArch = project->rootQt4ProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar); QString androidTargetArch = project->rootQmakeProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar);
QString androidAssetsPath = m_androidDir.toString() + QLatin1String("/assets/"); QString androidAssetsPath = m_androidDir.toString() + QLatin1String("/assets/");
QString androidJarPath = m_androidDir.toString() + QLatin1String("/libs/"); QString androidJarPath = m_androidDir.toString() + QLatin1String("/libs/");
......
...@@ -109,7 +109,7 @@ void AndroidQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::En ...@@ -109,7 +109,7 @@ void AndroidQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::En
env.set(QLatin1String("ANDROID_NDK_HOST"), AndroidConfigurations::instance().config().toolchainHost); env.set(QLatin1String("ANDROID_NDK_HOST"), AndroidConfigurations::instance().config().toolchainHost);
env.set(QLatin1String("ANDROID_NDK_ROOT"), AndroidConfigurations::instance().config().ndkLocation.toUserOutput()); env.set(QLatin1String("ANDROID_NDK_ROOT"), AndroidConfigurations::instance().config().ndkLocation.toUserOutput());
Qt4Project *qt4pro = qobject_cast<QmakeProjectManager::Qt4Project *>(ProjectExplorerPlugin::instance()->currentProject()); QmakeProject *qt4pro = qobject_cast<QmakeProjectManager::QmakeProject *>(ProjectExplorerPlugin::instance()->currentProject());
if (!qt4pro || !qt4pro->activeTarget() if (!qt4pro || !qt4pro->activeTarget()
|| QtSupport::QtKitInformation::qtVersion(k)->type() != QLatin1String(Constants::ANDROIDQT)) || QtSupport::QtKitInformation::qtVersion(k)->type() != QLatin1String(Constants::ANDROIDQT))
return; return;
......
...@@ -47,7 +47,7 @@ const char PRO_FILE_KEY[] = "Qt4ProjectManager.Qt4RunConfiguration.ProFile"; ...@@ -47,7 +47,7 @@ const char PRO_FILE_KEY[] = "Qt4ProjectManager.Qt4RunConfiguration.ProFile";
} }
using namespace ProjectExplorer; using namespace ProjectExplorer;
using QmakeProjectManager::Qt4Project; using QmakeProjectManager::QmakeProject;
namespace Android { namespace Android {
namespace Internal { namespace Internal {
...@@ -56,7 +56,7 @@ AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, Core::Id id, co ...@@ -56,7 +56,7 @@ AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, Core::Id id, co
: RunConfiguration(parent, id) : RunConfiguration(parent, id)
, m_proFilePath(path) , m_proFilePath(path)
{ {
Qt4Project *project = static_cast<Qt4Project *>(parent->project()); QmakeProject *project = static_cast<QmakeProject *>(parent->project());
m_parseSuccess = project->validParse(m_proFilePath); m_parseSuccess = project->validParse(m_proFilePath);
m_parseInProgress = project->parseInProgress(m_proFilePath); m_parseInProgress = project->parseInProgress(m_proFilePath);
init(); init();
...@@ -74,16 +74,16 @@ AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, AndroidRunConfi ...@@ -74,16 +74,16 @@ AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, AndroidRunConfi
void AndroidRunConfiguration::init() void AndroidRunConfiguration::init()
{ {
setDefaultDisplayName(defaultDisplayName()); setDefaultDisplayName(defaultDisplayName());
connect(target()->project(), SIGNAL(proFileUpdated(QmakeProjectManager::Qt4ProFileNode*,bool,bool)), connect(target()->project(), SIGNAL(proFileUpdated(QmakeProjectManager::QmakeProFileNode*,bool,bool)),
this, SLOT(proFileUpdated(QmakeProjectManager::Qt4ProFileNode*,bool,bool))); this, SLOT(proFileUpdated(QmakeProjectManager::QmakeProFileNode*,bool,bool)));
} }
bool AndroidRunConfiguration::fromMap(const QVariantMap &map) bool AndroidRunConfiguration::fromMap(const QVariantMap &map)
{ {
const QDir projectDir = QDir(target()->project()->projectDirectory()); const QDir projectDir = QDir(target()->project()->projectDirectory());
m_proFilePath = QDir::cleanPath(projectDir.filePath(map.value(QLatin1String(PRO_FILE_KEY)).toString())); m_proFilePath = QDir::cleanPath(projectDir.filePath(map.value(QLatin1String(PRO_FILE_KEY)).toString()));
m_parseSuccess = static_cast<Qt4Project *>(target()->project())->validParse(m_proFilePath); m_parseSuccess = static_cast<QmakeProject *>(target()->project())->validParse(m_proFilePath);
m_parseInProgress = static_cast<Qt4Project *>(target()->project())->parseInProgress(m_proFilePath); m_parseInProgress = static_cast<QmakeProject *>(target()->project())->parseInProgress(m_proFilePath);
return RunConfiguration::fromMap(map); return RunConfiguration::fromMap(map);
} }
...@@ -108,11 +108,11 @@ QString AndroidRunConfiguration::disabledReason() const ...@@ -108,11 +108,11 @@ QString AndroidRunConfiguration::disabledReason() const
.arg(QFileInfo(m_proFilePath).fileName()); .arg(QFileInfo(m_proFilePath).fileName());
if (!m_parseSuccess) if (!m_parseSuccess)
return static_cast<Qt4Project *>(target()->project())->disabledReasonForRunConfiguration(m_proFilePath); return static_cast<QmakeProject *>(target()->project())->disabledReasonForRunConfiguration(m_proFilePath);
return QString(); return QString();
} }
void AndroidRunConfiguration::proFileUpdated(QmakeProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress) void AndroidRunConfiguration::proFileUpdated(QmakeProjectManager::QmakeProFileNode *pro, bool success, bool parseInProgress)
{ {
if (m_proFilePath != pro->path()) if (m_proFilePath != pro->path())
return; return;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <projectexplorer/runconfiguration.h> #include <projectexplorer/runconfiguration.h>