Re: Help with Quanta+ code

Andras Mantia <[email protected]>
Newsgroups gmane.comp.kde.devel.quanta.user
Message-ID <[email protected]>
Hi,

On Saturday 14 April 2007, Munawar Hafiz wrote:
> I need some help understanding the Quanta+ codebase. In particular I
> have three questions.
>
> 1. Does the C/C++ code use the string library functions (strcpy,
> strcat, gets etc)?

No, they are generally avoided in favor of the QString class, which is 
safer, easier to use and works with unicode internally.

> 2. Or does it use some sort of buffer bounds checking, either by
> rewriting the string library, or checking before every buffer
> operation?

See above.

> 3. Is the bounds checking available from the first release, or it has
> been included in a subsequent release? How did the development team
> go about making this change in the code?

QString was there since always, provided by the Qt library.
Generally when coding in C++ using the Qt and KDE libraries you don't 
really have to think about boundary checking. Sure, there are cases 
when it's not a good idea to access the n+1'd element of an array, but 
this usually doesn't result in memory corruption, only in an error from 
the framework (or in certain cases the n+1 element is added to the 
array).
For strings there are only a few cases when you have to think about the 
length of the string.

Andras

-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org

_______________________________________________
Quanta mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/quanta
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBGIc1nTQdfac6L/08RAu/5AKDii9z09AKH4J7qgA4angTNPiRuxQCeNTCR
5pf1QSRbktEuc40gzEQcMJ8=
=JVFx
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.