Ticket #8572: mythtv-8572-compile_fixes_for_qt_4_7-templates.patch
File mythtv-8572-compile_fixes_for_qt_4_7-templates.patch, 3.2 KB (added by , 14 years ago) |
---|
-
libs/libmyth/mythdeque.h
--- libs/libmyth/mythdeque.h | 9 8 + 1 - 0 ! libs/libmythtv/tv_rec.h | 6 5 + 1 - 0 ! libs/libmythupnp/eventing.h | 9 7 + 2 - 0 ! 3 files changed, 20 insertions(+), 4 deletions(-)
old new class MythDeque : public deque<T> 16 16 { 17 17 public: 18 18 /// \brief Removes item from front of list and returns a copy. O(1). 19 // TODO: QString(0) or QString(NULL) is ambiguous in Qt4.7 and deprecated since 20 // Qt4. Instead, QString() or QString((const char *)0) should be used. 21 // This template is used with T of AVFrame*, XvMCOSD*, TVState, DBEventEIT*, 22 // TuningRequest, DSMCCPacket*, int, VideoFrame*, AVSubtitle, QString, 23 // QKeyEvent*, UDPNotifyOSDSet*, ProcessRequestThread, and 24 // DeferredDeleteStruct. 19 25 T dequeue() 20 26 { 21 27 if (deque<T>::empty()) 22 return (T)(0); 28 return T(); 29 // return (T)(0); 23 30 T item = deque<T>::front(); 24 31 deque<T>::pop_front(); 25 32 return item; -
libs/libmythupnp/eventing.h
old new class UPNP_PUBLIC StateVariables 228 228 229 229 // ------------------------------------------------------------------ 230 230 231 // TODO: QString(0) or QString(NULL) is ambiguous in Qt4.7 and deprecated since 232 // Qt4. Instead, QString() or QString((const char *)0) should be used. 233 // This template is used with T of QString and unsigned short. 231 234 template < class T > 232 235 T GetValue( const QString &sName ) 233 236 { 234 237 SVMap::iterator it = m_map.find(sName); 235 238 if (it == m_map.end()) 236 return T(0); 239 return T(); 240 // return T(0); 237 241 238 242 StateVariable< T > *pVariable = 239 243 dynamic_cast< StateVariable< T > *>( *it ); … … class UPNP_PUBLIC StateVariables 241 245 if (pVariable != NULL) 242 246 return pVariable->GetValue(); 243 247 244 return T(0); 248 return T(); 249 // return T(0); 245 250 } 246 251 247 252 uint BuildNotifyBody(QTextStream &ts, TaskTime ttLastNotified) const; -
libs/libmythtv/tv_rec.h
old new class FireWireDBOptions 93 93 class TuningRequest 94 94 { 95 95 public: 96 TuningRequest(uint f) : 96 // TODO: This hack is only required to allow use of MythDeque<T>::dequeue() 97 // with T = TuningRequest because of the hack used to make 98 // MythDeque<T>::dequeue() compile with Qt 4.7 99 // TuningRequest(uint f) : 100 TuningRequest(uint f = 0) : 97 101 flags(f), program(NULL), channel(QString::null), 98 102 input(QString::null), majorChan(0), minorChan(0), progNum(-1) {;} 99 103 TuningRequest(uint f, RecordingInfo *p) :