From d76c9bec062357c4f1c6ad38df3b30693746111e Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 13 Oct 2021 10:53:41 +0300 Subject: [PATCH] Perforce: Update document permissions after p4 edit Task-number: QTCREATORBUG-22447 Change-Id: I9d521c17409e082b66141ba607fc0256d78798b7 Reviewed-by: hjk --- src/plugins/perforce/perforceplugin.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index be00bbf30cd..16dd6739593 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -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)