Use the C locale when parsing dates in cookies, since only English week
and month names are allowed
BUG: 387254
dfaure |
Frameworks |
Use the C locale when parsing dates in cookies, since only English week
and month names are allowed
BUG: 387254
Lint Skipped |
Unit Tests Skipped |
src/ioslaves/http/kcookiejar/kcookiejar.cpp | ||
---|---|---|
78–84 | You can use not predefined days name QLocale locale = QLocale::c(); for (int i = 1; i < 8; ++i) { if (weekday.startsWith(locale.dayName(i, QLocale::ShortFormat), Qt::CaseInsensitive)) { |
Thanks for the fix, looks good, just two minor improvement suggestions.
src/ioslaves/http/kcookiejar/kcookiejar.cpp | ||
---|---|---|
78 ↗ | (On Diff #22970) | "i" and "l" local variables are hard to read, please rename to locale or cLocale |
119 ↗ | (On Diff #22970) | You could (and probably should) do like the above loop and move QLocale::c() to a local variable defined before the for loop. |
src/ioslaves/http/kcookiejar/kcookiejar.cpp | ||
---|---|---|
117 | indentation seems strange, but maybe that's just phabricator messing up... |