mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 16:14:40 +02:00
Add stream operators for CacheData
This commit is contained in:
@@ -104,6 +104,19 @@ private:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline QDataStream& operator<< ( QDataStream& in, const TomahawkUtils::CacheData& data )
|
||||||
|
{
|
||||||
|
in << data.data << data.maxAge;
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDataStream& operator>> ( QDataStream& out, TomahawkUtils::CacheData& data )
|
||||||
|
{
|
||||||
|
out >> data.data;
|
||||||
|
out >> data.maxAge;
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
Q_DECLARE_METATYPE( TomahawkUtils::CacheData );
|
Q_DECLARE_METATYPE( TomahawkUtils::CacheData );
|
||||||
|
|
||||||
#endif // TOMAHAWKCACHE_H
|
#endif // TOMAHAWKCACHE_H
|
||||||
|
@@ -452,8 +452,8 @@ TomahawkApp::registerMetaTypes()
|
|||||||
|
|
||||||
qRegisterMetaType< Tomahawk::PlaylistInterface::LatchMode >( "Tomahawk::PlaylistInterface::LatchMode" );
|
qRegisterMetaType< Tomahawk::PlaylistInterface::LatchMode >( "Tomahawk::PlaylistInterface::LatchMode" );
|
||||||
|
|
||||||
qRegisterMetaType< TomahawkUtils::CacheData>( "TomahawkUtils::CacheData" );
|
qRegisterMetaType< TomahawkUtils::CacheData >( "TomahawkUtils::CacheData" );
|
||||||
|
qRegisterMetaTypeStreamOperators< TomahawkUtils::CacheData >( "TomahawkUtils::CacheData" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user