On Thursday 15 January 2009, Philipp Klaffert wrote: > 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...
what jumps out at me is that we have duplications of strings. not fun. if the string is changed in one place, it ends up needing to be changed everywhere. oh nos! so ... my suggestion is this: create as set of static const QString's in the TwitterEngine class and initialize them to the values... e.g.: const QString TwitterEngine::profilePrefix("Profile:"); then the calls become: name.startsWith(profilePrefix); no more duplicated strings and no more crazy issues. huzzah! thanks for working on these, btw =) -- Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Qt Software
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel