Update deprecated QAbstractItemModel::reset() to use {begin,end}ResetModel() instead
ClosedPublic

Authored by dcaliste on Aug 27 2018, 2:47 PM.

Details

Summary

Replace QAbstractItemModel::reset() with the more recent {begin,end}ResetModel() calls.

Also remove the deprecated calls to setSupportedDragActions() and replace them by implementing supportedDragActions().

Diff Detail

Repository
R8 Calligra
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dcaliste created this revision.Aug 27 2018, 2:47 PM
Restricted Application added a subscriber: Calligra-Devel-list. · View Herald TranscriptAug 27 2018, 2:47 PM
dcaliste requested review of this revision.Aug 27 2018, 2:47 PM
leinir accepted this revision.Aug 29 2018, 11:34 AM

Entirely supported, wrapping things in begin/end model calls instead of just resetting is just... so much nicer in general :) And yes, deprecation warnings are nice to not have, so cool with that :)

This revision is now accepted and ready to land.Aug 29 2018, 11:34 AM

@leinir, thank you. Instead of compiling with deprecation off, it's better to correct them ;)

I've finished making 3.1.0 compile in Sailfish SDK based on KF5 5.34.0 with minor tweaks, see http://git.merproject.org/dcaliste/calligra-bundle
I'm commiting here all modifications that makes sense to upstream, new diffs will arrive soon, not only about deprecations.

@leinir, thank you. Instead of compiling with deprecation off, it's better to correct them ;)

Absolutely yes ;) The CI does mark them, though, so that helps :)

I've finished making 3.1.0 compile in Sailfish SDK based on KF5 5.34.0 with minor tweaks, see http://git.merproject.org/dcaliste/calligra-bundle
I'm commiting here all modifications that makes sense to upstream, new diffs will arrive soon, not only about deprecations.

Great stuff! Look forward to them all, really happy to see things moving in the Calligra framework as well :D

piggz added a subscriber: piggz.Aug 29 2018, 3:49 PM

nice, btw, i have a kf5 repo on the mer obs where i build kf5 libs for sailfish...perhaps that is easier for you? i use them in a few sfos apps, even kdb! my version is 5.31 atm .... is 5.34 the last version to build with qt5.6? i could never find the archives as theyve disappeared from the kde servers, unless im misteken.

@piggz thank you for the proposition. I've discussed with jpetrell, pvuorela and lbt on #sailfishos (see Tuesday 21th discussion, or the Tuesday before) and currently they prefer to have KF5 dependency packages within Calligra, not as standalone libraries in mer-core. Depending later on additional packages creating new demand on KF5, some packages may be migrated to mer-core. So far so good for me. I think 5.34 is the latest version to compile with 5.6 (at least, that's the case for KI18n, so I'm using consistently this version for the other packages). I'm using git repos, so there is no problem to get any version I want. It's a matter of git checkout v5.xx.0.

piggz added a comment.Aug 29 2018, 4:40 PM

@dcaliste by my count there are atleast 3 apps using kf5 libs now, calligra, my watch client app and my kdeconnect port. there has/to be scope for sharing effort :) ive just been shiping the libs in openrepos with the apps

This revision was automatically updated to reflect the committed changes.