Core/Utils: Migrate further to Utils::Id

The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2020-06-26 13:59:38 +02:00
parent c9eedbe0f3
commit e1c88116b3
655 changed files with 2115 additions and 2093 deletions

View File

@@ -186,7 +186,7 @@ SharedTools::WidgetHost *FormEditorStack::formWindowEditorForXmlEditor(const Cor
return i != -1 ? m_formEditors.at(i).widgetHost : static_cast<SharedTools::WidgetHost *>(nullptr);
}
void FormEditorStack::modeAboutToChange(Core::Id mode)
void FormEditorStack::modeAboutToChange(Utils::Id mode)
{
if (Designer::Constants::Internal::debug)
qDebug() << "FormEditorStack::modeAboutToChange" << mode.toString();

View File

@@ -27,7 +27,7 @@
#include "editordata.h"
#include <coreplugin/id.h>
#include <utils/id.h>
#include <QStackedWidget>
#include <QList>
@@ -67,7 +67,7 @@ public:
private:
void updateFormWindowSelectionHandles();
void modeAboutToChange(Core::Id mode);
void modeAboutToChange(Utils::Id mode);
void formSizeChanged(int w, int h);
inline int indexOfFormWindow(const QDesignerFormWindowInterface *) const;

View File

@@ -101,6 +101,7 @@ static inline QIcon designerIcon(const QString &iconName)
using namespace Core;
using namespace Designer::Constants;
using namespace Utils;
namespace Designer {
namespace Internal {

View File

@@ -52,7 +52,7 @@ FormPageFactory::FormPageFactory()
setTypeIdsSuffix("Form");
}
Utils::WizardPage *FormPageFactory::create(ProjectExplorer::JsonWizard *wizard, Core::Id typeId,
Utils::WizardPage *FormPageFactory::create(ProjectExplorer::JsonWizard *wizard, Utils::Id typeId,
const QVariant &data)
{
Q_UNUSED(wizard)
@@ -63,7 +63,7 @@ Utils::WizardPage *FormPageFactory::create(ProjectExplorer::JsonWizard *wizard,
return new FormTemplateWizardPage;
}
bool FormPageFactory::validateData(Core::Id typeId, const QVariant &data, QString *errorMessage)
bool FormPageFactory::validateData(Utils::Id typeId, const QVariant &data, QString *errorMessage)
{
QTC_ASSERT(canCreate(typeId), return false);
if (!data.isNull() && (data.type() != QVariant::Map || !data.toMap().isEmpty())) {

View File

@@ -41,9 +41,9 @@ class FormPageFactory : public ProjectExplorer::JsonWizardPageFactory
public:
FormPageFactory();
Utils::WizardPage *create(ProjectExplorer::JsonWizard *wizard, Core::Id typeId, const QVariant &data) override;
Utils::WizardPage *create(ProjectExplorer::JsonWizard *wizard, Utils::Id typeId, const QVariant &data) override;
bool validateData(Core::Id typeId, const QVariant &data, QString *errorMessage) override;
bool validateData(Utils::Id typeId, const QVariant &data, QString *errorMessage) override;
};
// A wizard page embedding Qt Designer's QDesignerNewFormWidgetInterface

View File

@@ -51,7 +51,7 @@ FormWindowFile::FormWindowFile(QDesignerFormWindowInterface *form, QObject *pare
{
setMimeType(Designer::Constants::FORM_MIMETYPE);
setParent(parent);
setId(Core::Id(Designer::Constants::K_DESIGNER_XML_EDITOR_ID));
setId(Utils::Id(Designer::Constants::K_DESIGNER_XML_EDITOR_ID));
// Designer needs UTF-8 regardless of settings.
setCodec(QTextCodec::codecForName("UTF-8"));
connect(m_formWindow->core()->formWindowManager(), &QDesignerFormWindowManagerInterface::formWindowRemoved,

View File

@@ -266,7 +266,7 @@ static Document::Ptr findDefinition(Function *functionDeclaration, int *line)
static inline BaseTextEditor *editorAt(const QString &fileName, int line, int column)
{
return qobject_cast<BaseTextEditor *>(Core::EditorManager::openEditorAt(fileName, line, column,
Core::Id(),
Utils::Id(),
Core::EditorManager::DoNotMakeVisible));
}

View File

@@ -39,7 +39,7 @@ SettingsPage::SettingsPage(QDesignerOptionsPageInterface *designerPage) :
Core::IOptionsPage(nullptr, false),
m_designerPage(designerPage)
{
setId(Core::Id::fromString(m_designerPage->name()));
setId(Utils::Id::fromString(m_designerPage->name()));
setDisplayName(m_designerPage->name());
setCategory(Designer::Constants::SETTINGS_CATEGORY);
}