Make it compile with QT_NO_CAST_FROM_ASCII
ClosedPublic

Authored by mlaurent on Nov 28 2017, 7:10 AM.

Details

Test Plan

compile execute autotest

Diff Detail

Repository
R289 KNotifications
Branch
make_it_compile_with_QT_NO_CAST_FROM_ASCII
Lint
No Linters Available
Unit
No Unit Test Coverage
mlaurent created this revision.Nov 28 2017, 7:10 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 28 2017, 7:10 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
mlaurent requested review of this revision.Nov 28 2017, 7:10 AM
dfaure requested changes to this revision.Nov 28 2017, 7:35 AM
dfaure added inline comments.
src/knotificationmanager.cpp
87 ↗(On Diff #23062)

Ouch that's a lot of conversions.

Remove it all, and fix the encodeName to decodeName as it should have been.

src/kstatusnotifieritem.cpp
48 ↗(On Diff #23062)

static QStrings create startup code. Leave it as a char[], do the conversions at runtime.

src/notifybyflatpak.cpp
40 ↗(On Diff #23062)

same

src/notifybypopup.cpp
61 ↗(On Diff #23062)

same

tests/knotificationdbustest.cpp
29 ↗(On Diff #23062)

same

Alternatively, if they are used only once, maybe just move each QStringLiteral to where it's used.

This revision now requires changes to proceed.Nov 28 2017, 7:35 AM
mlaurent updated this revision to Diff 23069.Nov 28 2017, 7:59 AM
mlaurent marked 5 inline comments as done.
  • Fix comment found by david
dfaure accepted this revision.Nov 28 2017, 8:26 AM
This revision is now accepted and ready to land.Nov 28 2017, 8:26 AM
This revision was automatically updated to reflect the committed changes.