Commit 7fa3aa4d authored by Kent Hansen's avatar Kent Hansen Committed by Qt by Nokia
Browse files

Clean up declarative includes


(This commit is in preparation of moving several files
to a separate library (QtQuick2).)

Don't add all subfolders to the includepath (from the
.pri files). There's no good reason to do that.

For headers (both public and private) that are in the
same folder as the file that includes them, prefer to use

 #include "foo.h"
 #include "bar_p.h"

For public headers that are outside the current folder
but have "unambiguous" names (e.g. qdeclarative prefix), use

 #include <foo.h>

For private headers that are outside the current folder, use

 #include <private/baz_p.h>

Also change

 #include <QtDeclarative/private/foo_p.h>

to

 #include <private/foo_p.h>

The header filenames already have a qdeclarative or qsg
prefix; there's no need to prefix by module name to
disambiguate.

Finally,

 #include "private/foo_p.h"

should be avoided. private/ is used for auto-generated
(forwarding) headers, which never reside in the current
(source) directory. Use angle brackets instead.

Change-Id: I04f8477fdba043546064ee276475c09dc373f8f2
Reviewed-by: default avatarJędrzej Nowacki <jedrzej.nowacki@nokia.com>
parent cbedc09b
Branches
Tags
No related merge requests found
Showing with 51 additions and 56 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment