diff options
author | Knut Petter Svendsen <knutpett@pvv.org> | 2013-11-07 12:31:22 +0100 |
---|---|---|
committer | Knut Petter Svendsen <knutpett@pvv.org> | 2013-11-13 15:31:31 +0100 |
commit | 16b4c2e0327ce102fac26ac3da47884618a3cf0b (patch) | |
tree | 6949bfad04aca29fb10d499e3097bbbac1e0cbd8 /src/plugins/coreplugin/editormanager/editormanager.cpp | |
parent | 4c0d07a9aace583cd6d97114d7de1d279339bf0e (diff) | |
download | qt-creator-16b4c2e0327ce102fac26ac3da47884618a3cf0b.tar.gz |
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>
Diffstat (limited to 'src/plugins/coreplugin/editormanager/editormanager.cpp')
-rw-r--r-- | src/plugins/coreplugin/editormanager/editormanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 0fd0ac8874..2376a25d7e 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1896,7 +1896,7 @@ void EditorManager::vcsOpenCurrentEditor() const QString directory = QFileInfo(document->filePath()).absolutePath(); IVersionControl *versionControl = VcsManager::findVersionControlForDirectory(directory); - if (!versionControl || versionControl->openSupportMode() == IVersionControl::NoOpen) + if (!versionControl || versionControl->openSupportMode(document->filePath()) == IVersionControl::NoOpen) return; if (!versionControl->vcsOpen(document->filePath())) { @@ -1958,7 +1958,7 @@ void EditorManager::updateMakeWritableWarning() bool promptVCS = false; const QString directory = QFileInfo(document->filePath()).absolutePath(); IVersionControl *versionControl = VcsManager::findVersionControlForDirectory(directory); - if (versionControl && versionControl->openSupportMode() != IVersionControl::NoOpen) { + if (versionControl && versionControl->openSupportMode(document->filePath()) != IVersionControl::NoOpen) { if (versionControl->settingsFlags() & IVersionControl::AutoOpen) { vcsOpenCurrentEditor(); ww = false; |