[prev in list] [next in list] [prev in thread] [next in thread]
List: ktexteditor-devel
Subject: Re: To QString or to QStringList?
From: Hamish Rodda <rodda () kde ! org>
Date: 2005-10-15 11:10:58
Message-ID: 200510152111.00688.rodda () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Saturday 15 October 2005 02:37, Christoph Cullmann wrote:
> On Friday 14 October 2005 17:07, Hamish Rodda wrote:
> > I'm told that many text editors work with large buffers which include the
> > newline characters inline, but that's not the way kate works and i doubt
> > we'd be changing it. Perhaps if another editor was to implement the
> > ktexteditor interface, it would be more efficient for them to go with the
> > plain QString version...
>
> I have 2 problems with stringlists:
> - what if the strings inside them contain linebreaks? how to handle this?
A few options:
* we remove them (probably my preferred option)
* we add a second line (ie. mixed QStringLists and '\n')
* we make the behaviour undefined
> - is that really convenient for normal usage? if you insert a blob of
> text, atm it's easy (at least of the splitting works), later, each client
> app needs to split the lines itself, don't think that makes life much
> easier for app devs
QString blob = getBlob();
setText(blob.split('\n'));
but still, I think keeping at least the setText(QString) function makes sense
- for large strings which haven't already been split, it's faster.
Perhaps we should provide both?
I've committed what I've done (because I had lots more changes as well), so
take a look... easy to remove if we decide against it.
Cheers,
Hamish.
[Attachment #5 (application/pgp-signature)]
_______________________________________________
Ktexteditor-devel mailing list
Ktexteditor-devel@kde.org
https://mail.kde.org/mailman/listinfo/ktexteditor-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic