diff --git a/ChangeLog b/ChangeLog index 549b633a..59fe430a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -267,6 +267,7 @@ v2.0.0 what before had to be obtained through `PollData::getAbsoluteTimeout()` call. - `PollData::getRelativeTimeout()` return type was changed to `std::chrono::microseconds`. - `IConnection::processPendingRequest()` was renamed to `IConnection::processPendingEvent()`. + - `Variant` constructor is now explicit. - Systemd of at least v238 is required to compile sdbus-c++ - A proper fix for timeout handling - Fix for external event loops in which the event loop thread ID was not correctly initialized (now fixed and simplified by not needing the thread ID anymore) diff --git a/include/sdbus-c++/Types.h b/include/sdbus-c++/Types.h index 5a8427e9..2ebb1467 100644 --- a/include/sdbus-c++/Types.h +++ b/include/sdbus-c++/Types.h @@ -56,7 +56,7 @@ namespace sdbus { Variant(); template - Variant(const _ValueType& value) + explicit Variant(const _ValueType& value) : Variant() { msg_.openVariant(signature_of<_ValueType>::str()); diff --git a/tests/integrationtests/DBusSignalsTests.cpp b/tests/integrationtests/DBusSignalsTests.cpp index c3575eea..779c2c7f 100644 --- a/tests/integrationtests/DBusSignalsTests.cpp +++ b/tests/integrationtests/DBusSignalsTests.cpp @@ -103,7 +103,6 @@ TYPED_TEST(SdbusTestObject, EmitsSignalWithVariantSuccesfully) { double d = 3.14; this->m_adaptor->emitSignalWithVariant(sdbus::Variant{d}); - this->m_adaptor->emitSignalWithVariant(d); ASSERT_TRUE(waitUntil(this->m_proxy->m_gotSignalWithVariant)); ASSERT_THAT(this->m_proxy->m_variantFromSignal, DoubleEq(d));