wahjam/wahjam — pull request #127 by stefanha (2014-10-05 09:00:35+00:00)
Title: Fix spurious ChannelTreeWidget::handleItemChanged() signals

The QTreeWidget::itemChanged() signal is emitted when items are added.
Since we created new QTreeWidgetItem instances with their parent pointer
they were immediately added to the tree before being fully initialized
with the useridx, channelidx, and mute values.

This could result in mute being disabled for useridx 0 channelidx 0
whenever a user joined the jam session.

The ChannelTreeWidget code has been hard to get right. Simplify it
dramatically by clearing the widget and recreating items on update. The
previous approach of updating items in place was complicated and hard to
understand.

Signed-off-by: Stefan Hajnoczi