Expose availability from the backend to C++ and QML.
The availabilityError property was static based on the service, but it can change at run time, so add the plumbing to allow the backend to report it itself. Also make sure that both QML and C++ expose the availability. The radio tuner and data controls previously had properties (but no signals) for availability - these have been removed. Change-Id: I9240cf93e2a51b14cd38642f9312ae3c75f05361 Reviewed-by: Ling Hu <ling.hu@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
d1b6bf5fac
commit
2a8463711c
@@ -133,29 +133,16 @@ QRadioData::~QRadioData()
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns true if the radio data service is ready to use.
|
||||
*/
|
||||
bool QRadioData::isAvailable() const
|
||||
{
|
||||
Q_D(const QRadioData);
|
||||
|
||||
if (d->control != 0)
|
||||
return d_func()->control->isAvailable();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the availability error state.
|
||||
Returns the availability of the radio data service.
|
||||
*/
|
||||
QtMultimedia::AvailabilityError QRadioData::availabilityError() const
|
||||
{
|
||||
Q_D(const QRadioData);
|
||||
|
||||
if (d->control != 0)
|
||||
return d_func()->control->availabilityError();
|
||||
else
|
||||
if (d->control == 0)
|
||||
return QtMultimedia::ServiceMissingError;
|
||||
|
||||
return QMediaObject::availabilityError();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user