aboutsummaryrefslogtreecommitdiff
path: root/lib/events/stateevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/stateevent.h')
-rw-r--r--lib/events/stateevent.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/events/stateevent.h b/lib/events/stateevent.h
index 911972f2..ffbce76e 100644
--- a/lib/events/stateevent.h
+++ b/lib/events/stateevent.h
@@ -24,7 +24,6 @@ public:
//! constructors and calls in, e.g., RoomStateView don't include it.
static constexpr auto needsStateKey = false;
- explicit StateEventBase(const QJsonObject& json);
explicit StateEventBase(Type type, const QString& stateKey = {},
const QJsonObject& contentJson = {});
@@ -39,9 +38,11 @@ public:
}
QString replacedState() const;
- void dumpTo(QDebug dbg) const override;
-
virtual bool repeatsState() const;
+
+protected:
+ explicit StateEventBase(const QJsonObject& json);
+ void dumpTo(QDebug dbg) const override;
};
using StateEventPtr = event_ptr_tt<StateEventBase>;
using StateEvents = EventsArray<StateEventBase>;
@@ -129,13 +130,15 @@ private:
using base_type = EventTemplate<EventT, StateEventBase, ContentT>;
public:
- explicit KeylessStateEventBase(const QJsonObject& fullJson)
- : base_type(fullJson)
- {}
template <typename... ContentParamTs>
explicit KeylessStateEventBase(ContentParamTs&&... contentParams)
: base_type(QString(), std::forward<ContentParamTs>(contentParams)...)
{}
+
+protected:
+ explicit KeylessStateEventBase(const QJsonObject& fullJson)
+ : base_type(fullJson)
+ {}
};
template <typename EvT>