VCS/Diff editors: Set readonly attributes correctly.

Make VCS-generated editors read-only, enable editing
when opening a patch.
Make VCS-Editor non-read-only by default, add setter
for "Forced read-only" that makes it a temporary,
read-only file.

Task-number: QTCREATORBUG-1528
Reviewed-by: Thorbjorn Lindeijer <thorbjorn.lindeijer@nokia.com>
This commit is contained in:
Friedemann Kleint
2010-06-07 14:53:28 +02:00
parent d326c16747
commit c745155191
9 changed files with 61 additions and 9 deletions

View File

@@ -105,6 +105,13 @@ public:
virtual ~VCSBaseEditor();
/* Force read-only: Make it a read-only, temporary file.
* Should be set to true by version control views. It is not on
* by default since it should not trigger when patches are opened as
* files. */
void setForceReadOnly(bool b);
bool isForceReadOnly() const;
QString source() const;
void setSource(const QString &source);