diff options
-rw-r--r-- | framework/src/domain/controller.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/framework/src/domain/controller.cpp b/framework/src/domain/controller.cpp index 21dbb69a..515cfab0 100644 --- a/framework/src/domain/controller.cpp +++ b/framework/src/domain/controller.cpp | |||
@@ -46,9 +46,8 @@ void ControllerAction::execute() | |||
46 | void Controller::clear() | 46 | void Controller::clear() |
47 | { | 47 | { |
48 | auto meta = metaObject(); | 48 | auto meta = metaObject(); |
49 | //FIXME meta->propertyOffset() changes as soon as we add a property from QML. We know that QObject has an offset of 1. | 49 | //We want to get the offset for this class, but clear the properties of all subclasses (thus staticMetaObject for the offset) |
50 | auto offset = 1; | 50 | for (auto i = staticMetaObject.propertyOffset(); i < meta->propertyCount(); i++) { |
51 | for (auto i = offset; i < meta->propertyCount(); i++) { | ||
52 | auto property = meta->property(i); | 51 | auto property = meta->property(i); |
53 | setProperty(property.name(), QVariant()); | 52 | setProperty(property.name(), QVariant()); |
54 | } | 53 | } |