Use QRegularExpression::anchoredPattern() to port QRegExp::exactMatch().
Use a ternary to make the code compact in one place.
Details
Details
- Reviewers
dfaure - Group Reviewers
Frameworks - Commits
- R241:4965c4f9e2a2: [KSambaShare] Port QRegExp to QRegularExpression
make && ctest
Diff Detail
Diff Detail
- Repository
- R241 KIO
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/core/ksambashare.cpp | ||
---|---|---|
259 ↗ | (On Diff #72543) | badPattern was a bad name? ;-) |
src/core/ksambashare.cpp | ||
---|---|---|
259 ↗ | (On Diff #72543) | !notToMatchRx.match() -> "not notToMatchRx" double negative, slightly weird/heavy on the ear. !badPattern.match() -> "not badPattern" -> valid share name; there's method to my madne^Wlogic, I just need to figure it out... :) |
Comment Actions
Now I'm completely confused. Did you just argue *against* your own change?
You seem to say the old name was better...
Comment Actions
The original code, before I put my paws on it, used "notToMarchRx", I changed it to "badPattern", then changed it back, before you reviewed the diff at all; sorry about the confusion.
Comment Actions
Urgh, my apologies. I must have read a v1-v2 diff then. Oh well, no big deal either way.