AFAICS, from grep'ing for "DropUrlPatterns" in /usr/share/{kservices5,plasma/plasmoids/}
"urlPatterns" is either run:/ or trash:/, hence startsWith() should suffice.
Details
Diff Detail
- Repository
- R242 Plasma Framework (Library)
- Branch
- l-QRE (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 25460 Build 25478: arc lint + arc unit
I wonder, while this will work with all our uses of DropUrlPatterns, this would have been able to work with something like scheme:/*potato* which after this patch won't work.
In fact, it's called Patterns, not DropUrlWhenStartsWith. I'd appreciate feedback from someone else. Code-wise, looks better for sure.
I had trouble finding what urlPatterns would look like, and only found trash:/ and run:/, also couldn't find any documentation about X-Plasma-DropUrlPatterns.
Porting regex, especially with the pesky QRegExp::Wildcard, seeing what the pattern should look like always helps (and then adding a comment in the code with examples, that helps future changes, some docs say that the best regex-handling-code is one that has comments with examples of what the regex is supposed to match).
Talking with kbroulik on irc confirms your POV, the format of those patterns aren't documented anywhere so changing the matching now would change the behaviour...
I'll abandon this, (I suggest that X-Plasma-DropUrlPatterns should be documented somewhere so that there's a defined format on which to base the contract of not breaking API :/).