[KUrlNavigatorButton] Fix QString usage to not use [] out of bounds.
ClosedPublic

Authored by dfaure on Sep 12 2019, 11:22 AM.

Details

Summary

Since Qt-5.14 this leads to a runtime warning from QCharRef.

The solution resizes "big" before hand, and then resizes again at
the end, to the final size.

Test Plan

running dolphin; new unittest

Diff Detail

Repository
R241 KIO
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16424
Build 16442: arc lint + arc unit
dfaure created this revision.Sep 12 2019, 11:22 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 12 2019, 11:22 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
dfaure requested review of this revision.Sep 12 2019, 11:22 AM
elvisangelaccio accepted this revision.Sep 12 2019, 12:19 PM

I don't have 5.14 around atm, so I trust you've tested this :)

autotests/kurlnavigatortest.cpp
265

Did you mean cwd ?

This revision is now accepted and ready to land.Sep 12 2019, 12:19 PM
dfaure updated this revision to Diff 65905.Sep 12 2019, 12:22 PM

Clean up autotest code

I don't have 5.14 around atm, so I trust you've tested this :)

Well the only new thing in 5.14 is a runtime warning. This patch should work with older versions of Qt too :-)

elvisangelaccio accepted this revision.Sep 12 2019, 11:11 PM

Everything looks good and the new test passes for me.

dfaure closed this revision.Sep 14 2019, 10:00 AM