diff options
Diffstat (limited to 'src/multimedia/radio/qradiotuner.cpp')
-rw-r--r-- | src/multimedia/radio/qradiotuner.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/multimedia/radio/qradiotuner.cpp b/src/multimedia/radio/qradiotuner.cpp index 3206b4ee5..cc9abdbf8 100644 --- a/src/multimedia/radio/qradiotuner.cpp +++ b/src/multimedia/radio/qradiotuner.cpp @@ -88,7 +88,7 @@ Q_CONSTRUCTOR_FUNCTION(qRegisterRadioTunerMetaTypes) class QRadioTunerPrivate : public QMediaObjectPrivate { public: - QRadioTunerPrivate():provider(0), control(0), radioData(0) {} + QRadioTunerPrivate():provider(nullptr), control(nullptr), radioData(nullptr) {} QMediaServiceProvider *provider; QRadioTunerControl* control; QRadioData *radioData; @@ -112,9 +112,9 @@ QRadioTuner::QRadioTuner(QObject *parent): d->provider = QMediaServiceProvider::defaultServiceProvider(); - if (d->service != 0) { + if (d->service != nullptr) { d->control = qobject_cast<QRadioTunerControl*>(d->service->requestControl(QRadioTunerControl_iid)); - if (d->control != 0) { + if (d->control != nullptr) { connect(d->control, SIGNAL(stateChanged(QRadioTuner::State)), SIGNAL(stateChanged(QRadioTuner::State))); connect(d->control, SIGNAL(bandChanged(QRadioTuner::Band)), SIGNAL(bandChanged(QRadioTuner::Band))); connect(d->control, SIGNAL(frequencyChanged(int)), SIGNAL(frequencyChanged(int))); @@ -154,7 +154,7 @@ QRadioTuner::~QRadioTuner() */ QMultimedia::AvailabilityStatus QRadioTuner::availability() const { - if (d_func()->control == 0) + if (d_func()->control == nullptr) return QMultimedia::ServiceMissing; if (!d_func()->control->isAntennaConnected()) @@ -187,7 +187,7 @@ QRadioTuner::Band QRadioTuner::band() const { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) return d->control->band(); return QRadioTuner::FM; @@ -202,7 +202,7 @@ int QRadioTuner::frequency() const { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) return d->control->frequency(); return 0; @@ -217,7 +217,7 @@ int QRadioTuner::frequencyStep(QRadioTuner::Band band) const { Q_D(const QRadioTuner); - if(d->control != 0) + if (d->control != nullptr) return d->control->frequencyStep(band); return 0; @@ -231,7 +231,7 @@ QPair<int,int> QRadioTuner::frequencyRange(QRadioTuner::Band band) const { Q_D(const QRadioTuner); - if(d->control != 0) + if (d->control != nullptr) return d->control->frequencyRange(band); return qMakePair<int,int>(0,0); @@ -246,7 +246,7 @@ bool QRadioTuner::isStereo() const { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) return d->control->isStereo(); return false; @@ -262,7 +262,7 @@ QRadioTuner::StereoMode QRadioTuner::stereoMode() const { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) return d->control->stereoMode(); return QRadioTuner::Auto; @@ -272,7 +272,7 @@ void QRadioTuner::setStereoMode(QRadioTuner::StereoMode mode) { Q_D(QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) return d->control->setStereoMode(mode); } @@ -286,7 +286,7 @@ bool QRadioTuner::isBandSupported(QRadioTuner::Band band) const { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) return d->control->isBandSupported(band); return false; @@ -300,7 +300,7 @@ void QRadioTuner::start() { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) d->control->start(); } @@ -312,7 +312,7 @@ void QRadioTuner::stop() { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) d->control->stop(); } @@ -325,7 +325,7 @@ int QRadioTuner::signalStrength() const { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) return d->control->signalStrength(); return 0; @@ -341,7 +341,7 @@ int QRadioTuner::volume() const { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) return d->control->volume(); return 0; @@ -356,7 +356,7 @@ bool QRadioTuner::isMuted() const { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) return d->control->isMuted(); return false; @@ -372,7 +372,7 @@ void QRadioTuner::setBand(QRadioTuner::Band band) { Q_D(QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) d->control->setBand(band); } @@ -387,7 +387,7 @@ void QRadioTuner::setFrequency(int frequency) { Q_D(QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) d->control->setFrequency(frequency); } @@ -395,7 +395,7 @@ void QRadioTuner::setVolume(int volume) { Q_D(QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) d->control->setVolume(volume); } @@ -403,7 +403,7 @@ void QRadioTuner::setMuted(bool muted) { Q_D(QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) d->control->setMuted(muted); } @@ -418,7 +418,7 @@ bool QRadioTuner::isSearching() const { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) return d->control->isSearching(); return false; @@ -432,7 +432,7 @@ bool QRadioTuner::isAntennaConnected() const { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) return d->control->isAntennaConnected(); return false; @@ -448,7 +448,7 @@ void QRadioTuner::searchForward() { Q_D(QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) d->control->searchForward(); } @@ -462,7 +462,7 @@ void QRadioTuner::searchBackward() { Q_D(QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) d->control->searchBackward(); } @@ -490,7 +490,7 @@ void QRadioTuner::searchAllStations(QRadioTuner::SearchMode searchMode) { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) d->control->searchAllStations(searchMode); } @@ -504,7 +504,7 @@ void QRadioTuner::cancelSearch() { Q_D(QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) d->control->cancelSearch(); } @@ -518,7 +518,7 @@ QRadioTuner::Error QRadioTuner::error() const { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) return d->control->error(); return QRadioTuner::ResourceError; @@ -534,7 +534,7 @@ QString QRadioTuner::errorString() const { Q_D(const QRadioTuner); - if (d->control != 0) + if (d->control != nullptr) return d->control->errorString(); return QString(); |