diff options
Diffstat (limited to 'examples/corelib/bindableproperties/bindablesubscription/bindablesubscription.cpp')
-rw-r--r-- | examples/corelib/bindableproperties/bindablesubscription/bindablesubscription.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/corelib/bindableproperties/bindablesubscription/bindablesubscription.cpp b/examples/corelib/bindableproperties/bindablesubscription/bindablesubscription.cpp index 1b65c87f5f..a52b68f85b 100644 --- a/examples/corelib/bindableproperties/bindablesubscription/bindablesubscription.cpp +++ b/examples/corelib/bindableproperties/bindablesubscription/bindablesubscription.cpp @@ -13,7 +13,7 @@ BindableSubscription::BindableSubscription(BindableUser *user) : m_user(user) m_price.setBinding([this] { return qRound(calculateDiscount() * m_duration * basePrice()); }); m_isValid.setBinding([this] { - return m_user->country() != BindableUser::None && m_user->age() > 12; + return m_user->country() != BindableUser::Country::AnyCountry && m_user->age() > 12; }); } @@ -44,8 +44,8 @@ double BindableSubscription::calculateDiscount() const int BindableSubscription::basePrice() const { - if (m_user->country() == BindableUser::None) + if (m_user->country() == BindableUser::Country::AnyCountry) return 0; - return (m_user->country() == BindableUser::Norway) ? 100 : 80; + return (m_user->country() == BindableUser::Country::Norway) ? 100 : 80; } |