On 01/07/2011, at 10:30 PM, <[email protected]<mailto:[email protected]>> 
<[email protected]<mailto:[email protected]>> wrote:


In there, it should IMO look something like:

QtCore/Qcore
QtCore/qlist.h
...
QtGui/QtGui
QtGui/Qpainter
...
QtAddons/MyAddon/MyAddon
QtAddons/MyAddon/myheader.h
QtAddons/AnotherAddon/...


I agree with the intent, but I do question the naming convention used for the 
header that pulls in all headers for a module. Duplicating the module name as 
the "include everything" header seems somewhat confusing. How about a more 
explicit convention where we append "All" to the name (or some other 
equivalent)? So the above would become (with corrections for what I think were 
typos in your QtCore and QPainter examples):

QtCore/QtCoreAll
QtCore/qlist.h
...
QtGui/QtGuiAll
QtGui/QPainter
...
QtAddons/MyAddon/MyAddonAll
QtAddons/MyAddon/myheader.h
QtAddons/AnotherAddon/...


I think the "QtCoreAll" convention would be much clearer to devs what is being 
included. Having QtCore/QtCore just looks odd to me.

Also, I'm not sure what the intention is with the individual headers, but I 
thought Qt had moved away from the "qlist.h" form and was instead going with 
the "Qlist" form? Just wondering if the current thinking for Qt5 is to move 
back to the former? It's a bit unclear from your examples.



On 7/1/11 1:20 PM, "Haverinen Henry (Nokia-MP-Qt/Tampere)"
<[email protected]<mailto:[email protected]>> wrote:

Here's an update based on an IRC discussion:

On 7/1/11 1:51 PM, "ext 
[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>> wrote:

//Include all classes of a library in Qt Esssentials or of an add-on that
was a Qt4 library

#include <QtFoo>

This needs to be supported for source compatibility, but the correct way
that should be
promoted in the documentation is:

#include <QtFoo/QtFoo>


//include a class from Qt Essentials or from an add-on that was a Qt4 lib

#include <QSomeClass>

The correct way would be
#include <QtFoo/QSomeClass>

I updated these to the naming wiki. The add-on section is still TBD:


//Include all classes from Qt Add-on Foo
//For consistency, this should work for former Qt4 libraries too
#include <QtAddOn/Foo/Foo>

//Include a class from Qt Add-on Foo
#include <QtAddOn/Foo/QSomeClass //class name doesn't have to have the Q
Prefix



--
Dr Craig Scott
Computational Software Engineering Team Leader, CSIRO (CMIS)
Melbourne, Australia



_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to