From: Manuel Nickschas Date: Wed, 29 Aug 2018 19:02:41 +0000 (+0200) Subject: client: Don't send dataChanged() before actually changing the data X-Git-Tag: 0.13-rc2~51 X-Git-Url: https://git.quassel-irc.org/?a=commitdiff_plain;h=d1e7cc01969e8fb8cfc20a62a29176f417fc3507;p=quassel.git client: Don't send dataChanged() before actually changing the data The PropertyMapItem didn't set a changed property before sending the signal, so consumers synchronously reacting to dataChanged() would still access the old value. Not sure if this issue is the cause for some of the weird model behavior we tend to see at times... --- diff --git a/src/client/treemodel.cpp b/src/client/treemodel.cpp index f02f7317..f87d3367 100644 --- a/src/client/treemodel.cpp +++ b/src/client/treemodel.cpp @@ -316,8 +316,9 @@ bool PropertyMapItem::setData(int column, const QVariant &value, int role) if (column >= columnCount() || role != Qt::DisplayRole) return false; + setProperty(_propertyOrder[column].toLatin1(), value); emit dataChanged(column); - return setProperty(_propertyOrder[column].toLatin1(), value); + return true; }