radioapp/radiouiengine/src/radiostation.cpp
changeset 47 74b7c6e79031
parent 36 ba22309243a1
child 57 21be958eb3ce
equal deleted inserted replaced
44:0a3ad94fc71c 47:74b7c6e79031
   180  */
   180  */
   181 void RadioStation::setName( const QString& name )
   181 void RadioStation::setName( const QString& name )
   182 {
   182 {
   183     // Name emptiness is checked because this name setter is used by incoming RDS PS name
   183     // Name emptiness is checked because this name setter is used by incoming RDS PS name
   184     // and empty names should be ignored
   184     // and empty names should be ignored
   185     if ( !name.isEmpty() && !mData->isRenamedByUser() && mData->mName.compare( name ) != 0 ) {
   185     if ( !name.isEmpty() && !mData->isRenamedByUser() && mData->mName.compare( name.trimmed() ) != 0 ) {
   186         mData->mName = name.trimmed();
   186         mData->mName = name.trimmed();
   187         mData->mChangeFlags |= RadioStation::PersistentDataChanged | RadioStation::NameChanged;
   187         mData->mChangeFlags |= RadioStation::PersistentDataChanged | RadioStation::NameChanged;
   188         mData->setStationHasSentRds( true );
   188         mData->setStationHasSentRds( true );
   189 
   189 
   190         // Save the time when PS name changed and if the last change was too close to the current time
   190         // Save the time when PS name changed and if the last change was too close to the current time