Fix kio-extras compilation with -DQT_NO_CAST_TO_ASCII
ClosedPublic

Authored by dfaure on Apr 24 2020, 11:01 AM.

Details

Summary

D27804 broke compilation for me because I have the above flag set ;-)
It showed rather some rather nasty QString -> QByteArray conversions in this code.

Test Plan

Now it builds.

Diff Detail

Repository
R320 KIO Extras
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25819
Build 25837: arc lint + arc unit
dfaure created this revision.Apr 24 2020, 11:01 AM
Restricted Application added projects: Dolphin, Frameworks. · View Herald TranscriptApr 24 2020, 11:01 AM
Restricted Application added subscribers: kfm-devel, kde-frameworks-devel. · View Herald Transcript
dfaure requested review of this revision.Apr 24 2020, 11:01 AM

Shouldn't we just make the entire thing QT_NO_CAST_TO_ASCII by default?

meven added a subscriber: meven.EditedApr 24 2020, 11:10 AM

Shouldn't we just make the entire thing QT_NO_CAST_TO_ASCII by default?

It might need some work like here, so one repo at a time I would say.
Even if that would be a goal.
We could target it for KF6.

sitter accepted this revision.Apr 24 2020, 11:18 AM

Sure, I was referring to the smb module, not even kio-extras as a whole. ^^

Anyway, diff looks reasonable.

This revision is now accepted and ready to land.Apr 24 2020, 11:18 AM
dfaure added inline comments.Apr 24 2020, 11:45 AM
CMakeLists.txt
60

Isn't that what I did here? Now all of kio-extras gets that flag.

And BTW everything built by kdesrc-build actually builds with this flag (since I have it in my kdesrc-buildrc). But that doesn't allow setting it in ECM, there is more code using ECM out there...

dfaure closed this revision.Apr 24 2020, 11:49 AM
sitter added inline comments.Apr 24 2020, 11:50 AM
CMakeLists.txt
60

Huh, I must have scrolled right past it. All is perfect!