From 0d1208f0f08727c55de9eed8e0ceef092080b927 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 7 Jul 2020 21:34:57 +0200 Subject: Cleanup QPropertyBindingError Remove location(). The method would always return an empty value. If you need the location, the binding itself has it. Remove setDescription() and require that the description gets passed in the constructor. Never create a d pointer if type is NoError, so we can quickly check for it inline. Change-Id: I7eb8a94786281069d6ea2d82567c09aa50c52ef6 Reviewed-by: Fabian Kosmale --- tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp index 96cf6da4bb..50a8d51a46 100644 --- a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp +++ b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp @@ -506,8 +506,7 @@ void tst_QProperty::bindingSourceLocation() void tst_QProperty::bindingError() { QProperty prop = Qt::makePropertyBinding([]() -> std::variant { - QPropertyBindingError error(QPropertyBindingError::UnknownError); - error.setDescription(QLatin1String("my error")); + QPropertyBindingError error(QPropertyBindingError::UnknownError, QLatin1String("my error")); return error; }); QCOMPARE(prop.value(), 0); -- cgit v1.2.3