[Qt5-feedback] The #include directives for Qt Essentials and Qt Add-on modules

Andre Somers andre at familiesomers.nl
Sun Jul 3 10:00:14 CEST 2011


Hi,

Op 3-7-2011 1:22, Craig.Scott at csiro.au schreef:
> On 01/07/2011, at 10:30 PM,<lars.knoll at nokia.com<mailto:lars.knoll at nokia.com>>  <lars.knoll at nokia.com<mailto:lars.knoll at nokia.com>>  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.
I like the "All", but why prepend the module name again then? This looks 
quite clear to me:

QtGui/All
QtCore/All
QtAddons/MyAddon/All


André



More information about the Qt5-feedback mailing list