examples/: fix compiler warnings -Wdeprecated-enum-float-conversion
This is with GCC. Change-Id: I52dcb6881f36c740129b699db7db9241a4e75da1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
339323b999
commit
ad6fd04609
@ -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;
|
||||
|
@ -15,7 +15,7 @@ void Subscription::calculatePrice()
|
||||
{
|
||||
const auto oldPrice = m_price;
|
||||
|
||||
m_price = qRound(calculateDiscount() * m_duration * basePrice());
|
||||
m_price = qRound(calculateDiscount() * int(m_duration) * basePrice());
|
||||
if (m_price != oldPrice)
|
||||
emit priceChanged();
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ private:
|
||||
bool restart = false;
|
||||
bool abort = false;
|
||||
|
||||
enum { ColormapSize = 512 };
|
||||
static constexpr int ColormapSize = 512;
|
||||
uint colormap[ColormapSize];
|
||||
};
|
||||
//! [0]
|
||||
|
Loading…
Reference in New Issue
Block a user