feat: add PersistentProperties

This commit is contained in:
outfoxxed 2024-02-17 04:24:03 -08:00
parent ed62193978
commit 083fff57be
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
5 changed files with 86 additions and 1 deletions

View file

@ -52,7 +52,9 @@ class Reloadable: public QObject, public QQmlParserStatus {
public:
explicit Reloadable(QObject* parent = nullptr): QObject(parent) {}
/// called unconditionally in the reload phase, with nullptr if no source could be determined
// Called unconditionally in the reload phase, with nullptr if no source could be determined.
// If non null the old instance may or may not be of the same type, and should be checked
// by `onReload`.
virtual void onReload(QObject* oldInstance) = 0;
// TODO: onReload runs after initialization for reloadable objects created late