Thought about a Qt port

Thiago Macieira thiago at macieira.org
Sun Mar 31 10:59:23 PDT 2013


On domingo, 31 de março de 2013 20.37.44, Alberto Mardegan wrote:
> Another thing that you (and especially other Qt developers here) might
> want to comment about, is the definition of C++ classes in the .cpp
> files themselves (and not in a header file).
> I usually declare and define the private classes (those that don't need
> to be visible outside of the .cpp file) in the .cpp file itself, while
> generally Qt developers (at least KDE ones) prefer to have the
> declaration in a separate header file, leaving only the methods
> definitions in the .cpp file.  I find it more annoying than helpful (it
> increases the number of files, and force switching files in the editor
> often than necessary), but might be just me.

I prefer to define classes in a .h only if you need that class used in more 
than one .cpp. Or if you need a non-included moc, which is a special case of 
the former.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130331/ce7947b5/attachment.sig>


More information about the subsurface mailing list