Added RDS functionality to the QRadioTuner/QDeclarativeRadio
Change-Id: I865e3caba82977002cf1f01f1d64ee0a42de77c6 Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
cbb21e30d5
commit
6aea1a22ee
@@ -186,6 +186,10 @@ void tst_QRadioTuner::testNullControl()
|
||||
QCOMPARE(radio.isSearching(), false);
|
||||
QCOMPARE(spy.count(), 0);
|
||||
|
||||
radio.searchAllStations();
|
||||
QCOMPARE(radio.isSearching(), false);
|
||||
QCOMPARE(spy.count(), 0);
|
||||
|
||||
radio.cancelSearch();
|
||||
QCOMPARE(radio.isSearching(), false);
|
||||
QCOMPARE(spy.count(), 0);
|
||||
@@ -281,6 +285,19 @@ void tst_QRadioTuner::testStereo()
|
||||
QVERIFY(radio->stereoMode() == QRadioTuner::ForceMono);
|
||||
}
|
||||
|
||||
void tst_QRadioTuner::testSearchAllStations()
|
||||
{
|
||||
QSignalSpy foundSpy(radio, SIGNAL(stationFound(int,QString)));
|
||||
QSignalSpy completeSpy(radio, SIGNAL(searchingChanged(bool)));
|
||||
radio->searchAllStations(QRadioTuner::SearchGetStationId);
|
||||
QTestEventLoop::instance().enterLoop(1);
|
||||
QCOMPARE(radio->frequency(), 103100000 );
|
||||
QCOMPARE(foundSpy.count(), 3);
|
||||
QVERIFY(qvariant_cast<int>(foundSpy.at(2).at(0)) == 103100000 );
|
||||
QVERIFY(qvariant_cast<QString>(foundSpy.at(2).at(1)) == QString("MockProgramPI3") );
|
||||
QCOMPARE(completeSpy.count(), 2);
|
||||
}
|
||||
|
||||
// QRadioTuner's errorsignal
|
||||
void tst_QRadioTuner::errorSignal()
|
||||
{
|
||||
|
||||
@@ -75,6 +75,7 @@ private slots:
|
||||
void testVolume();
|
||||
void testSignal();
|
||||
void testStereo();
|
||||
void testSearchAllStations();
|
||||
void errorSignal();
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user