[Patch] Stop twitter data engine from eating ':' and following text

Aaron J. Seigo aseigo at kde.org
Sun Jan 13 02:17:50 CET 2008


On Saturday 12 January 2008, Ivo Anjo ( [Knuckles] ) wrote:
> My second plasma patch, again goes to twitter :)

huzzah =)

> The twitter data engine receives the text to be sent to the twitter
> server in the format "username:text", and splits this string using the
> ':', but the way this was implemented, if the text contained a ':'
> character, all text after it (including the character) would
> disappear.

this patch will indeed work (good catch, btw), however there's probably a more 
performant solution, e.g. something like:

int colon = status.indexOf(':');

if (colon < 1) {
    return; // failed to get a name
}

QString user = staus.left(colon);
m_status = status.right(status.length() - (colon + 1));

-- 
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 Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080112/0957ddad/attachment.pgp 


More information about the Panel-devel mailing list