Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/http/kcookiejar/kcookiejar.cpp
Show First 20 Lines • Show All 1092 Lines • ▼ Show 20 Line(s) | 1084 | { | |||
---|---|---|---|---|---|
1093 | 1093 | | |||
1094 | return advice; | 1094 | return advice; | ||
1095 | } | 1095 | } | ||
1096 | 1096 | | |||
1097 | // | 1097 | // | ||
1098 | // This function sets the advice for all cookies originating from | 1098 | // This function sets the advice for all cookies originating from | ||
1099 | // _domain. | 1099 | // _domain. | ||
1100 | // | 1100 | // | ||
1101 | void KCookieJar::setDomainAdvice(const QString &_domain, KCookieAdvice _advice) | 1101 | void KCookieJar::setDomainAdvice(const QString &domain, KCookieAdvice _advice) | ||
1102 | { | 1102 | { | ||
1103 | QString domain(_domain); | | |||
1104 | KHttpCookieList *cookieList = m_cookieDomains.value(domain); | 1103 | KHttpCookieList *cookieList = m_cookieDomains.value(domain); | ||
kossebau: This here seems some overleft from when the method actually needed a modfyable copy of _domain. | |||||
Hm, why the change of all _domain to domain, not the other way around? So: void foo(const Type arg) { // need to do non-const things with arg value, meh } -> void foo(const Type _arg) { Type arg(_arg); // do non-const things with arg value } kossebau: Hm, why the change of all _domain to domain, not the other way around?
The _xyz naming of… | |||||
1105 | 1104 | | |||
1106 | if (cookieList) { | 1105 | if (cookieList) { | ||
1107 | if (cookieList->getAdvice() != _advice) { | 1106 | if (cookieList->getAdvice() != _advice) { | ||
1108 | m_configChanged = true; | 1107 | m_configChanged = true; | ||
1109 | // domain is already known | 1108 | // domain is already known | ||
1110 | cookieList->setAdvice(_advice); | 1109 | cookieList->setAdvice(_advice); | ||
1111 | } | 1110 | } | ||
1112 | 1111 | | |||
▲ Show 20 Lines • Show All 503 Lines • Show Last 20 Lines |
This here seems some overleft from when the method actually needed a modfyable copy of _domain. Seems this in no longer the case.
So we can just rename _domain to domain in the arg list instead, and be done.