Make a guess:

void ContactAvatarDisplay::init()
{
	displayAvatar();
}

void ContactAvatarDisplay::avatarUpdated()
{
	disconnect(m_avatar, SIGNAL(updated()), this, SLOT(avatarUpdated()));
	m_avatar = m_contact.avatar(true);
	connect(m_avatar, SIGNAL(updated()), this, SLOT(avatarUpdated()));

	displayAvatar();
}

void ContactAvatarDisplay::displayAvatar()
{
	auto pixmap = m_avatar.pixmap();
	if (pixmap.isNull())
		pixmap = m_iconsManager->iconByPath(KaduIcon{"kadu_icons/buddy0"}).pixmap(m_size);
	if (!pixmap.isNull())
		pixmap = pixmap.scaled(m_size, Qt::KeepAspectRatio, Qt::SmoothTransformation);

	setPixmap(pixmap);
}

#include "moc_contact-avatar-display.cpp"