[Qt-interest] Qt coding guidelines/conventions
jjDaNiMoTh
jjdanimoth at gmail.com
Thu Mar 25 14:15:03 CET 2010
2010/3/25 Mandeep Sandhu <mandeepsandhu.chd at gmail.com>:
> Hi All,
>
> Me again.
>
> What coding convention/guidelines do you guys follow while writing your Qt apps?
What my company want.. coding style isn't too much important IMHO
> Also, since I no longer have the luxury of automatic garbage
> collection (ah...I miss java! :P) and guidelines on how to protect
> yourself from those nefarious memory leaks?
QObject's parenting helps a lot with this, but a bad program will ever
be a bad program, doesn't care of coding style. So, IMHO, you need to
learn to program in C++. The [1] Parashift FAQ will help you in these
steps.
> Some helpful stuff I found was using QPointer, which makes the task of
> checking for dangling pointers easy.
It is a pointer that is set to 0 when the object which it refer is
destroyed. Doesn't destroy data for you.
> I'm also looking at other 3rd party C++ libs which help in this job.
So bad, instead learn how to write good programs. Java IMHO doesn't
help too much in this, but my point of view about java is likely a
bar's discussion, which doesn't drive too far from here.
[1] http://www.parashift.com/c++-faq-lite/
--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
More information about the Qt-interest-old
mailing list