Hi Dominik,<br><br>thanks for your reply and for the link. For fixing the krazy2 issues correctly I changed QString to QLatin1String. I understand your point of view with "readability" but I won't decide which way is better. I think the explicit conversion of these Strings makes the understanding of the code not so much harder...<br>
<br>You can find the modified patch in the attachment. <br><br><div class="gmail_quote">2009/1/15 Dominik Haumann <span dir="ltr"><<a href="mailto:dhdev@gmx.de">dhdev@gmx.de</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;">
Hi Philipp,<br>
<br>
On Thursday 15 January 2009, Philipp Klaffert wrote:<br>
> @@ -54,7 +53,7 @@<br>
> return true;<br>
> }<br>
><br>
> - if (!name.startsWith("Timeline:") &&<br>
> !name.startsWith("TimelineWithFriends:") &&<br>
> !name.startsWith("Profile:")) {<br>
> + if<br>
> (!name.startsWith(QString("Timeline:")) &&<br>
> !name.startsWith(QString("TimelineWithFriends:")) &&<br>
> !name.startsWith(QString("Profile:"))) { return false;<br>
> }<br>
<br>
This is also what implicitly happens: const char* is implicitely converted<br>
to a QString. The right way is afaik to use QLatin1String, see also<br>
<a href="http://doc.trolltech.com/latest/qlatin1string.html" target="_blank">http://doc.trolltech.com/latest/qlatin1string.html</a> for a better<br>
explanation :)<br>
<br>
And then, such optimizations should only be used in time critical cases, as<br>
the readability decreases when wrapping all strings (more text to read).<br>
But that's just my personal opinion, and maybe that's always the case in<br>
plasma - I don't know the preferred way here.<br>
<br>
Hope this helps :)<br>
<font color="#888888">Dominik<br>
</font></blockquote></div><br>