This revision was automatically updated to reflect the committed changes.
Closed by commit R120:55a8d72e9786: Use heuristic weighted length algorithm to
calculate the query term length. (authored by xuetianweng).
REPOSITORY
R120 Plasma Workspace
CHANGES SINCE LAST UPDATE
https://phabricator.
hein accepted this revision.
This revision is now accepted and ready to land.
REPOSITORY
R120 Plasma Workspace
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D8771
To: xuetianweng, hein, broulik
Cc: cfeck, ihipop, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed,
jens
xuetianweng updated this revision to Diff 22289.
xuetianweng marked an inline comment as done.
xuetianweng added a comment.
Use the new kcoreaddons function to cal the length.
REPOSITORY
R120 Plasma Workspace
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D8771?vs=22234&id=22289
B
hein added a comment.
I've found this problem in many KDE UIs, and I'd like to have a generic
solution. How do you feel about adding something like a logicalStringLength()
to KCoreAddons or KCodecs? Then we can use it in KRunner, KMail, Amarok, ...
REPOSITORY
R120 Plasma Workspace
REVISIO
xuetianweng marked an inline comment as done.
xuetianweng added inline comments.
INLINE COMMENTS
> cfeck wrote in servicerunner.cpp:52
> Since there is no 'else', the length is increased by 3 for Han characters. Is
> this intended?
Yeah you're right.. I intended to use else here.
REPOSITORY
xuetianweng updated this revision to Diff 22234.
xuetianweng added a comment.
forget to use else..
REPOSITORY
R120 Plasma Workspace
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D8771?vs=22214&id=22234
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D8771
AFFECTED
cfeck added inline comments.
INLINE COMMENTS
> servicerunner.cpp:52
> +}
> +length += 1;
> +}
Since there is no 'else', the length is increased by 3 for Han characters. Is
this intended?
REPOSITORY
R120 Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D8771
xuetianweng updated this revision to Diff 22214.
xuetianweng added a comment.
Revert the accident checking length change. Also make weightedLength linkage
local.
REPOSITORY
R120 Plasma Workspace
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D8771?vs=22213&id=22214
BRANCH
maste
xuetianweng created this revision.
xuetianweng added reviewers: hein, broulik.
Restricted Application added a project: Plasma.
REVISION SUMMARY
Composing CJK character requires a lot more key comparing to latin
characters. The raw length check does not make much sense for query string
in CJK