[kitemviews] make it compile without deprecated method
ClosedPublic

Authored by mlaurent on Feb 28 2019, 9:55 PM.

Details

Summary

compile without deprecated methods

Test Plan

autotest ok

Diff Detail

Repository
R276 KItemViews
Branch
arcpatch-D19431
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11873
Build 11891: arc lint + arc unit
mlaurent created this revision.Feb 28 2019, 9:55 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 28 2019, 9:55 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
mlaurent requested review of this revision.Feb 28 2019, 9:55 PM
dfaure requested changes to this revision.Mar 2 2019, 10:49 PM
dfaure added inline comments.
tests/kwidgetitemdelegatetest.cpp
254 ↗(On Diff #52861)

I think the whole point of the name horizontalAdvance() is that characters can actually be drawn outside of that width. I guess boundingRect().width() is a better port for width() in general.

Heh actually I just read the documentation for width and it agrees with that.

So yes this is a "same behaviour" port, but the whole point of the renaming is to make us realize these things. Sometimes horizontalAdvance is correct (like in kwordwrap.cpp, where they get added together), sometimes boundingRect is what we need, like here when it's to resize something and make sure all the pixels fit.

This revision now requires changes to proceed.Mar 2 2019, 10:49 PM
mlaurent updated this revision to Diff 58156.May 16 2019, 5:49 AM

Fix david comment

dfaure accepted this revision.May 16 2019, 8:37 AM
This revision is now accepted and ready to land.May 16 2019, 8:37 AM
This revision was automatically updated to reflect the committed changes.