On 2015-06-18 09:07, Marc Mutz wrote: > 4. Includes: > a. <QtFoo> includes the whole module (as is the case for QtCore, ... now) > b. There's no <QtLike> include for just the namespace (with enums, free > functions, etc). To get the namespace, users include any class from the > module (much like no-one is using <QtGlobal> atm, but relies on any > <QFoo> to include it indirectly).
Are you sure? I've used <QtGlobal> a good handful of times. In general I find it helpful to be able to include just the types / macros / free functions without dragging in some random class that I don't actually care about. Reasons I have used <QtGlobal>: - I want only the macros - I want only the platform / compiler feature symbols - I want only some free function (e.g. qRound) - I want only the convenience typedefs (e.g. qint64, qreal) So I definitely would not say that there is no use for having a header with a module's global entities separate from the per-class headers. In fact, I'm annoyed that <QtNumeric> is missing... IMHO if it's a public header, it should have a <CamelCaseName> wrapper. (Well, *was* missing; it was added in Qt5, thankfully!) -- Matthew _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
