Qt: Do not send dataChanged if nothing changed

When setting the warning/error icon on a Qt version in the Qt options
page: Do not send dataChanged if the icon has not actually changed.

This fixes the selection getting broken when two Qt versions happen to
have the same displayName.

Task-number: QTCREATORBUG-16644
Change-Id: I7722fbc021388be237e59a59bd136c61f611ad52
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Tobias Hunger
2016-10-26 12:48:17 +02:00
parent b383eeae82
commit 3cfa0c0de7

View File

@@ -116,6 +116,8 @@ public:
void setIcon(const QIcon &icon)
{
if (m_icon.cacheKey() == icon.cacheKey())
return;
m_icon = icon;
update();
}