Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.9.1
-
None
-
b0bef01bc1dbfdecf32b56edbafcd4fb0eb2c2e8
Description
QAction::setData hasn't check that this data has allready set.
Look at code. I comment lines which can be added.
void QAction::setData(const QVariant &data) { Q_D(QAction); // if (d->userData == data) // return; d->userData = data; d->sendDataChanged(); }
Or documentation should explain that dataChanged() will always emit.
At this moment I doubt current behaviour is feature or bug. In my personal case I use this trick to force emit dataChanged when I want it and do not change any data in QAction object.
Attachments
For Gerrit Dashboard: QTBUG-62006 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
209196,3 | QAction: fix ::setData() always emits changed() | 5.9 | qt/qtbase | Status: MERGED | +2 | 0 |