forked from qt-creator/qt-creator
Perforce: Modernize
override, auto, nullptr Change-Id: I82f63fbe06d098e71876c30af0fe247a5bae3a55 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
9dea4c0743
commit
e0520794f5
@@ -40,7 +40,7 @@ class PerforceChecker : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit PerforceChecker(QObject *parent = nullptr);
|
explicit PerforceChecker(QObject *parent = nullptr);
|
||||||
~PerforceChecker();
|
~PerforceChecker() override;
|
||||||
|
|
||||||
void start(const QString &binary,
|
void start(const QString &binary,
|
||||||
const QString &workingDirectory,
|
const QString &workingDirectory,
|
||||||
|
|||||||
@@ -108,8 +108,9 @@ const VcsBaseEditorParameters editorParameters[] = {
|
|||||||
// Utility to find a parameter set by type
|
// Utility to find a parameter set by type
|
||||||
static inline const VcsBaseEditorParameters *findType(int ie)
|
static inline const VcsBaseEditorParameters *findType(int ie)
|
||||||
{
|
{
|
||||||
const EditorContentType et = static_cast<EditorContentType>(ie);
|
return VcsBaseEditor::findType(editorParameters,
|
||||||
return VcsBaseEditor::findType(editorParameters, sizeof(editorParameters)/sizeof(editorParameters[0]), et);
|
sizeof(editorParameters)/sizeof(*editorParameters),
|
||||||
|
static_cast<EditorContentType>(ie));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure adding "..." to relative paths which is p4's convention
|
// Ensure adding "..." to relative paths which is p4's convention
|
||||||
@@ -601,7 +602,7 @@ void PerforcePlugin::startSubmitProject()
|
|||||||
IEditor *PerforcePlugin::openPerforceSubmitEditor(const QString &fileName, const QStringList &depotFileNames)
|
IEditor *PerforcePlugin::openPerforceSubmitEditor(const QString &fileName, const QStringList &depotFileNames)
|
||||||
{
|
{
|
||||||
IEditor *editor = EditorManager::openEditor(fileName, PERFORCE_SUBMIT_EDITOR_ID);
|
IEditor *editor = EditorManager::openEditor(fileName, PERFORCE_SUBMIT_EDITOR_ID);
|
||||||
PerforceSubmitEditor *submitEditor = static_cast<PerforceSubmitEditor*>(editor);
|
auto submitEditor = static_cast<PerforceSubmitEditor*>(editor);
|
||||||
setSubmitEditor(submitEditor);
|
setSubmitEditor(submitEditor);
|
||||||
submitEditor->restrictToProjectFiles(depotFileNames);
|
submitEditor->restrictToProjectFiles(depotFileNames);
|
||||||
connect(submitEditor, &VcsBaseSubmitEditor::diffSelectedFiles,
|
connect(submitEditor, &VcsBaseSubmitEditor::diffSelectedFiles,
|
||||||
|
|||||||
Reference in New Issue
Block a user