diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2023-07-21 19:41:39 +0300 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-08-18 23:35:52 +0300 |
commit | ad6fd04609c94373ace8711f8e10c322b68436b2 (patch) | |
tree | 48a254925308ee9df07e124ada502dab629c28ed /examples/corelib/bindableproperties/bindablesubscription/bindablesubscription.cpp | |
parent | 339323b999feed077adecc0afaa215f8caffc043 (diff) |
examples/: fix compiler warnings -Wdeprecated-enum-float-conversion
This is with GCC.
Change-Id: I52dcb6881f36c740129b699db7db9241a4e75da1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'examples/corelib/bindableproperties/bindablesubscription/bindablesubscription.cpp')
-rw-r--r-- | examples/corelib/bindableproperties/bindablesubscription/bindablesubscription.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/corelib/bindableproperties/bindablesubscription/bindablesubscription.cpp b/examples/corelib/bindableproperties/bindablesubscription/bindablesubscription.cpp index 8b8321859b..32f4194635 100644 --- a/examples/corelib/bindableproperties/bindablesubscription/bindablesubscription.cpp +++ b/examples/corelib/bindableproperties/bindablesubscription/bindablesubscription.cpp @@ -10,7 +10,8 @@ BindableSubscription::BindableSubscription(BindableUser *user) : m_user(user) { Q_ASSERT(user); - m_price.setBinding([this] { return qRound(calculateDiscount() * m_duration * basePrice()); }); + m_price.setBinding( + [this] { return qRound(calculateDiscount() * int(m_duration) * basePrice()); }); m_isValid.setBinding([this] { return m_user->country() != BindableUser::Country::AnyCountry && m_user->age() > 12; |