On 03/07/2011, at 6:00 PM, Andre Somers wrote:

> Hi,
> 
> Op 3-7-2011 1:22, [email protected] schreef:
>> 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.
> 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
> 


You need to keep the module name to support those people who want behaviour 
like it is now, ie omit the directory part and instead add the directory to the 
include search path. They would end up with something like this:

#include "QtCoreAll"
#include "QtGuiAll"
#include "MyAddon"

If the "pull everything in" header did not include the module name, all the 
headers would simply be called "All" and that would thwart the above approach. 
Whether that approach should still be supported is, I guess, a separate 
question, but it would seem worth at least giving people the option if they 
really want it. Also, it is generally a good idea to make the header name give 
at least some indication of what it pulls in, and I fear that "All" would 
simply be too generic.

--
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