mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-10-04 17:41:42 +02:00
Store QPixmap on the heap in Result, as it's created in a db thread
This commit is contained in:
@@ -64,6 +64,7 @@ Result::isCached( const QString& url )
|
||||
Result::Result( const QString& url )
|
||||
: QObject()
|
||||
, m_url( url )
|
||||
, m_sourceIcon( 0 )
|
||||
, m_duration( 0 )
|
||||
, m_bitrate( 0 )
|
||||
, m_size( 0 )
|
||||
@@ -81,6 +82,7 @@ Result::Result( const QString& url )
|
||||
|
||||
Result::~Result()
|
||||
{
|
||||
delete m_sourceIcon;
|
||||
}
|
||||
|
||||
|
||||
@@ -301,7 +303,10 @@ Result::sourceIcon() const
|
||||
{
|
||||
if ( collection().isNull() )
|
||||
{
|
||||
return m_sourceIcon;
|
||||
if ( !m_sourceIcon )
|
||||
return QPixmap();
|
||||
else
|
||||
return *m_sourceIcon;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user