summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qproperty.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-20 10:13:49 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-24 19:45:59 +0200
commitc2cf5f824a09adf0362f015c1b9d1817dabb04c3 (patch)
tree54cb2e3bf0bc02d86ccf8f0e8286daaf7092fe59 /src/corelib/kernel/qproperty.h
parentc4245e7b8ceb233a06cea1ace9439795738adbf8 (diff)
Whitespace cleanup in corelib/kernel
Change-Id: If061ef0af5ced4384e20a82afcea3712fa7e45d7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/kernel/qproperty.h')
-rw-r--r--src/corelib/kernel/qproperty.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h
index 21f1d78281..9ee7a1ef3f 100644
--- a/src/corelib/kernel/qproperty.h
+++ b/src/corelib/kernel/qproperty.h
@@ -848,7 +848,8 @@ public:
explicit QObjectBindableProperty(Functor &&f);
#endif
- parameter_type value() const {
+ parameter_type value() const
+ {
qGetBindingStorage(owner())->maybeUpdateBindingAndRegister(this);
return this->val;
}
@@ -875,7 +876,8 @@ public:
return value();
}
- void setValue(parameter_type t) {
+ void setValue(parameter_type t)
+ {
auto *bd = qGetBindingStorage(owner())->bindingData(this);
if (bd)
bd->removeBinding();
@@ -885,7 +887,8 @@ public:
notify(bd);
}
- void setValue(rvalue_ref t) {
+ void setValue(rvalue_ref t)
+ {
auto *bd = qGetBindingStorage(owner())->bindingData(this);
if (bd)
bd->removeBinding();
@@ -936,7 +939,8 @@ public:
QPropertyBinding<T> setBinding(Functor f);
#endif
- bool hasBinding() const {
+ bool hasBinding() const
+ {
auto *bd = qGetBindingStorage(owner())->bindingData(this);
return bd && bd->binding() != nullptr;
}
@@ -1003,13 +1007,15 @@ class QObjectComputedProperty : public QUntypedPropertyData
char *that = const_cast<char *>(reinterpret_cast<const char *>(this));
return reinterpret_cast<Class *>(that - QtPrivate::detail::getOffset(Offset));
}
+
public:
using value_type = T;
using parameter_type = T;
QObjectComputedProperty() = default;
- parameter_type value() const {
+ parameter_type value() const
+ {
qGetBindingStorage(owner())->maybeUpdateBindingAndRegister(this);
return (owner()->*Getter)();
}
@@ -1055,6 +1061,7 @@ public:
auto *storage = const_cast<QBindingStorage *>(qGetBindingStorage(owner()));
return *storage->bindingData(const_cast<QObjectComputedProperty *>(this), true);
}
+
private:
};