<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/110865/">http://git.reviewboard.kde.org/r/110865/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for kdelibs and Oswald Buddenhagen.</div>
<div>By David Faure.</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">KConfig: fix long-standing bug where translations would not be loaded.
This happened in the following situation:
* KDEDIRS with two prefixes (let's call them global and middle)
* a kconfig file with the same name in both (e.g. a .desktop file)
* same value for Name[locale]= in both
* no override in the local directory (KDEHOME)
The Name= value in the "middle" desktop file would delete the
currently-loaded translated name, but didn't do so fully (it failed
to delete the one with bDefault==true, due to the line
"k.bDefault = false" a few lines before, which wasn't meant to
affect this). So when reading the Name[locale] in the "middle"
desktop file afterwards, it said "ok I already have it, do nothing",
and the english name prevailed.
The complexity comes from the fact that in such a setup, every key
is present twice, once with bDefault=false and once with bDefault=true.
(and then double that, for localized and non-localized).
After making bDefault=false operate on a copy of the key, a bug was
uncovered in the if (bDefault) block that was never executed before:
it should remove the key with bDefault==true, since it already did
that for bDefault==false (the 4th argument of the KEntryKey ctor).
Anyway, there's a unittest, so even if nobody ever understands my
ramblings above, at least it won't regress again.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Added unittests, ensured existing ones pass.
Also tested the real-world setup which triggered this bug in the first place (copies of kcmodules in an overlay directory defined in /etc/kde4rc), and translations not appearing in systemsettings when doing that.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kdecore/config/kconfigdata.cpp <span style="color: grey">(8f837fb8eec896c1ceb245bc6854cdfba55cce4b)</span></li>
<li>kdecore/tests/kconfigtest.h <span style="color: grey">(3b01c66fd49cda833044dfcb5f2b51c24da7f18b)</span></li>
<li>kdecore/tests/kconfigtest.cpp <span style="color: grey">(e5d2e80da0685615a0028ccd7254487664ffc6b0)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/110865/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>