diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2011-10-12 08:26:22 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-17 12:20:11 +0200 |
commit | 7fa3aa4d48c3b7d9bf17b6135bc6bdeb62e899d2 (patch) | |
tree | e5dfde8932ae195d5f1d60e34afaa7f9a27410de /src/declarative/scenegraph | |
parent | cbedc09b7c28c178813371a6cf9c0e7de58f96cc (diff) |
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: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/declarative/scenegraph')
4 files changed, 4 insertions, 5 deletions
diff --git a/src/declarative/scenegraph/coreapi/qsgrenderer.cpp b/src/declarative/scenegraph/coreapi/qsgrenderer.cpp index 45aef3481d..b22631afae 100644 --- a/src/declarative/scenegraph/coreapi/qsgrenderer.cpp +++ b/src/declarative/scenegraph/coreapi/qsgrenderer.cpp @@ -45,7 +45,7 @@ #include "qsgnodeupdater_p.h" #include "qsggeometry_p.h" -#include "private/qsgadaptationlayer_p.h" +#include <private/qsgadaptationlayer_p.h> #include <QOpenGLShaderProgram> #include <qopenglframebufferobject.h> diff --git a/src/declarative/scenegraph/qsgdistancefieldglyphnode_p.h b/src/declarative/scenegraph/qsgdistancefieldglyphnode_p.h index a5bdf36d16..9004549a3a 100644 --- a/src/declarative/scenegraph/qsgdistancefieldglyphnode_p.h +++ b/src/declarative/scenegraph/qsgdistancefieldglyphnode_p.h @@ -44,7 +44,7 @@ #include <private/qsgadaptationlayer_p.h> #include "qsgtexture.h" -#include <qsgtext_p.h> +#include <private/qsgtext_p.h> QT_BEGIN_HEADER diff --git a/src/declarative/scenegraph/scenegraph.pri b/src/declarative/scenegraph/scenegraph.pri index d29a3bc561..d4e0707ba3 100644 --- a/src/declarative/scenegraph/scenegraph.pri +++ b/src/declarative/scenegraph/scenegraph.pri @@ -1,4 +1,3 @@ -INCLUDEPATH += $$PWD/coreapi $$PWD/convenience $$PWD/3d !contains(QT_CONFIG, egl):DEFINES += QT_NO_EGL # Core API diff --git a/src/declarative/scenegraph/util/qsgtextureprovider.cpp b/src/declarative/scenegraph/util/qsgtextureprovider.cpp index 49d157d480..5605f28602 100644 --- a/src/declarative/scenegraph/util/qsgtextureprovider.cpp +++ b/src/declarative/scenegraph/util/qsgtextureprovider.cpp @@ -41,8 +41,8 @@ #include "qsgtextureprovider_p.h" -#include <qsgimage_p.h> -#include <qsgshadereffectsource_p.h> +#include <private/qsgimage_p.h> +#include <private/qsgshadereffectsource_p.h> #ifndef GL_CLAMP_TO_EDGE #define GL_CLAMP_TO_EDGE 0x812F |