radioapp/radiouiengine/src/radiostation_p.cpp
changeset 32 189d20c34778
parent 13 46974bebc798
child 36 ba22309243a1
equal deleted inserted replaced
28:075425b8d9a4 32:189d20c34778
    24  *
    24  *
    25  */
    25  */
    26 RadioStationPrivate::RadioStationPrivate( int presetIndex, uint frequency )
    26 RadioStationPrivate::RadioStationPrivate( int presetIndex, uint frequency )
    27 {
    27 {
    28     init( presetIndex, frequency );
    28     init( presetIndex, frequency );
    29 }
    29 
    30 
    30     if ( presetIndex == RadioStation::SharedNull ) {
    31 /*!
    31         ref = 2;
    32  *
    32     }
    33  */
    33 }
    34 RadioStationPrivate::RadioStationPrivate( RadioStation::PresetFlag flag )
    34 
    35 {
    35 /*!
    36     init( flag );
    36  *
       
    37  */
       
    38 RadioStationPrivate::RadioStationPrivate( const RadioStationPrivate& other ) :
       
    39     QSharedData( other ),
       
    40     mPresetIndex( other.mPresetIndex ),
       
    41     mFrequency( other.mFrequency ),
       
    42     mName( other.mName ),
       
    43     mRenamedByUser( other.mRenamedByUser ),
       
    44     mGenre( other.mGenre ),
       
    45     mUrl( other.mUrl ),
       
    46     mPiCode( other.mPiCode ),
       
    47     mType( other.mType ),
       
    48     mPsType( other.mPsType ),
       
    49     mRadioText( other.mRadioText ),
       
    50     mDynamicPsText( other.mDynamicPsText ),
       
    51     mChangeFlags( other.mChangeFlags ),
       
    52     mCallSignCheckDone( other.mCallSignCheckDone ),
       
    53     mLastPsNameChangeTime( other.mLastPsNameChangeTime )
       
    54 {
       
    55     // Protect the shared null preset index to make debugging easier
       
    56     if ( mPresetIndex == RadioStation::SharedNull ) {
       
    57         mPresetIndex = RadioStation::Invalid;
       
    58     }
    37 }
    59 }
    38 
    60 
    39 /*!
    61 /*!
    40  *
    62  *
    41  */
    63  */
    46 /*!
    68 /*!
    47  *
    69  *
    48  */
    70  */
    49 void RadioStationPrivate::init( int presetIndex, uint frequency )
    71 void RadioStationPrivate::init( int presetIndex, uint frequency )
    50 {
    72 {
    51     ref                = 1;
    73     mPresetIndex       = presetIndex;
    52     mFrequency         = frequency;
    74     mFrequency         = frequency;
    53     mPresetIndex       = presetIndex;
       
    54     mRenamedByUser     = false;
    75     mRenamedByUser     = false;
    55     mGenre             = -1;
    76     mGenre             = -1;
    56     mPiCode            = -1;
    77     mPiCode            = -1;
    57     mType              = 0;
    78     mType              = 0;
    58     mPsType            = RadioStation::Unknown;
    79     mPsType            = RadioStation::Unknown;