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:
@@ -26,7 +26,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "icontext.h"
|
||||
#include "id.h"
|
||||
|
||||
#include <utils/id.h>
|
||||
|
||||
#include <QIcon>
|
||||
#include <QMenu>
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "core_global.h"
|
||||
|
||||
#include "id.h"
|
||||
#include <utils/id.h>
|
||||
|
||||
#include <QWidget>
|
||||
#include <QObject>
|
||||
|
@@ -39,7 +39,6 @@
|
||||
#include "vcsmanager.h"
|
||||
#include "versiondialog.h"
|
||||
#include "statusbarmanager.h"
|
||||
#include "id.h"
|
||||
#include "manhattanstyle.h"
|
||||
#include "navigationwidget.h"
|
||||
#include "rightpane.h"
|
||||
|
@@ -28,9 +28,9 @@
|
||||
|
||||
#include "inavigationwidgetfactory.h"
|
||||
#include "actionmanager/command.h"
|
||||
#include "id.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <utils/styledbar.h>
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
|
@@ -31,7 +31,6 @@
|
||||
#include "modemanager.h"
|
||||
#include "actionmanager/actionmanager.h"
|
||||
#include "actionmanager/command.h"
|
||||
#include "id.h"
|
||||
#include "imode.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
@@ -26,7 +26,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "core_global.h"
|
||||
#include "id.h"
|
||||
|
||||
#include <utils/id.h>
|
||||
|
||||
#include <QWidget>
|
||||
#include <QPointer>
|
||||
|
@@ -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;
|
||||
|
@@ -175,7 +175,8 @@ void CrumbleBar::onCrumblePathElementClicked(const QVariant &data)
|
||||
crumblePath()->popElement();
|
||||
nextFileIsCalledInternally();
|
||||
Core::EditorManager::openEditor(clickedCrumbleBarInfo.fileName.toString(),
|
||||
Core::Id(), Core::EditorManager::DoNotMakeVisible);
|
||||
Utils::Id(),
|
||||
Core::EditorManager::DoNotMakeVisible);
|
||||
if (clickedCrumbleBarInfo.modelNode.isValid()) {
|
||||
currentDesignDocument()->changeToSubComponent(clickedCrumbleBarInfo.modelNode);
|
||||
QmlDesignerPlugin::instance()->viewManager().setComponentNode(clickedCrumbleBarInfo.modelNode);
|
||||
|
@@ -27,13 +27,13 @@
|
||||
|
||||
#include "qprocessuniqueptr.h"
|
||||
|
||||
#include <utils/id.h>
|
||||
|
||||
#include <QString>
|
||||
#include <QProcessEnvironment>
|
||||
|
||||
#include <designersettings.h>
|
||||
|
||||
#include <coreplugin/id.h>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
class Target;
|
||||
} // namespace ProjectExplorer
|
||||
|
@@ -295,7 +295,7 @@ void DesignModeWidget::setup()
|
||||
|
||||
// Create a DockWidget for each QWidget and add them to the DockManager
|
||||
const Core::Context designContext(Core::Constants::C_DESIGN_MODE);
|
||||
static const Core::Id actionToggle("QmlDesigner.Toggle");
|
||||
static const Utils::Id actionToggle("QmlDesigner.Toggle");
|
||||
|
||||
// First get all navigation views
|
||||
QList<Core::INavigationWidgetFactory *> factories = Core::INavigationWidgetFactory::allNavigationFactories();
|
||||
@@ -426,15 +426,16 @@ void DesignModeWidget::setup()
|
||||
|
||||
m_dockManager->initialize();
|
||||
|
||||
connect(Core::ModeManager::instance(), &Core::ModeManager::currentModeChanged,
|
||||
this, [this](Core::Id mode, Core::Id oldMode) {
|
||||
connect(Core::ModeManager::instance(),
|
||||
&Core::ModeManager::currentModeChanged,
|
||||
this,
|
||||
[this](Utils::Id mode, Utils::Id oldMode) {
|
||||
if (mode == Core::Constants::MODE_DESIGN) {
|
||||
m_dockManager->reloadActiveWorkspace();
|
||||
m_dockManager->setModeChangeState(false);
|
||||
}
|
||||
|
||||
if (oldMode == Core::Constants::MODE_DESIGN
|
||||
&& mode != Core::Constants::MODE_DESIGN) {
|
||||
if (oldMode == Core::Constants::MODE_DESIGN && mode != Core::Constants::MODE_DESIGN) {
|
||||
m_dockManager->save();
|
||||
m_dockManager->setModeChangeState(true);
|
||||
for (auto floatingWidget : m_dockManager->floatingWidgets())
|
||||
@@ -526,7 +527,8 @@ void DesignModeWidget::toolBarOnGoBackClicked()
|
||||
--m_navigatorHistoryCounter;
|
||||
m_keepNavigatorHistory = true;
|
||||
Core::EditorManager::openEditor(m_navigatorHistory.at(m_navigatorHistoryCounter),
|
||||
Core::Id(), Core::EditorManager::DoNotMakeVisible);
|
||||
Utils::Id(),
|
||||
Core::EditorManager::DoNotMakeVisible);
|
||||
m_keepNavigatorHistory = false;
|
||||
}
|
||||
}
|
||||
@@ -537,7 +539,8 @@ void DesignModeWidget::toolBarOnGoForwardClicked()
|
||||
++m_navigatorHistoryCounter;
|
||||
m_keepNavigatorHistory = true;
|
||||
Core::EditorManager::openEditor(m_navigatorHistory.at(m_navigatorHistoryCounter),
|
||||
Core::Id(), Core::EditorManager::DoNotMakeVisible);
|
||||
Utils::Id(),
|
||||
Core::EditorManager::DoNotMakeVisible);
|
||||
m_keepNavigatorHistory = false;
|
||||
}
|
||||
}
|
||||
|
@@ -153,12 +153,12 @@ static bool checkIfEditorIsQtQuick(Core::IEditor *editor)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool isDesignerMode(Core::Id mode)
|
||||
static bool isDesignerMode(Utils::Id mode)
|
||||
{
|
||||
return mode == Core::Constants::MODE_DESIGN;
|
||||
}
|
||||
|
||||
static bool documentIsAlreadyOpen(DesignDocument *designDocument, Core::IEditor *editor, Core::Id newMode)
|
||||
static bool documentIsAlreadyOpen(DesignDocument *designDocument, Core::IEditor *editor, Utils::Id newMode)
|
||||
{
|
||||
return designDocument
|
||||
&& editor == designDocument->editor()
|
||||
@@ -334,17 +334,16 @@ void QmlDesignerPlugin::integrateIntoQtCreator(QWidget *modeWidget)
|
||||
}
|
||||
});
|
||||
|
||||
connect(Core::ModeManager::instance(), &Core::ModeManager::currentModeChanged,
|
||||
[this] (Core::Id newMode, Core::Id oldMode) {
|
||||
|
||||
connect(Core::ModeManager::instance(),
|
||||
&Core::ModeManager::currentModeChanged,
|
||||
[this](Utils::Id newMode, Utils::Id oldMode) {
|
||||
Core::IEditor *currentEditor = Core::EditorManager::currentEditor();
|
||||
if (d && currentEditor && checkIfEditorIsQtQuick(currentEditor) &&
|
||||
!documentIsAlreadyOpen(currentDesignDocument(), currentEditor, newMode)) {
|
||||
|
||||
if (d && currentEditor && checkIfEditorIsQtQuick(currentEditor)
|
||||
&& !documentIsAlreadyOpen(currentDesignDocument(), currentEditor, newMode)) {
|
||||
if (isDesignerMode(newMode)) {
|
||||
showDesigner();
|
||||
} else if (currentDesignDocument() ||
|
||||
(!isDesignerMode(newMode) && isDesignerMode(oldMode))) {
|
||||
} else if (currentDesignDocument()
|
||||
|| (!isDesignerMode(newMode) && isDesignerMode(oldMode))) {
|
||||
hideDesigner();
|
||||
}
|
||||
}
|
||||
|
@@ -28,8 +28,8 @@
|
||||
#include <projectexplorer/abi.h>
|
||||
#include <projectexplorer/headerpath.h>
|
||||
#include <projectexplorer/projectmacro.h>
|
||||
#include <coreplugin/id.h>
|
||||
#include <utils/cpplanguage_details.h>
|
||||
#include <utils/id.h>
|
||||
|
||||
#include <functional>
|
||||
|
||||
@@ -41,7 +41,7 @@ class ToolChain
|
||||
{
|
||||
public:
|
||||
ToolChain() = default;
|
||||
Core::Id typeId() const { return Core::Id(); }
|
||||
Utils::Id typeId() const { return Utils::Id(); }
|
||||
|
||||
Abi targetAbi() const { return Abi(); }
|
||||
|
||||
|
Reference in New Issue
Block a user