Commit f9eab73d authored by Tobias Hunger's avatar Tobias Hunger Committed by Tim Jenssen

qmake: move over from QmakeProjectNodes to QmakeParserNodes

Change-Id: Iab87e0c248b0f651a1774336c3bddf83baa9d057
Reviewed-by: default avatarhjk <hjk@qt.io>
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent 62726c3f
......@@ -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
......
......@@ -86,20 +86,20 @@ QVariant AndroidExtraLibraryListModel::data(const QModelIndex &index, int role)
void AndroidExtraLibraryListModel::activeRunConfigurationChanged()
{
const QmakeProjectManager::QmakeProFileNode *node = activeNode();
if (!node || node->parseInProgress()) {
QmakeProjectManager::QmakeProFile *pro = activeProFile();
if (!pro || pro->parseInProgress()) {
emit enabledChanged(false);
return;
}
m_scope = QLatin1String("contains(ANDROID_TARGET_ARCH,")
+ node->singleVariableValue(QmakeProjectManager::Variable::AndroidArch)
+ pro->singleVariableValue(QmakeProjectManager::Variable::AndroidArch)
+ QLatin1Char(')');
bool enabled;
beginResetModel();
if (node->validParse() && node->projectType() == QmakeProjectManager::ProjectType::ApplicationTemplate) {
m_entries = node->variableValue(QmakeProjectManager::Variable::AndroidExtraLibs);
if (pro->validParse() && pro->projectType() == QmakeProjectManager::ProjectType::ApplicationTemplate) {
m_entries = pro->variableValue(QmakeProjectManager::Variable::AndroidExtraLibs);
enabled = true;
} else {
// parsing error or not a application template
......@@ -111,50 +111,44 @@ void AndroidExtraLibraryListModel::activeRunConfigurationChanged()
emit enabledChanged(enabled);
}
QmakeProjectManager::QmakeProFileNode *AndroidExtraLibraryListModel::activeNode() const
QmakeProjectManager::QmakeProFile *AndroidExtraLibraryListModel::activeProFile() const
{
ProjectExplorer::RunConfiguration *rc = m_target->activeRunConfiguration();
QmakeAndroidRunConfiguration *qarc = qobject_cast<QmakeAndroidRunConfiguration *>(rc);
if (!qarc)
return 0;
auto project = static_cast<QmakeProject *>(m_target->project());
return project->rootProjectNode()->findProFileFor(qarc->proFilePath());
return project->rootProFile()->findProFile(qarc->proFilePath());
}
void AndroidExtraLibraryListModel::proFileUpdated(QmakeProjectManager::QmakeProFileNode *node)
void AndroidExtraLibraryListModel::proFileUpdated(QmakeProjectManager::QmakeProFile *pro)
{
if (node != activeNode())
if (activeProFile() != pro)
return;
activeRunConfigurationChanged();
}
bool AndroidExtraLibraryListModel::isEnabled() const
{
QmakeProjectManager::QmakeProFileNode *node = activeNode();
if (!node)
return false;
if (node->parseInProgress())
return false;
if (node->projectType() != QmakeProjectManager::ProjectType::ApplicationTemplate)
return false;
return true;
QmakeProjectManager::QmakeProFile *pro = activeProFile();
return pro && !pro->parseInProgress() && pro->projectType() == QmakeProjectManager::ProjectType::ApplicationTemplate;
}
void AndroidExtraLibraryListModel::addEntries(const QStringList &list)
{
QmakeProjectManager::QmakeProFileNode *node = activeNode();
if (!node || node->projectType() != QmakeProjectManager::ProjectType::ApplicationTemplate)
QmakeProjectManager::QmakeProFile *pro = activeProFile();
if (!pro || pro->projectType() != QmakeProjectManager::ProjectType::ApplicationTemplate)
return;
beginInsertRows(QModelIndex(), m_entries.size(), m_entries.size() + list.size());
foreach (const QString &path, list)
m_entries += QLatin1String("$$PWD/")
+ node->filePath().toFileInfo().absoluteDir().relativeFilePath(path);
+ pro->filePath().toFileInfo().absoluteDir().relativeFilePath(path);
node->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries, m_scope,
QmakeProjectManager::Internal::ProWriter::ReplaceValues
| QmakeProjectManager::Internal::ProWriter::MultiLine);
pro->setProVariable("ANDROID_EXTRA_LIBS", m_entries, m_scope,
QmakeProjectManager::Internal::ProWriter::ReplaceValues
| QmakeProjectManager::Internal::ProWriter::MultiLine);
endInsertRows();
}
......@@ -166,8 +160,10 @@ bool greaterModelIndexByRow(const QModelIndex &a, const QModelIndex &b)
void AndroidExtraLibraryListModel::removeEntries(QModelIndexList list)
{
QmakeProjectManager::QmakeProFileNode *node = activeNode();
if (list.isEmpty() || !node || node->projectType() != QmakeProjectManager::ProjectType::ApplicationTemplate)
QmakeProjectManager::QmakeProFile *pro = activeProFile();
if (!pro)
return;
if (list.isEmpty() || !pro || pro->projectType() != QmakeProjectManager::ProjectType::ApplicationTemplate)
return;
std::sort(list.begin(), list.end(), greaterModelIndexByRow);
......@@ -186,5 +182,5 @@ void AndroidExtraLibraryListModel::removeEntries(QModelIndexList list)
endRemoveRows();
}
node->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries, m_scope);
pro->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries, m_scope);
}
......@@ -34,7 +34,7 @@ class RunConfiguration;
class Target;
}
namespace QmakeProjectManager { class QmakeProFileNode; }
namespace QmakeProjectManager { class QmakeProFile; }
namespace QmakeAndroidSupport {
......@@ -61,9 +61,9 @@ signals:
void enabledChanged(bool);
private:
void proFileUpdated(QmakeProjectManager::QmakeProFileNode *node);
void proFileUpdated(QmakeProjectManager::QmakeProFile *pro);
void activeRunConfigurationChanged();
QmakeProjectManager::QmakeProFileNode *activeNode() const;
QmakeProjectManager::QmakeProFile *activeProFile() const;
ProjectExplorer::Target *m_target;
QStringList m_entries;
......
......@@ -35,7 +35,6 @@
#include <projectexplorer/target.h>
#include <qmakeprojectmanager/qmakeproject.h>
#include <qmakeprojectmanager/qmakenodes.h>
#include <proparser/prowriter.h>
......@@ -55,7 +54,7 @@ using namespace QmakeAndroidSupport::Internal;
using namespace Utils;
using QmakeProjectManager::QmakeProject;
using QmakeProjectManager::QmakeProFileNode;
using QmakeProjectManager::QmakeProFile;
//
// NoApplicationProFilePage
......@@ -74,8 +73,10 @@ NoApplicationProFilePage::NoApplicationProFilePage(CreateAndroidManifestWizard *
//
// ChooseProFilePage
//
ChooseProFilePage::ChooseProFilePage(CreateAndroidManifestWizard *wizard, const QList<QmakeProFileNode *> &nodes, const QmakeProFileNode *select)
: m_wizard(wizard)
ChooseProFilePage::ChooseProFilePage(CreateAndroidManifestWizard *wizard,
const QList<QmakeProFile *> &files,
const QmakeProFile *select) :
m_wizard(wizard)
{
QFormLayout *fl = new QFormLayout(this);
QLabel *label = new QLabel(this);
......@@ -84,9 +85,9 @@ ChooseProFilePage::ChooseProFilePage(CreateAndroidManifestWizard *wizard, const
fl->addRow(label);
m_comboBox = new QComboBox(this);
foreach (QmakeProFileNode *node, nodes) {
m_comboBox->addItem(node->displayName(), QVariant::fromValue(static_cast<void *>(node))); // TODO something more?
if (node == select)
for (QmakeProFile *file : files) {
m_comboBox->addItem(file->displayName(), QVariant::fromValue(static_cast<void *>(file))); // TODO something more?
if (file == select)
m_comboBox->setCurrentIndex(m_comboBox->count() - 1);
}
......@@ -101,7 +102,7 @@ ChooseProFilePage::ChooseProFilePage(CreateAndroidManifestWizard *wizard, const
void ChooseProFilePage::nodeSelected(int index)
{
Q_UNUSED(index)
m_wizard->setNode(static_cast<QmakeProFileNode *>(m_comboBox->itemData(m_comboBox->currentIndex()).value<void *>()));
m_wizard->setProFile(static_cast<QmakeProFile *>(m_comboBox->itemData(m_comboBox->currentIndex()).value<void *>()));
}
......@@ -152,7 +153,7 @@ ChooseDirectoryPage::ChooseDirectoryPage(CreateAndroidManifestWizard *wizard)
void ChooseDirectoryPage::checkPackageSourceDir()
{
QString projectDir = m_wizard->node()->filePath().toFileInfo().absolutePath();
QString projectDir = m_wizard->proFile()->filePath().toFileInfo().absolutePath();
QString newDir = m_androidPackageSourceDir->path();
bool isComplete = QFileInfo(projectDir) != QFileInfo(newDir);
......@@ -172,13 +173,13 @@ bool ChooseDirectoryPage::isComplete() const
void ChooseDirectoryPage::initializePage()
{
QString androidPackageDir = m_wizard->node()->singleVariableValue(QmakeProjectManager::Variable::AndroidPackageSourceDir);
QString androidPackageDir = m_wizard->proFile()->singleVariableValue(QmakeProjectManager::Variable::AndroidPackageSourceDir);
if (androidPackageDir.isEmpty()) {
m_label->setText(tr("Select the Android package source directory.\n\n"
"The files in the Android package source directory are copied to the build directory's "
"Android directory and the default files are overwritten."));
m_androidPackageSourceDir->setPath(m_wizard->node()->filePath().toFileInfo().absolutePath().append(QLatin1String("/android")));
m_androidPackageSourceDir->setPath(m_wizard->proFile()->filePath().toFileInfo().absolutePath().append(QLatin1String("/android")));
connect(m_androidPackageSourceDir, &PathChooser::rawPathChanged,
this, &ChooseDirectoryPage::checkPackageSourceDir);
} else {
......@@ -195,40 +196,40 @@ void ChooseDirectoryPage::initializePage()
// CreateAndroidManifestWizard
//
CreateAndroidManifestWizard::CreateAndroidManifestWizard(ProjectExplorer::Target *target)
: m_target(target), m_node(0), m_copyState(Ask)
: m_target(target), m_proFile(0), m_copyState(Ask)
{
setWindowTitle(tr("Create Android Template Files Wizard"));
QmakeProject *project = static_cast<QmakeProject *>(target->project());
QList<QmakeProFileNode *> nodes = project->applicationProFiles();
QList<QmakeProFile *> files = project->applicationProFiles();
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
m_copyGradle = version && version->qtVersion() >= QtSupport::QtVersionNumber(5, 4, 0);
const QmakeProFileNode *currentRunNode = 0;
const QmakeProFile *currentRunNode = nullptr;
ProjectExplorer::RunConfiguration *rc = target->activeRunConfiguration();
if (auto qrc = qobject_cast<QmakeAndroidRunConfiguration *>(rc))
currentRunNode = project->rootProjectNode()->findProFileFor(qrc->proFilePath());
currentRunNode = project->rootProFile()->findProFile(qrc->proFilePath());
if (nodes.isEmpty()) {
if (files.isEmpty()) {
// oh uhm can't create anything
addPage(new NoApplicationProFilePage(this));
} else if (nodes.size() == 1) {
setNode(nodes.first());
} else if (files.size() == 1) {
setProFile(files.first());
addPage(new ChooseDirectoryPage(this));
} else {
addPage(new ChooseProFilePage(this, nodes, currentRunNode));
addPage(new ChooseProFilePage(this, files, currentRunNode));
addPage(new ChooseDirectoryPage(this));
}
}
QmakeProjectManager::QmakeProFileNode *CreateAndroidManifestWizard::node() const
QmakeProjectManager::QmakeProFile *CreateAndroidManifestWizard::proFile() const
{
return m_node;
return m_proFile;
}
void CreateAndroidManifestWizard::setNode(QmakeProjectManager::QmakeProFileNode *node)
void CreateAndroidManifestWizard::setProFile(QmakeProjectManager::QmakeProFile *node)
{
m_node = node;
m_proFile = node;
}
void CreateAndroidManifestWizard::setDirectory(const QString &directory)
......@@ -334,19 +335,19 @@ void CreateAndroidManifestWizard::createAndroidTemplateFiles()
AndroidManager::updateGradleProperties(m_target);
}
m_node->addFiles(addedFiles);
m_proFile->addFiles(addedFiles);
if (m_node->singleVariableValue(QmakeProjectManager::Variable::AndroidPackageSourceDir).isEmpty()) {
if (m_proFile->singleVariableValue(QmakeProjectManager::Variable::AndroidPackageSourceDir).isEmpty()) {
// and now time for some magic
QString value = QLatin1String("$$PWD/")
+ m_node->filePath().toFileInfo().absoluteDir().relativeFilePath(m_directory);
+ m_proFile->filePath().toFileInfo().absoluteDir().relativeFilePath(m_directory);
bool result =
m_node->setProVariable(QLatin1String("ANDROID_PACKAGE_SOURCE_DIR"), QStringList(value));
m_proFile->setProVariable(QLatin1String("ANDROID_PACKAGE_SOURCE_DIR"), QStringList(value));
if (!result) {
QMessageBox::warning(this, tr("Project File not Updated"),
tr("Could not update the .pro file %1.")
.arg(m_node->filePath().toUserOutput()));
.arg(m_proFile->filePath().toUserOutput()));
}
}
Core::EditorManager::openEditor(m_directory + QLatin1String("/AndroidManifest.xml"));
......
......@@ -36,7 +36,7 @@ class QFormLayout;
QT_END_NAMESPACE
namespace ProjectExplorer { class Target; }
namespace QmakeProjectManager { class QmakeProFileNode; }
namespace QmakeProjectManager { class QmakeProFile; }
namespace QmakeAndroidSupport {
namespace Internal {
......@@ -56,7 +56,9 @@ class ChooseProFilePage : public QWizardPage
{
Q_OBJECT
public:
ChooseProFilePage(CreateAndroidManifestWizard *wizard, const QList<QmakeProjectManager::QmakeProFileNode *> &nodes, const QmakeProjectManager::QmakeProFileNode *select);
ChooseProFilePage(CreateAndroidManifestWizard *wizard,
const QList<QmakeProjectManager::QmakeProFile *> &nodes,
const QmakeProjectManager::QmakeProFile *select);
private:
void nodeSelected(int index);
private:
......@@ -90,8 +92,8 @@ class CreateAndroidManifestWizard : public Utils::Wizard
public:
CreateAndroidManifestWizard(ProjectExplorer::Target *target);
QmakeProjectManager::QmakeProFileNode *node() const;
void setNode(QmakeProjectManager::QmakeProFileNode *node);
QmakeProjectManager::QmakeProFile *proFile() const;
void setProFile(QmakeProjectManager::QmakeProFile *proFile);
void accept();
bool copyGradle();
......@@ -110,7 +112,7 @@ private:
void createAndroidManifestFile();
void createAndroidTemplateFiles();
ProjectExplorer::Target *m_target;
QmakeProjectManager::QmakeProFileNode *m_node;
QmakeProjectManager::QmakeProFile *m_proFile;
QString m_directory;
CopyState m_copyState;
bool m_copyGradle;
......
......@@ -141,7 +141,8 @@ QString QmakeAndroidRunConfiguration::buildSystemTarget() const
return qmakeProject()->mapProFilePathToTarget(m_proFilePath);
}
void QmakeAndroidRunConfiguration::proFileUpdated(QmakeProjectManager::QmakeProFileNode *pro, bool success, bool parseInProgress)
void QmakeAndroidRunConfiguration::proFileUpdated(QmakeProjectManager::QmakeProFile *pro,
bool success, bool parseInProgress)
{
QmakeProject *project = qmakeProject();
if (m_proFilePath.isEmpty() && project->rootProjectNode())
......
......@@ -30,9 +30,9 @@
#include <utils/fileutils.h>
namespace QmakeProjectManager {
class QmakeProFileNode;
class QmakeProFile;
class QmakeProject;
}
} // namespace QmakeProjectManager
namespace QmakeAndroidSupport {
namespace Internal {
......@@ -61,7 +61,7 @@ protected:
QString defaultDisplayName();
private:
void proFileUpdated(QmakeProjectManager::QmakeProFileNode *pro, bool success, bool parseInProgress);
void proFileUpdated(QmakeProjectManager::QmakeProFile *pro, bool success, bool parseInProgress);
QmakeProjectManager::QmakeProject *qmakeProject() const;
void init();
......
......@@ -84,14 +84,14 @@ QList<Core::Id> QmakeAndroidRunConfigurationFactory::availableCreationIds(Target
return QList<Core::Id>();
QmakeProject *project = static_cast<QmakeProject *>(parent->project());
QList<QmakeProFileNode *> nodes = project->allProFiles({ ProjectType::ApplicationTemplate,
ProjectType::SharedLibraryTemplate });
QList<QmakeProFile *> files = project->allProFiles({ ProjectType::ApplicationTemplate,
ProjectType::SharedLibraryTemplate });
if (mode == AutoCreate)
nodes = QmakeProject::nodesWithQtcRunnable(nodes);
files = QmakeProject::proFilesWithQtcRunnable(files);
const Core::Id base = Core::Id(ANDROID_RC_ID_PREFIX);
return QmakeProject::idsForNodes(base, nodes);
return QmakeProject::idsForProFiles(base, files);
}
RunConfiguration *QmakeAndroidRunConfigurationFactory::doCreate(Target *parent, Core::Id id)
......
......@@ -53,14 +53,15 @@ QStringList QmakeAndroidSupport::soLibSearchPath(const ProjectExplorer::Target *
if (!project)
return res;
foreach (QmakeProFileNode *node, project->allProFiles()) {
TargetInformation info = node->targetInformation();
foreach (QmakeProFile *file, project->allProFiles()) {
TargetInformation info = file->targetInformation();
res << info.buildDir.toString();
QString destDir = info.destDir.toString();
Utils::FileName destDir = info.destDir;
if (!destDir.isEmpty()) {
if (QFileInfo(destDir).isRelative())
destDir = QDir::cleanPath(info.buildDir.toString() + '/' + destDir);
res << destDir;
if (destDir.toFileInfo().isRelative())
destDir = Utils::FileName::fromString(QDir::cleanPath(info.buildDir.toString()
+ '/' + destDir.toString()));
res << destDir.toString();
}
}
......@@ -84,7 +85,7 @@ QStringList QmakeAndroidSupport::projectTargetApplications(const ProjectExplorer
QmakeProject *qmakeProject = qobject_cast<QmakeProject *>(target->project());
if (!qmakeProject)
return apps;
foreach (QmakeProFileNode *proFile, qmakeProject->applicationProFiles()) {
for (QmakeProFile *proFile : qmakeProject->applicationProFiles()) {
if (proFile->projectType() == ProjectType::ApplicationTemplate) {
if (proFile->targetInformation().target.startsWith(QLatin1String("lib"))
&& proFile->targetInformation().target.endsWith(QLatin1String(".so")))
......
......@@ -121,7 +121,7 @@ QString DesktopQmakeRunConfiguration::disabledReason() const
return QString();
}
void DesktopQmakeRunConfiguration::proFileUpdated(QmakeProFileNode *pro, bool success, bool parseInProgress)
void DesktopQmakeRunConfiguration::proFileUpdated(QmakeProFile *pro, bool success, bool parseInProgress)
{
if (m_proFilePath != pro->filePath())
return;
......@@ -467,12 +467,16 @@ OutputFormatter *DesktopQmakeRunConfiguration::createOutputFormatter() const
QPair<QString, QString> DesktopQmakeRunConfiguration::extractWorkingDirAndExecutable(const QmakeProFileNode *node) const
{
if (!node)
return qMakePair(QString(), QString());
TargetInformation ti = node->targetInformation();
return { };
QmakeProFile *pro = node->proFile();
QTC_ASSERT(pro, return { });
TargetInformation ti = pro->targetInformation();
if (!ti.valid)
return qMakePair(QString(), QString());
const QStringList &config = node->variableValue(Variable::Config);
const QStringList &config = pro->variableValue(Variable::Config);
QString destDir = ti.destDir.toString();
QString workingDir;
......@@ -560,10 +564,10 @@ QList<Core::Id> DesktopQmakeRunConfigurationFactory::availableCreationIds(Target
return QList<Core::Id>();
QmakeProject *project = static_cast<QmakeProject *>(parent->project());
QList<QmakeProFileNode *> nodes = project->applicationProFiles();
QList<QmakeProFile *> files = project->applicationProFiles();
if (mode == AutoCreate)
nodes = QmakeProject::nodesWithQtcRunnable(nodes);
return QmakeProject::idsForNodes(Core::Id(QMAKE_RC_PREFIX), nodes);
files = QmakeProject::proFilesWithQtcRunnable(files);
return QmakeProject::idsForProFiles(Core::Id(QMAKE_RC_PREFIX), files);
}
QString DesktopQmakeRunConfigurationFactory::displayNameForId(Core::Id id) const
......
......@@ -41,6 +41,7 @@ QT_END_NAMESPACE
namespace QmakeProjectManager {
class QmakeProFile;
class QmakeProFileNode;
class QmakeProject;
......@@ -89,7 +90,7 @@ signals:
void effectiveTargetInformationChanged();
private:
void proFileUpdated(QmakeProjectManager::QmakeProFileNode *pro, bool success, bool parseInProgress);
void proFileUpdated(QmakeProjectManager::QmakeProFile *pro, bool success, bool parseInProgress);
void proFileEvaluated();
protected:
......
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#include "findqmakeprofiles.h"
#include "qmakenodes.h"
using namespace QmakeProjectManager;
using namespace QmakeProjectManager::Internal;
QList<QmakeProFileNode *> FindQmakeProFiles::operator()(ProjectExplorer::ProjectNode *root)
{
m_proFiles.clear();
root->accept(this);
return m_proFiles;
}
void FindQmakeProFiles::visitFolderNode(ProjectExplorer::FolderNode *folderNode)
{
if (QmakeProFileNode *pro = dynamic_cast<QmakeProFileNode *>(folderNode))
m_proFiles.append(pro);
}
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/