Avoid deprecated QAbstractItemModel::reset()
ClosedPublic

Authored by pvuorela on Mar 19 2019, 2:51 PM.

Diff Detail

Repository
R8 Calligra
Lint
Lint Skipped
Unit
Unit Tests Skipped
pvuorela created this revision.Mar 19 2019, 2:51 PM
Restricted Application added a project: Calligra: 3.0. · View Herald TranscriptMar 19 2019, 2:51 PM
Restricted Application added a subscriber: Calligra-Devel-list. · View Herald Transcript
pvuorela requested review of this revision.Mar 19 2019, 2:51 PM
dcaliste added inline comments.
plugins/textshape/TextDocumentStructureModel.cpp
308

I did the same changes in https://phabricator.kde.org/D15102 at another place and I put the begin and end at the start and end of the routine, like you did. But I remember that I got review asking not to risk to change signal order emission, in case, and put the begin/end just around the m_textDocument assignment.

I'm not completely sure that I remember correctly and I cannot find it in Phabricator anymore...

pvuorela added inline comments.Mar 20 2019, 9:59 AM
plugins/textshape/TextDocumentStructureModel.cpp
308

Wouldn't expect much risk. modelAboutToBeReset is rarely used, grepping Calligra returns only text shape style dialog thing which only repeats the action, and relying on state between begin&end doesn't soud like a good idea.

danders added inline comments.
plugins/textshape/TextDocumentStructureModel.cpp
308

Hmmm, cannot find the diff either, but I *think* it was about an emit, wasn' it?

danders accepted this revision.Mar 25 2019, 8:58 AM

I think this should be ok

This revision is now accepted and ready to land.Mar 25 2019, 8:58 AM
This revision was automatically updated to reflect the committed changes.