equal
deleted
inserted
replaced
17 |
17 |
18 #ifndef RADIOHISTORYITEM_P_H |
18 #ifndef RADIOHISTORYITEM_P_H |
19 #define RADIOHISTORYITEM_H |
19 #define RADIOHISTORYITEM_H |
20 |
20 |
21 // System includes |
21 // System includes |
|
22 #include <QSharedData> |
22 #include <QString> |
23 #include <QString> |
23 #include <QDateTime> |
24 #include <QDateTime> |
24 |
25 |
25 // User includes |
26 // User includes |
26 |
27 |
41 FromRds, |
42 FromRds, |
42 Time |
43 Time |
43 }; |
44 }; |
44 } |
45 } |
45 |
46 |
46 class RadioHistoryItemPrivate |
47 class RadioHistoryItemPrivate : public QSharedData |
47 { |
48 { |
48 public: |
49 public: |
49 |
50 |
50 RadioHistoryItemPrivate(); |
51 RadioHistoryItemPrivate(); |
|
52 RadioHistoryItemPrivate( const RadioHistoryItemPrivate& other ); |
51 RadioHistoryItemPrivate( const QString& artist, const QString& title ); |
53 RadioHistoryItemPrivate( const QString& artist, const QString& title ); |
52 |
54 |
53 void init( const QString& artist, const QString& title ); |
55 void init( const QString& artist, const QString& title ); |
54 |
56 |
55 void initFromRecord( const QSqlRecord& record ); |
57 void initFromRecord( const QSqlRecord& record ); |
56 |
58 |
57 public: // data |
59 public: // data |
58 |
|
59 /** |
|
60 * Reference count used for implicit sharing. |
|
61 * Has to be named "ref" instead having the 'm' prefix like all other member variables in Radio |
|
62 * This is because convenience functions like qAtomicAssign() expect it to be named "ref" |
|
63 */ |
|
64 QAtomicInt ref; |
|
65 |
60 |
66 int mId; |
61 int mId; |
67 |
62 |
68 QString mArtist; |
63 QString mArtist; |
69 |
64 |