mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-17 11:30:49 +02:00
show user-avatar fallback if no avatar was found
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "database/DatabaseCommand_AllTracks.h"
|
||||
#include "database/DatabaseCommand_AddFiles.h"
|
||||
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
@@ -304,7 +305,12 @@ Result::sourceIcon() const
|
||||
}
|
||||
else
|
||||
{
|
||||
return collection()->source()->avatar( Source::FancyStyle );
|
||||
QPixmap avatar = collection()->source()->avatar( Source::FancyStyle );
|
||||
if ( !avatar )
|
||||
{
|
||||
avatar = TomahawkUtils::createAvatarFrame( QPixmap( RESPATH "images/user-avatar.png" ) );
|
||||
}
|
||||
return avatar;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user