<br><br><div class="gmail_quote">Am 15. Januar 2009 17:39 schrieb Aaron J. Seigo <span dir="ltr"><<a href="mailto:aseigo@kde.org">aseigo@kde.org</a>></span>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Thursday 15 January 2009, Philipp Klaffert wrote:<br>
</div><div class="Ih2E3d">> thanks for your reply and for the link. For fixing the krazy2 issues<br>
> correctly I changed QString to QLatin1String. I understand your point of<br>
> view with "readability" but I won't decide which way is better. I think the<br>
> explicit conversion of these Strings makes the understanding of the code<br>
> not so much harder...<br>
<br>
</div>what jumps out at me is that we have duplications of strings. not fun. if the<br>
string is changed in one place, it ends up needing to be changed everywhere.<br>
oh nos!<br>
<br>
so ... my suggestion is this:<br>
<br>
create as set of static const QString's in the TwitterEngine class and<br>
initialize them to the values... e.g.:<br>
<br>
const QString TwitterEngine::profilePrefix("Profile:");<br>
<br>
then the calls become:<br>
<br>
name.startsWith(profilePrefix);<br>
<br>
no more duplicated strings and no more crazy issues. huzzah!<br>
<br>
thanks for working on these, btw =)<br>
<font color="#888888"><br>
--<br>
Aaron J. Seigo<br>
humru othro a kohnu se<br>
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43<br>
<br>
KDE core developer sponsored by Qt Software<br>
<br>
</font><br>_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
<br></blockquote></div><br><br>Thanks for your advice. After reading your mail I asked myself why I got that idea not in first place :)<br>I've now swapped all the Strings with constants and so, just 3 objects an no more krazy complaining for at least these issues.<br>
<br>Regards<br>Philipp Klaffert<br>