forked from qt-creator/qt-creator
qmake: move over from QmakeProjectNodes to QmakeParserNodes
Change-Id: Iab87e0c248b0f651a1774336c3bddf83baa9d057 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
62726c3f77
commit
f9eab73dad
@@ -141,7 +141,7 @@ void IosRunConfiguration::deviceChanges() {
|
||||
enabledCheck();
|
||||
}
|
||||
|
||||
void IosRunConfiguration::proFileUpdated(QmakeProFileNode *pro, bool success,
|
||||
void IosRunConfiguration::proFileUpdated(QmakeProFile *pro, bool success,
|
||||
bool parseInProgress)
|
||||
{
|
||||
if (m_profilePath != pro->filePath())
|
||||
@@ -193,16 +193,20 @@ FileName IosRunConfiguration::profilePath() const
|
||||
return m_profilePath;
|
||||
}
|
||||
|
||||
static QmakeProFile *proFile(const IosRunConfiguration *rc)
|
||||
{
|
||||
QmakeProject *pro = qobject_cast<QmakeProject *>(rc->target()->project());
|
||||
QmakeProFile *proFile = pro ? pro->rootProFile() : nullptr;
|
||||
if (proFile)
|
||||
proFile = proFile->findProFile(rc->profilePath());
|
||||
return proFile;
|
||||
}
|
||||
|
||||
QString IosRunConfiguration::applicationName() const
|
||||
{
|
||||
QmakeProject *pro = qobject_cast<QmakeProject *>(target()->project());
|
||||
const QmakeProFileNode *node = 0;
|
||||
if (pro)
|
||||
node = pro->rootProjectNode();
|
||||
if (node)
|
||||
node = node->findProFileFor(profilePath());
|
||||
if (node) {
|
||||
TargetInformation ti = node->targetInformation();
|
||||
QmakeProFile *pro = proFile(this);
|
||||
if (pro) {
|
||||
TargetInformation ti = pro->targetInformation();
|
||||
if (ti.valid)
|
||||
return ti.target;
|
||||
}
|
||||
@@ -221,14 +225,9 @@ FileName IosRunConfiguration::bundleDirectory() const
|
||||
QmakeBuildConfiguration *bc =
|
||||
qobject_cast<QmakeBuildConfiguration *>(target()->activeBuildConfiguration());
|
||||
if (bc) {
|
||||
QmakeProject *pro = qobject_cast<QmakeProject *>(target()->project());
|
||||
const QmakeProFileNode *node = 0;
|
||||
if (pro)
|
||||
node = pro->rootProjectNode();
|
||||
if (node)
|
||||
node = node->findProFileFor(profilePath());
|
||||
if (node) {
|
||||
TargetInformation ti = node->targetInformation();
|
||||
const QmakeProFile *pro = proFile(this);
|
||||
if (pro) {
|
||||
TargetInformation ti = pro->targetInformation();
|
||||
if (ti.valid)
|
||||
res = ti.buildDir;
|
||||
}
|
||||
|
||||
@@ -32,9 +32,7 @@
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
namespace QmakeProjectManager {
|
||||
class QmakeProFileNode;
|
||||
}
|
||||
namespace QmakeProjectManager { class QmakeProFile; }
|
||||
|
||||
namespace Ios {
|
||||
namespace Internal {
|
||||
@@ -77,7 +75,7 @@ signals:
|
||||
void localExecutableChanged();
|
||||
|
||||
private:
|
||||
void proFileUpdated(QmakeProjectManager::QmakeProFileNode *pro, bool success, bool parseInProgress);
|
||||
void proFileUpdated(QmakeProjectManager::QmakeProFile *pro, bool success, bool parseInProgress);
|
||||
void deviceChanges();
|
||||
void init();
|
||||
void enabledCheck();
|
||||
|
||||
@@ -99,13 +99,13 @@ QList<Core::Id> IosRunConfigurationFactory::availableCreationIds(Target *parent,
|
||||
return QList<Core::Id>();
|
||||
QmakeProject *project = static_cast<QmakeProject *>(parent->project());
|
||||
|
||||
QList<QmakeProFileNode *> nodes = project->allProFiles({ ProjectType::ApplicationTemplate,
|
||||
ProjectType::SharedLibraryTemplate,
|
||||
ProjectType::AuxTemplate });
|
||||
QList<QmakeProFile *> files = project->allProFiles({ ProjectType::ApplicationTemplate,
|
||||
ProjectType::SharedLibraryTemplate,
|
||||
ProjectType::AuxTemplate });
|
||||
if (mode == AutoCreate)
|
||||
nodes = QmakeProject::nodesWithQtcRunnable(nodes);
|
||||
files = QmakeProject::proFilesWithQtcRunnable(files);
|
||||
Core::Id baseId(IOS_RC_ID_PREFIX);
|
||||
return QmakeProject::idsForNodes(baseId, nodes);
|
||||
return QmakeProject::idsForProFiles(baseId, files);
|
||||
}
|
||||
|
||||
QString IosRunConfigurationFactory::displayNameForId(Core::Id id) const
|
||||
|
||||
Reference in New Issue
Block a user