summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-12-06 09:49:46 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-12-06 09:49:46 +0100
commitdfdbd70864d97d8961e02471f63a0107f41e4921 (patch)
tree9b7f50c75a848a8393ad76a1157d75c6d2c837f7 /framework
parentde670905b25f9af9e65d071025b8997fc0c0d39a (diff)
downloadkube-dfdbd70864d97d8961e02471f63a0107f41e4921.tar.gz
kube-dfdbd70864d97d8961e02471f63a0107f41e4921.zip
Found the proper solution
Diffstat (limited to 'framework')
-rw-r--r--framework/src/domain/controller.cpp5
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()
46void Controller::clear() 46void 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 }