forked from qt-creator/qt-creator
Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -217,7 +217,7 @@ int VcsBaseClientImpl::vcsTimeoutS() const
|
||||
return m_clientSettings->vcsTimeoutS();
|
||||
}
|
||||
|
||||
VcsBaseEditorWidget *VcsBaseClientImpl::createVcsEditor(Core::Id kind, QString title,
|
||||
VcsBaseEditorWidget *VcsBaseClientImpl::createVcsEditor(Utils::Id kind, QString title,
|
||||
const QString &source, QTextCodec *codec,
|
||||
const char *registerDynamicProperty,
|
||||
const QString &dynamicPropertyValue) const
|
||||
@@ -352,7 +352,7 @@ VcsBaseEditorWidget *VcsBaseClient::annotate(
|
||||
const QString vcsCmdString = vcsCommandString(AnnotateCommand);
|
||||
QStringList args;
|
||||
args << vcsCmdString << revisionSpec(revision) << extraOptions << file;
|
||||
const Core::Id kind = vcsEditorKind(AnnotateCommand);
|
||||
const Utils::Id kind = vcsEditorKind(AnnotateCommand);
|
||||
const QString id = VcsBaseEditor::getSource(workingDir, QStringList(file));
|
||||
const QString title = vcsEditorTitle(vcsCmdString, id);
|
||||
const QString source = VcsBaseEditor::getSource(workingDir, file);
|
||||
@@ -371,7 +371,7 @@ void VcsBaseClient::diff(const QString &workingDir, const QStringList &files,
|
||||
const QStringList &extraOptions)
|
||||
{
|
||||
const QString vcsCmdString = vcsCommandString(DiffCommand);
|
||||
const Core::Id kind = vcsEditorKind(DiffCommand);
|
||||
const Utils::Id kind = vcsEditorKind(DiffCommand);
|
||||
const QString id = VcsBaseEditor::getTitleId(workingDir, files);
|
||||
const QString title = vcsEditorTitle(vcsCmdString, id);
|
||||
const QString source = VcsBaseEditor::getSource(workingDir, files);
|
||||
@@ -413,7 +413,7 @@ void VcsBaseClient::log(const QString &workingDir, const QStringList &files,
|
||||
bool enableAnnotationContextMenu)
|
||||
{
|
||||
const QString vcsCmdString = vcsCommandString(LogCommand);
|
||||
const Core::Id kind = vcsEditorKind(LogCommand);
|
||||
const Utils::Id kind = vcsEditorKind(LogCommand);
|
||||
const QString id = VcsBaseEditor::getTitleId(workingDir, files);
|
||||
const QString title = vcsEditorTitle(vcsCmdString, id);
|
||||
const QString source = VcsBaseEditor::getSource(workingDir, files);
|
||||
@@ -543,7 +543,7 @@ void VcsBaseClient::view(const QString &source, const QString &id,
|
||||
{
|
||||
QStringList args;
|
||||
args << extraOptions << revisionSpec(id);
|
||||
const Core::Id kind = vcsEditorKind(DiffCommand);
|
||||
const Utils::Id kind = vcsEditorKind(DiffCommand);
|
||||
const QString title = vcsEditorTitle(vcsCommandString(LogCommand), id);
|
||||
|
||||
VcsBaseEditorWidget *editor = createVcsEditor(kind, title, source,
|
||||
|
||||
@@ -27,9 +27,8 @@
|
||||
|
||||
#include "vcsbase_global.h"
|
||||
|
||||
#include <coreplugin/id.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/id.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
|
||||
#include <QObject>
|
||||
@@ -71,7 +70,7 @@ public:
|
||||
VcsWindowOutputBind
|
||||
};
|
||||
|
||||
VcsBaseEditorWidget *createVcsEditor(Core::Id kind, QString title,
|
||||
VcsBaseEditorWidget *createVcsEditor(Utils::Id kind, QString title,
|
||||
const QString &source, QTextCodec *codec,
|
||||
const char *registerDynamicProperty,
|
||||
const QString &dynamicPropertyValue) const;
|
||||
@@ -221,7 +220,7 @@ public:
|
||||
};
|
||||
protected:
|
||||
virtual QString vcsCommandString(VcsCommandTag cmd) const;
|
||||
virtual Core::Id vcsEditorKind(VcsCommandTag cmd) const = 0;
|
||||
virtual Utils::Id vcsEditorKind(VcsCommandTag cmd) const = 0;
|
||||
virtual Utils::ExitCodeInterpreter exitCodeInterpreter(VcsCommandTag cmd) const;
|
||||
|
||||
virtual QStringList revisionSpec(const QString &/*revision*/) const { return {}; }
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
#include <coreplugin/documentmanager.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/id.h>
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <projectexplorer/projecttree.h>
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include "vcscommandpage.h"
|
||||
|
||||
#include <coreplugin/id.h>
|
||||
#include <coreplugin/iversioncontrol.h>
|
||||
#include <coreplugin/shellcommand.h>
|
||||
#include <coreplugin/vcsmanager.h>
|
||||
|
||||
@@ -43,9 +43,9 @@ class VcsCommandPageFactory : public ProjectExplorer::JsonWizardPageFactory
|
||||
public:
|
||||
VcsCommandPageFactory();
|
||||
|
||||
Utils::WizardPage *create(ProjectExplorer::JsonWizard *wizard, Core::Id typeId,
|
||||
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;
|
||||
};
|
||||
|
||||
class VcsCommandPage : public Utils::ShellCommandPage
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
|
||||
using namespace Core;
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace VcsBase {
|
||||
namespace Internal {
|
||||
|
||||
@@ -43,9 +43,9 @@ class VcsConfigurationPageFactory : public ProjectExplorer::JsonWizardPageFactor
|
||||
public:
|
||||
VcsConfigurationPageFactory();
|
||||
|
||||
Utils::WizardPage *create(ProjectExplorer::JsonWizard *wizard, Core::Id typeId,
|
||||
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;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <coreplugin/vcsmanager.h>
|
||||
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
|
||||
namespace VcsBase {
|
||||
namespace Internal {
|
||||
|
||||
Reference in New Issue
Block a user