Use KTextEditor::Document::wordAt() instead of custom implementation
AbandonedPublic

Authored by dhaumann on Jun 14 2016, 8:46 PM.

Details

Reviewers
kfunk
Summary

The code is mostly unused as far as I can see...

Diff Detail

Repository
R33 KDevPlatform
Branch
5.0
Lint
No Linters Available
Unit
No Unit Test Coverage
dhaumann updated this revision to Diff 4477.Jun 14 2016, 8:46 PM
dhaumann retitled this revision from to Use KTextEditor::Document::wordAt() instead of custom implementation.
dhaumann updated this object.
dhaumann edited the test plan for this revision. (Show Details)
dhaumann added a reviewer: kfunk.
Restricted Application added a subscriber: kdevelop-devel. ยท View Herald TranscriptJun 14 2016, 8:46 PM
brauch added a subscriber: brauch.Jun 14 2016, 8:48 PM

looks good to me ;)

shell/textdocument.cpp
517

Hmm, the tilde will not be covered by wordAt, will it? This should probably be fixed in the C++ highlighter though, it's wrong here anyways.

dhaumann added inline comments.Jun 14 2016, 8:58 PM
shell/textdocument.cpp
517

Yes, you are correct.

But then, why was the '~' in there in the first place? Can anyone tell?

And there is another difference below: for empty strings, PartDocument::textWord() was returned.

I cannot tell whether this change in behavior will do any bad, since my knowledge of KDevelop mainly lies in KTextEditor :^)

I think for C++ destructors.

The function is only called in a few fairly uncritical places, I think chances of breakage are low ...

kfunk requested changes to this revision.Jun 15 2016, 9:48 AM
kfunk edited edge metadata.

See Sven's comments

This revision now requires changes to proceed.Jun 15 2016, 9:48 AM
dhaumann abandoned this revision.Feb 12 2017, 9:00 PM

Probably not worth the effort, and the side-effects are unclear.