[server] Text input content hint and purpose per protocol version
ClosedPublic

Authored by romangg on Nov 6 2018, 1:41 PM.

Details

Summary

Convert content hint and purpose according to used text-input protocol version.

This way we can use different specifiers, which enables us in the future to use
the default hint of v0 and the pin purpose of v3.

Also code is cleaner when using the correctly versioned specifier names according
to the protocol version.

Test Plan

Compiles, autotest passes.

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
romangg created this revision.Nov 6 2018, 1:41 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 6 2018, 1:41 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
romangg requested review of this revision.Nov 6 2018, 1:41 PM
zzag added a subscriber: zzag.Nov 6 2018, 1:53 PM
zzag added inline comments.
src/server/textinput_interface.cpp
66
romangg added inline comments.Nov 6 2018, 2:38 PM
src/server/textinput_interface.cpp
66

wlPurpose is also an abbreviation. ;)

And in the header file it is named purpose. Makes more sense to me to have the name without abbreviation in the API. I'll rename the function variable though.

romangg updated this revision to Diff 44970.Nov 6 2018, 2:45 PM
  • Rename variables, function
zzag accepted this revision.Nov 6 2018, 4:05 PM
zzag added inline comments.
src/server/textinput_interface.cpp
66

wlPurpose is also an abbreviation. ;)

You caught me. :D

src/server/textinput_interface_p.h
69

Can be const.

This revision is now accepted and ready to land.Nov 6 2018, 4:05 PM
romangg marked an inline comment as done.Nov 7 2018, 1:40 PM
This revision was automatically updated to reflect the committed changes.