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

lars.knoll at nokia.com lars.knoll at nokia.com
Fri Jul 1 14:30:50 CEST 2011


Yes, that's how it would look. And the advantage is that you only need to
specify one include path on the compiler command line.

Pushing it all into one directory is a no-go for many reasons. We're
currently talking about how the include statements would look like. That
depends on what you specifyon the compiler command line.

So instead of looking at the include statements we should probably rather
write down how the directory structure of Qt essential and Qt addon
includes look like. On Unix, they'd all be under /usr/include so something
like /usr/include/qt5/ should be the common base dir.

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


Cheers,
Lars


On 7/1/11 1:20 PM, "Haverinen Henry (Nokia-MP-Qt/Tampere)"
<henry.haverinen at nokia.com> wrote:

>Here's an update based on an IRC discussion:
>
>On 7/1/11 1:51 PM, "ext henry.haverinen at nokia.com"
><henry.haverinen at nokia.com> 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
>
>
>Cheers,
>Henry
>
>_______________________________________________
>Qt5-feedback mailing list
>Qt5-feedback at qt.nokia.com
>http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback



More information about the Qt5-feedback mailing list