Perforce: Update document permissions after p4 edit

Task-number: QTCREATORBUG-22447
Change-Id: I9d521c17409e082b66141ba607fc0256d78798b7
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2021-10-13 10:53:41 +03:00
committed by Orgad Shaneh
parent 336cee445e
commit d76c9bec06

View File

@@ -36,6 +36,7 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/documentmodel.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/icore.h>
@@ -1043,7 +1044,12 @@ bool PerforcePluginPrivate::vcsOpen(const FilePath &workingDir, const QString &f
flags |= SilentStdOut;
}
const PerforceResponse result = runP4Cmd(workingDir, args, flags);
return !result.error;
if (result.error)
return false;
const FilePath absPath = workingDir.resolvePath(fileName);
if (DocumentModel::Entry *e = DocumentModel::entryForFilePath(absPath))
e->document->checkPermissions();
return true;
}
bool PerforcePluginPrivate::vcsAdd(const FilePath &workingDir, const QString &fileName)