ClearCase: Minor cleanup

Replace iteration over all documents with a faster lookup.

Change-Id: Iccc20ff2e5a44eef9d0bc925e25ef5c7ebaa98e9
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2021-10-13 11:03:59 +03:00
committed by Orgad Shaneh
parent f58663ce1c
commit a9ef0a8af8

View File

@@ -1826,12 +1826,8 @@ bool ClearCasePluginPrivate::vcsOpen(const FilePath &workingDir, const QString &
setStatus(absPath, FileStatus::CheckedOut);
}
foreach (DocumentModel::Entry *e, DocumentModel::entries()) {
if (e->fileName().toString() == absPath) {
e->document->checkPermissions();
break;
}
}
if (DocumentModel::Entry *e = DocumentModel::entryForFilePath(FilePath::fromString(absPath)))
e->document->checkPermissions();
return !response.error;
}