D8771: Use heuristic weighted length algorithm to calculate the query term length.

2017-11-13 Thread Xuetian Weng
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.

D8771: Use heuristic weighted length algorithm to calculate the query term length.

2017-11-13 Thread Eike Hein
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

D8771: Use heuristic weighted length algorithm to calculate the query term length.

2017-11-13 Thread Xuetian Weng
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

D8771: Use heuristic weighted length algorithm to calculate the query term length.

2017-11-13 Thread Eike Hein
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

D8771: Use heuristic weighted length algorithm to calculate the query term length.

2017-11-12 Thread Xuetian Weng
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

D8771: Use heuristic weighted length algorithm to calculate the query term length.

2017-11-12 Thread Xuetian Weng
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

D8771: Use heuristic weighted length algorithm to calculate the query term length.

2017-11-12 Thread Christoph Feck
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

D8771: Use heuristic weighted length algorithm to calculate the query term length.

2017-11-12 Thread Xuetian Weng
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

D8771: Use heuristic weighted length algorithm to calculate the query term length.

2017-11-12 Thread Xuetian Weng
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