Merge lp:~kaijanmaki/dbus-cpp/read-only-properties-changed-fix into lp:dbus-cpp
Proposed by
Antti Kaijanmäki
Status: | Merged |
---|---|
Approved by: | Thomas Voß |
Approved revision: | 57 |
Merged at revision: | 60 |
Proposed branch: | lp:~kaijanmaki/dbus-cpp/read-only-properties-changed-fix |
Merge into: | lp:dbus-cpp |
Diff against target: |
97 lines (+42/-2) 3 files modified
include/core/dbus/impl/property.h (+5/-1) tests/service_test.cpp (+25/-1) tests/test_service.h (+12/-0) |
To merge this branch: | bzr merge lp:~kaijanmaki/dbus-cpp/read-only-properties-changed-fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Thomas Voß (community) | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email: mp+221839@code.launchpad.net |
Commit message
Fix read-only property PropertiesChanged updates.
Description of the change
When we have a read-only property which receives a PropertiesChanged signal, we must use the Super::set() as plain set() will fail on the read-only check.
To post a comment you must log in.
The test-case passes after making the change, but now that the possible exceptions are not silently discarded I'm seeing this during the test run: AddingServiceAn dObjectAndCalli ngIntoItSucceed s :Property< T>::handle_ changed( const core::dbus: :types: :Variant& ) [with PropertyType = test::Service: :Properties: :ReadOnly] : Mismatch between expected and actual type reported by iterator: :Property< T>::handle_ changed( const core::dbus: :types: :Variant& ) [with PropertyType = test::Service: :Properties: :ReadOnly] : Mismatch between expected and actual type reported by iterator:
[ RUN ] Service.
void core::dbus:
Expected: uint32
Actual: invalid
void core::dbus:
Expected: uint32
Actual: invalid
That must be because of the fact that the Variant is consumed by the first caller of Variant::as<>().
But to emphasize: The test passes and everything seems to work properly even though we now get that exception caught.