D14975: Don't use obsolete QRectF and QAbstractItemModel functions

2018-08-22 Thread Damien Caliste
dcaliste retitled this revision from "Don't use obsolete QRectF functions" to 
"Don't use obsolete QRectF and QAbstractItemModel functions".

REVISION DETAIL
  https://phabricator.kde.org/D14975

To: dcaliste, leinir, danders, #calligra:_3.0
Cc: anthonyfieroni, Calligra-Devel-list, cochise, vandenoever


D14975: Don't use obsolete QRectF and QAbstractItemModel functions

2018-08-22 Thread Dag Andersen
danders added a comment.


  I'm not 100% sure of stackChanged() change.
  Probably ok, but the original would call both begin and end before calling 
the selection model.
  To get exactly the same behaviour you could do the same.
  It depends on how the selction model handles reset and setCurrentIndex() I 
guess.
  
  Hmm, I think I would call both begin and end before setCurrentIndex() as 
setCurrentIndex()  usually emits signals that may prompt consumers to access 
the model.

REVISION DETAIL
  https://phabricator.kde.org/D14975

To: dcaliste, leinir, danders, #calligra:_3.0
Cc: anthonyfieroni, Calligra-Devel-list, cochise, vandenoever


D14975: Don't use obsolete QRectF and QAbstractItemModel functions

2018-08-22 Thread Damien Caliste
dcaliste added a comment.


  @danders I agree with your remark, I was wondering exactly the same. It's 
safer to put the begin / end together. I'll update the diff and add a comment 
to suggest to move the end after the setCurrentIndex() after extensive testing.

REVISION DETAIL
  https://phabricator.kde.org/D14975

To: dcaliste, leinir, danders, #calligra:_3.0
Cc: anthonyfieroni, Calligra-Devel-list, cochise, vandenoever


D14975: Don't use obsolete QRectF and QAbstractItemModel functions

2018-08-22 Thread Damien Caliste
dcaliste updated this revision to Diff 40193.
dcaliste added a comment.


  Update the patch in stackChanged() call to have the exact behaviour than 
before in this method.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14975?vs=40152&id=40193

REVISION DETAIL
  https://phabricator.kde.org/D14975

AFFECTED FILES
  libs/flake/tools/KoCreateShapeStrategy.cpp
  libs/flake/tools/KoShapeRubberSelectStrategy.cpp
  libs/kundo2/kundo2model.cpp
  libs/widgets/KoLineStyleModel.cpp
  libs/widgets/KoResourceModel.cpp

To: dcaliste, leinir, danders, #calligra:_3.0
Cc: anthonyfieroni, Calligra-Devel-list, cochise, vandenoever


D14975: Don't use obsolete QRectF and QAbstractItemModel functions

2018-08-22 Thread Dag Andersen
danders accepted this revision.
This revision is now accepted and ready to land.

REVISION DETAIL
  https://phabricator.kde.org/D14975

To: dcaliste, leinir, danders, #calligra:_3.0
Cc: anthonyfieroni, Calligra-Devel-list, cochise, vandenoever