forked from qt-creator/qt-creator
ClearCase: Handle read-only view private files
View private files have state NotManaged. In the corner case where a NotManaged file is read-only they should be made writeable by the ReadOnlyFilesDialog, and not vcsOpen()-ed. Change-Id: Icfeab6bebb76cc01da693b3bfff7b46c45b106b4 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -389,7 +389,7 @@ void ReadOnlyFilesDialog::initDialog(const QStringList &fileNames)
|
||||
IVersionControl *versionControlForFile =
|
||||
VcsManager::findVersionControlForDirectory(directory);
|
||||
const bool fileManagedByVCS = versionControlForFile
|
||||
&& versionControlForFile->openSupportMode() != IVersionControl::NoOpen;
|
||||
&& versionControlForFile->openSupportMode(fileName) != IVersionControl::NoOpen;
|
||||
if (fileManagedByVCS) {
|
||||
const QString vcsOpenTextForFile =
|
||||
versionControlForFile->vcsOpenText().remove(QLatin1Char('&'));
|
||||
@@ -407,7 +407,7 @@ void ReadOnlyFilesDialog::initDialog(const QStringList &fileNames)
|
||||
vcsMakeWritableTextForAll.clear();
|
||||
}
|
||||
// Add make writable if it is supported by the reposetory.
|
||||
if (versionControlForFile->openSupportMode() == IVersionControl::OpenOptional) {
|
||||
if (versionControlForFile->openSupportMode(fileName) == IVersionControl::OpenOptional) {
|
||||
useMakeWritable = true;
|
||||
createRadioButtonForItem(item, radioButtonGroup, MakeWritable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user