summaryrefslogtreecommitdiffstats
path: root/src/vsession.h
diff options
context:
space:
mode:
authorSimon Rettberg2024-05-08 18:51:13 +0200
committerSimon Rettberg2024-05-08 18:51:13 +0200
commit4cf1feb0b7b2854c43aaab534a2301eca0c25b4d (patch)
treefd66caef9b5191c264c7b4e81b0f9468dae774e8 /src/vsession.h
parentTurn deprecated-declarations into warning (diff)
downloadvmchooser2-master.tar.gz
vmchooser2-master.tar.xz
vmchooser2-master.zip
Support CoW, and selecting between edit and copyHEADmaster
Diffstat (limited to 'src/vsession.h')
-rw-r--r--src/vsession.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vsession.h b/src/vsession.h
index af01230..2641008 100644
--- a/src/vsession.h
+++ b/src/vsession.h
@@ -25,8 +25,12 @@ class VSession : public Session {
return getAttribute(QStringLiteral("for_location")).toInt() != 0;
}
- bool canEdit() const {
- return getAttribute(QStringLiteral("allow_edit")).toInt() != 0;
+ bool canEdit() const override {
+ return editModeTypes() != 0;
+ }
+
+ int editModeTypes() const override {
+ return getAttribute(QStringLiteral("allow_edit")).toInt();
}
QString virtualizer() const {
@@ -92,7 +96,7 @@ class VSession : public Session {
static QList<Session*> loadFromXmlDocument(const QDomDocument& doc);
protected:
- virtual QString checkCanRunInternal() const;
+ QString checkCanRunInternal() const;
private: