Add ability to get cursor data from URL query arguments, like file://foo.txt?line=123&column=456
ClosedPublic

Authored by arrowd on Jan 8 2019, 3:25 PM.

Details

Summary

CCBUG: 398998

Test Plan

Opening a file with such URL works in both KWrite and Kate.

Diff Detail

Repository
R40 Kate
Branch
cursor-from-url-query
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 6830
Build 6848: arc lint + arc unit
arrowd created this revision.Jan 8 2019, 3:25 PM
Restricted Application added a project: Kate. · View Herald TranscriptJan 8 2019, 3:25 PM
Restricted Application added a subscriber: kwrite-devel. · View Herald Transcript
arrowd requested review of this revision.Jan 8 2019, 3:25 PM
mwolff accepted this revision.Jan 8 2019, 3:26 PM
mwolff added a subscriber: mwolff.

+1, but it would be good if we could share this code...

This revision is now accepted and ready to land.Jan 8 2019, 3:26 PM
arrowd added a comment.Jan 8 2019, 3:29 PM

+1, but it would be good if we could share this code...

Share these two snippets or with KDevelop?

dhaumann added inline comments.
kate/kateapp.cpp
197

Please make line and column an int. It's an int in KWrite handing as well.

arrowd updated this revision to Diff 49011.Jan 8 2019, 4:34 PM
arrowd marked an inline comment as done.

Change the type from uint to int.

Can I push this?

cullmann accepted this revision.Jan 15 2019, 11:02 AM
cullmann added a subscriber: cullmann.

I think this can go in.
Having it shared between both apps in the urlinfo.h would be nicer, but having this feature now is better than waiting for that.

This revision was automatically updated to reflect the committed changes.

Thanks for the improvement, btw.!