forked from qt-creator/qt-creator
Remove usages of Core::Id
It moved to Utils. Change-Id: Ia4d12bb07db2d59b1cb084b2ebdea20e6e3b40ad Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -88,7 +88,7 @@ FolderNode::AddNewInformation QbsGroupNode::addNewInformation(const QStringList
|
||||
return info;
|
||||
}
|
||||
|
||||
QVariant QbsGroupNode::data(Core::Id role) const
|
||||
QVariant QbsGroupNode::data(Id role) const
|
||||
{
|
||||
if (role == ProjectExplorer::Constants::QT_KEYWORDS_ENABLED) {
|
||||
QJsonObject modProps = m_groupData.value("module-properties").toObject();
|
||||
@@ -151,7 +151,7 @@ QString QbsProductNode::getBuildKey(const QJsonObject &product)
|
||||
+ product.value("multiplex-configuration-id").toString();
|
||||
}
|
||||
|
||||
QVariant QbsProductNode::data(Core::Id role) const
|
||||
QVariant QbsProductNode::data(Id role) const
|
||||
{
|
||||
if (role == Android::Constants::AndroidDeploySettingsFile) {
|
||||
for (const auto &a : m_productData.value("generated-artifacts").toArray()) {
|
||||
|
||||
@@ -399,23 +399,21 @@ void QbsProjectManagerPlugin::buildFile()
|
||||
|
||||
void QbsProjectManagerPlugin::buildProductContextMenu()
|
||||
{
|
||||
runStepsForProductContextMenu({Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)});
|
||||
runStepsForProductContextMenu({Utils::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)});
|
||||
}
|
||||
|
||||
void QbsProjectManagerPlugin::cleanProductContextMenu()
|
||||
{
|
||||
runStepsForProductContextMenu({Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)});
|
||||
runStepsForProductContextMenu({Utils::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)});
|
||||
}
|
||||
|
||||
void QbsProjectManagerPlugin::rebuildProductContextMenu()
|
||||
{
|
||||
runStepsForProductContextMenu({
|
||||
Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN),
|
||||
Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)
|
||||
});
|
||||
runStepsForProductContextMenu({Utils::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN),
|
||||
Utils::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)});
|
||||
}
|
||||
|
||||
void QbsProjectManagerPlugin::runStepsForProductContextMenu(const QList<Core::Id> &stepTypes)
|
||||
void QbsProjectManagerPlugin::runStepsForProductContextMenu(const QList<Utils::Id> &stepTypes)
|
||||
{
|
||||
const Node *node = ProjectTree::currentNode();
|
||||
QTC_ASSERT(node, return);
|
||||
@@ -431,23 +429,23 @@ void QbsProjectManagerPlugin::runStepsForProductContextMenu(const QList<Core::Id
|
||||
|
||||
void QbsProjectManagerPlugin::buildProduct()
|
||||
{
|
||||
runStepsForProduct({Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)});
|
||||
runStepsForProduct({Utils::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)});
|
||||
}
|
||||
|
||||
void QbsProjectManagerPlugin::cleanProduct()
|
||||
{
|
||||
runStepsForProduct({Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)});
|
||||
runStepsForProduct({Utils::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)});
|
||||
}
|
||||
|
||||
void QbsProjectManagerPlugin::rebuildProduct()
|
||||
{
|
||||
runStepsForProduct({
|
||||
Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN),
|
||||
Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD),
|
||||
Utils::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN),
|
||||
Utils::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD),
|
||||
});
|
||||
}
|
||||
|
||||
void QbsProjectManagerPlugin::runStepsForProduct(const QList<Core::Id> &stepTypes)
|
||||
void QbsProjectManagerPlugin::runStepsForProduct(const QList<Utils::Id> &stepTypes)
|
||||
{
|
||||
Node *node = currentEditorNode();
|
||||
if (!node)
|
||||
@@ -464,23 +462,21 @@ void QbsProjectManagerPlugin::runStepsForProduct(const QList<Core::Id> &stepType
|
||||
|
||||
void QbsProjectManagerPlugin::buildSubprojectContextMenu()
|
||||
{
|
||||
runStepsForSubprojectContextMenu({Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)});
|
||||
runStepsForSubprojectContextMenu({Utils::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)});
|
||||
}
|
||||
|
||||
void QbsProjectManagerPlugin::cleanSubprojectContextMenu()
|
||||
{
|
||||
runStepsForSubprojectContextMenu({Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)});
|
||||
runStepsForSubprojectContextMenu({Utils::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)});
|
||||
}
|
||||
|
||||
void QbsProjectManagerPlugin::rebuildSubprojectContextMenu()
|
||||
{
|
||||
runStepsForSubprojectContextMenu({
|
||||
Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN),
|
||||
Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)
|
||||
});
|
||||
runStepsForSubprojectContextMenu({Utils::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN),
|
||||
Utils::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)});
|
||||
}
|
||||
|
||||
void QbsProjectManagerPlugin::runStepsForSubprojectContextMenu(const QList<Core::Id> &stepTypes)
|
||||
void QbsProjectManagerPlugin::runStepsForSubprojectContextMenu(const QList<Utils::Id> &stepTypes)
|
||||
{
|
||||
const Node *node = ProjectTree::currentNode();
|
||||
QTC_ASSERT(node, return);
|
||||
@@ -529,7 +525,8 @@ void QbsProjectManagerPlugin::buildSingleFile(QbsProject *project, const QString
|
||||
}
|
||||
|
||||
void QbsProjectManagerPlugin::runStepsForProducts(QbsProject *project,
|
||||
const QStringList &products, const QList<Core::Id> &stepTypes)
|
||||
const QStringList &products,
|
||||
const QList<Utils::Id> &stepTypes)
|
||||
{
|
||||
QTC_ASSERT(project, return);
|
||||
QTC_ASSERT(!products.isEmpty(), return);
|
||||
@@ -549,7 +546,7 @@ void QbsProjectManagerPlugin::runStepsForProducts(QbsProject *project,
|
||||
bc->setChangedFiles(QStringList());
|
||||
bc->setProducts(products);
|
||||
QList<ProjectExplorer::BuildStepList *> stepLists;
|
||||
for (const Core::Id &stepType : stepTypes) {
|
||||
for (const Utils::Id &stepType : stepTypes) {
|
||||
if (stepType == ProjectExplorer::Constants::BUILDSTEPS_BUILD)
|
||||
stepLists << bc->buildSteps();
|
||||
else if (stepType == ProjectExplorer::Constants::BUILDSTEPS_CLEAN)
|
||||
@@ -592,8 +589,8 @@ void QbsProjectManagerPlugin::reparseProject(QbsProject *project)
|
||||
|
||||
void QbsProjectManagerPlugin::buildNamedProduct(QbsProject *project, const QString &product)
|
||||
{
|
||||
QbsProjectManagerPlugin::runStepsForProducts(project, QStringList(product),
|
||||
{Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)});
|
||||
QbsProjectManagerPlugin::runStepsForProducts(
|
||||
project, QStringList(product), {Utils::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)});
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/id.h>
|
||||
#include <extensionsystem/iplugin.h>
|
||||
#include <utils/id.h>
|
||||
#include <utils/parameteraction.h>
|
||||
|
||||
namespace ProjectExplorer { class Target; }
|
||||
@@ -58,15 +58,15 @@ private:
|
||||
void buildProductContextMenu();
|
||||
void cleanProductContextMenu();
|
||||
void rebuildProductContextMenu();
|
||||
void runStepsForProductContextMenu(const QList<Core::Id> &stepTypes);
|
||||
void runStepsForProductContextMenu(const QList<Utils::Id> &stepTypes);
|
||||
void buildProduct();
|
||||
void cleanProduct();
|
||||
void rebuildProduct();
|
||||
void runStepsForProduct(const QList<Core::Id> &stepTypes);
|
||||
void runStepsForProduct(const QList<Utils::Id> &stepTypes);
|
||||
void buildSubprojectContextMenu();
|
||||
void cleanSubprojectContextMenu();
|
||||
void rebuildSubprojectContextMenu();
|
||||
void runStepsForSubprojectContextMenu(const QList<Core::Id> &stepTypes);
|
||||
void runStepsForSubprojectContextMenu(const QList<Utils::Id> &stepTypes);
|
||||
|
||||
void reparseSelectedProject();
|
||||
void reparseCurrentProject();
|
||||
@@ -80,8 +80,9 @@ private:
|
||||
const QStringList &activeFileTags);
|
||||
void buildSingleFile(QbsProject *project, const QString &file);
|
||||
|
||||
static void runStepsForProducts(QbsProject *project, const QStringList &products,
|
||||
const QList<Core::Id> &stepTypes);
|
||||
static void runStepsForProducts(QbsProject *project,
|
||||
const QStringList &products,
|
||||
const QList<Utils::Id> &stepTypes);
|
||||
|
||||
QbsProjectManagerPluginPrivate *d = nullptr;
|
||||
QAction *m_reparseQbs = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user