aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickshadereffectnode.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Prefix GL-specific shader effect codeLaszlo Agocs2016-04-131-517/+0
| | | | | | | | | | | | | | | | | | | | Rename the C++ sources and classes. The QML type name remains the same. No changes in functionality. The shader effect, node, material (and uniform animator and particles and bits and pieces here and there...) are highly interconnected and do not follow the usual design practices for Quick and the scenegraph and the adaptation layer. Therefore while we aim for keeping full compatibility for GL apps, other backends will likely get a different ShaderEffect item implementation. The C++ class QQuickShaderEffect itself is currently a dummy with an unchanged API. It is not in use for now but forms the basis for the implementation for other backends. This will be covered in future commits. Change-Id: Ia39ce4b303f8f33e2f241d11e35fa62423e43127 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-081-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change also fixes the build of two benchmarks, tst_affectors and tst_emission. Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro src/qml/qml/ftw/qhashfield_p.h tests/benchmarks/particles/affectors/tst_affectors.cpp tests/benchmarks/particles/emission/tst_emission.cpp tests/benchmarks/qml/pointers/pointers.pro tests/benchmarks/qml/pointers/tst_pointers.cpp tests/benchmarks/qml/qmltime/qmltime.pro tests/benchmarks/qml/qquickwindow/qquickwindow.pro Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
| * Move Qt Quick resources under the :/qt-project.org/ directoryGiuseppe D'Angelo2016-04-011-2/+2
| | | | | | | | | | | | Change-Id: I7c7745264ff66b7db042e19f6d44124fa78bb86c Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Fix crash in hasAtlasTextureAlbert Astals Cid2016-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for the QSGTextureProvider not being 0 before asking for its texture, we are doing the same in the loop of QQuickShaderEffectMaterial::compare so it was forgotten to do it here. Valgrind trace of the crash i get without it ==26317== Invalid read of size 8 ==26317== at 0x652B73A: hasAtlasTexture(QVector<QSGTextureProvider*> const&) (qquickshadereffectnode.cpp:49) ==26317== by 0x652BABC: QQuickShaderEffectMaterial::compare(QSGMaterial const*) const (qquickshadereffectnode.cpp:396) ==26317== by 0x63D1BF6: QSGBatchRenderer::Renderer::prepareOpaqueBatches() (qsgbatchrenderer.cpp:1525) ==26317== by 0x63DE7A7: QSGBatchRenderer::Renderer::render() (qsgbatchrenderer.cpp:2611) ==26317== by 0x63E9D3E: QSGRenderer::renderScene(QSGBindable const&) (qsgrenderer.cpp:208) ==26317== by 0x63EA58A: QSGRenderer::renderScene(unsigned int) (qsgrenderer.cpp:168) ==26317== by 0x63FAA7D: QSGRenderContext::renderNextFrame(QSGRenderer*, unsigned int) (qsgcontext.cpp:558) ==26317== by 0x644540A: QQuickWindowPrivate::renderSceneGraph(QSize const&) (qquickwindow.cpp:383) ==26317== by 0x641541A: QSGGuiThreadRenderLoop::renderWindow(QQuickWindow*) (qsgrenderloop.cpp:378) ==26317== by 0x6416520: QSGGuiThreadRenderLoop::event(QEvent*) (qsgrenderloop.cpp:474) ==26317== by 0x605F488: QCoreApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1) ==26317== by 0x605F5BA: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1) ==26317== Address 0x0 is not stack'd, malloc'd or (recently) free'd Change-Id: I3b07450438d98910fbbff9f8b7a3d9d851ed4e5d Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-0/+1
|\| | | | | | | Change-Id: Icfa1d61fcc286c3418d4a625de11d2191336fa60
| * Ensure ShaderEffect correctly updates with supportsAtlasTexture.Michael Brasser2016-03-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given a simple ShaderEffect with supportsAtlasTexture: ShaderEffect { property variant source: myImage supportsAtlasTextures: true } ensure the atlas subrect used by the ShaderEffect is updated if myImage.source changes. Change-Id: I4560b80ba38c3487b16f53411451fb9891920738 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Updated license headersJani Heikkinen2016-01-191-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Ensure we call updateTexture for all dynamic textures.Michael Brasser2015-11-131-1/+1
| | | | | Change-Id: I888dc4b1dbc49deeb13f967b0da34cd2273f1680 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-261-22/+28
|\ | | | | | | | | | | | | | | Conflicts: tests/auto/qml/qml.pro tools/qmlprofiler/qmlprofilerclient.cpp Change-Id: Id47f15a5ab38f8ec79f0a26c92805acba62caac4
| * Make it possible to change sources of ShaderEffect again.Gunnar Sletta2015-10-201-22/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 92433623b31388e2e8c4d532033dad6189eaab24 introduced a bug where an unused material would clear its typeid pointer. This resulted in that a changed shadereffect would in all likelyhood get the same pointer for its changed shader which would result in using the same GL shader inside the renderer. This change rewrites the logic so that the cache is per render thread and the cache is cleaned up along with other GL/SG resources as part of scene graph invalidation. Task-number: QTBUG-48856 Change-Id: Id2feb14f584b5f5c176e8176cc9f1b54abd0d079 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Add missing QVector::reserve() callsSérgio Martins2015-06-051-1/+3
|/ | | | | Change-Id: Iab7c9949941559b4773e5d4a0406dc58cfc70adb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QtQuick: Fix const correctness in old style castsThiago Macieira2015-05-131-1/+1
| | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c9589afabc7ade Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Avoid QQuickItem in materials's compare() on the render threadGunnar Sletta2015-05-041-5/+21
| | | | | | Task-number: QTBUG-44664 Change-Id: I4438e666b75fdf2e8d4353e64454d4c665a24350 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix a memory leak in the material shader cache.Robert Griebl2015-04-231-3/+25
| | | | | | | | | | | There were multiple problems in the implementation of the shader cache: 1) it was not thread-safe 2) nothing was ever removed from the hash 3) since the keys into the hash are the actual shader source code, problem #2 would lead to serious memory consumption over time Change-Id: I20d1fb2074932e23f89edddba12e68ab8adcbff0 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Allow batching ShaderEffects without atlas samplersJocelyn Turcotte2014-12-181-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is currently necessary to set supportsAtlasTextures to enable batching of all ShaderEffect, even if they sample a ShaderEffectSource or have no sampler uniform at all. After fccbe57258c10e18ccdbbec405f5522dbd97af66 it is not necessary to set the RequiresFullMatrix flag based on supportsAtlasTextures since this now prevents batching altogether. Limiting batching should however also first verify that there are any sampler of the atlas used on that ShaderEffect in QQuickShaderEffectMaterial::compare, since that check wouldn't have any effect in QQuickShaderEffect::updatePaintNode through RequiresFullMatrix. Also make sure that using texture()->normalizedTextureSubRect() as the texture coordinate attribute is synchronized with calls to removedFromAtlas for all samplers and make sure that this only applies when the texture count == 1. This fixes a bug where setting supportsAtlasTextures on a ShaderEffect with more that one sampler would incorrectly use the texture coordinates of the first atlas texture in the geometry. This patch also removes: - The unneeded check for the RequiresFullMatrix in compare; the same program can be used in batched geometries and the renderer itself will prevent merging in that case. - The possibly heavy string comparison of m_source; QQuickShaderEffectMaterial::type() and QQuickShaderEffectMaterialKey are doing that for us more efficiently. I updated the documentation to clarify the 1-texture rule and explain the difference with qt_SubRect uniforms and when one or the other should be used. Change-Id: I85a86b8e7cb76f1536d5fcd369c7889f22537846 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-111-22/+16
|\ | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickpainteditem.h src/quick/items/qquickshadereffectsource.cpp src/quick/items/qquickshadereffectsource_p.h Change-Id: If98096443afe85fc4370cef971eace050006a61b
| * Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
| * Cleanup: Separate the sub-tree layering out of QtQuick into the scene graphSimon Hausmann2014-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | This basically renames QQuickShaderEffectTexture to QSGDefaultLayer and introduces QSGLayer as interface to be used. QQuickShaderEffectTexture is generic for the scene graph and has no QtQuick dependencies. The interface separation allows scene graph backends to customize layers. Change-Id: I9a7f37addaa4b80a34ff9a1456b0cb9b16d4e9f3 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * Fix memory corruption in shader materials.Gunnar Sletta2014-08-191-2/+4
| | | | | | | | | | | | | | | | | | | | Change ee616b3905106a3eedef9ee964ab283ef45c7dbc accidentally removed the member variable used to refcount the attribute names. This resulted in the names being deleted and the stored const char *'s to become invalid. Add it back. Change-Id: Ie33f75cd76085283a5ee685602e023bb3c42c896 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Merge branch 'origin/5.4' into devFrederik Gladhorn2014-08-211-1/+10
|\| | | | | | | | | | | | | | | This merges 0af61d773fc7263573afc6b7a973451783bf7424 since there is a circular dependency introduced with a111b1b108f2d3344cb2b2b677e738fd9dd68945 in qtquickcontrols. Change-Id: Ia4fcad8df69326fba3f6b5927151e9d98206e872
| * Add more complete comparison function to QQuickShaderEffectMaterial.Michael Brasser2014-08-121-1/+10
| | | | | | | | | | | | Task-number: QTBUG-37914 Change-Id: I3646991a9a7e43dcc5681fca0d8a5e24c9a427bd Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Add Q_DECL_OVERRIDEAlbert Astals Cid2014-08-141-6/+6
|/ | | | | Change-Id: I2e64950aef710f943c3bc50bc9bf8a1f7fb58d28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Allow simple ShaderEffects to be batched by the renderer.Michael Brasser2014-08-071-6/+31
| | | | | | | | | | Identical ShaderEffects that use the standard vertex shader with a single source texture, and that set supportsAtlasTextures, are now candidates for batching. Task-number: QTBUG-37914 Change-Id: Ib0ce58647a8c7c48e88bd84cf2645f1a8f28691f Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Verbose fatal instead of crash when the scene graph state is invalid.Gunnar Sletta2014-07-041-0/+7
| | | | | Change-Id: I9a55bcbf9e94084c0cadac561e4707d47f5f8744 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Avoid direct GL calls in QuickLaszlo Agocs2014-05-231-8/+8
| | | | | Change-Id: I9b8673fb3292c9d5ad2f9e8e63f56dc661699be6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Drop the "missing provider" warning from ShaderEffect.Gunnar Sletta2013-12-031-1/+0
| | | | | | Task-number: QTBUG-34676 Change-Id: I5f1c2f9ebe6048da5d5c1d1ea5e4799eacea3e8b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add support for quaternion in ShaderEffectGunnar Sletta2013-11-141-0/+6
| | | | | | Task-number: QTBUG-32605 Change-Id: I4e90a3505740dd9a8b369dac6ce05ce066d14d44 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Refactor shaders into seprate GLSL source filesSean Harmer2013-10-311-10/+6
| | | | | | | | | | | | | | | | | | | | | | The default implementation of QSGShaderMaterial::vertexShader() and fragmentShader() now loads the GLSL source from a list of source files that can be specified via the setShaderSourceFile() or setShaderSourceFiles() functions. Multiple shader source files for each shader stage are supported. Each source file will be read in the order specified and concatenated together before being compiled. The other places where Qt Quick 2 loads shader source code have been adapted to use the new QSGShaderSourceBuilder, which is also used internally by QSGMaterial. This puts Qt Quick 2 into a better state ready to support OpenGL core profile and to load different shaders based upon OpenGL version, profile, GPU vendor, platform, etc. Change-Id: I1a66213c2ce788413168eb48c7bc5317e61988a2 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Respect Qt.vector2d as input to ShaderEffect uniforms.Gunnar Sletta2013-10-031-0/+3
| | | | | Change-Id: I7c24f822424d36cf16648d17df161f15083b0da5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Support opt-in QSGNode descriptions without breaking binary compat.Gunnar Sletta2013-08-121-2/+2
| | | | | | | | | | This define is quite useful for debugging scene graph internals, but it is disabled by default to conserve memory. For clarity, I renamed the define to QSG_RUNTIME_DESCRIPTION. Change-Id: Ie5ff44d67af38adc65d0d09255d8533dc7a33bff Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix other warnings in qtdeclarative found by GCC 4.7Thiago Macieira2012-12-231-1/+1
| | | | | | | | | | | | | qml/qml/qqmlimport.cpp:982:30: error: unused parameter 'errors' [-Werror=unused-parameter] quick/util/qquickanimationcontroller.cpp:66:6: error: unused parameter 'job' [-Werror=unused-parameter]' quick/items/qquickshadereffectnode.cpp:160:17: error: case value '38' not in enumerated type 'QVariant::Type' [-Werror=switch] quick/items/qquickwindowmanager.cpp:286:60: error: 'renderTime' may be used uninitialized in this function [-Werror=maybe-uninitialized] quick/items/qquickitem.cpp:5267:67: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] and a few more repeated from the above Change-Id: Id1950c6ba98f7f8475975716b21bd795ecb4bd20 Reviewed-by: Alan Alpert <aalpert@rim.com>
* Reduce number of relocationsMarc Mutz2012-11-231-2/+2
| | | | | | | ...by turning pointer into array variables. Change-Id: Ia5a0cedcf28d54210cc1f179db5c519e7e0672cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Expose QMatrix4x4 properties as mat4 uniforms in shadersChris Adams2012-11-221-0/+3
| | | | | | | | | | Previously, QMatrix4x4 properties were not exposed as uniforms in shaders. This commit adds conversion code for matrix 4x4 properties so that they are automatically converted to mat4 uniforms. Task-number: QTBUG-27952 Change-Id: I9b1de39fbbcb02743cf8c4e09b4d83c44f1dd438 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add support for using atlas textures directly in ShaderEffects.Kim Motoyoshi Kalland2012-06-111-24/+38
| | | | | Change-Id: Ib2b68c13513e2c1102264a3eb1d91ed840134159 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fixed crash when using 'var' property in ShaderEffect.Kim Motoyoshi Kalland2012-04-041-113/+96
| | | | | | | | Also made CustomParticle and ShaderEffect share some code. Task-number: QTBUG-23924 Change-Id: I975f71f031b379cf5e29302a9c931e4ead5437ea Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Don't qobject_cast an object being destructedKent Hansen2012-03-281-1/+0
| | | | | | | | | qobject_cast will cause the object's virtual metaObject() function to be called. Calling virtual functions in a destructor should be avoided. (The qobject_cast fails, and the assert is triggered.) Change-Id: I04a7604adb8884cd36731577303793c74c0a8673 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Free ShaderEffectSource FBOs when no longer needed.Kim Motoyoshi Kalland2012-03-211-0/+14
| | | | | | | | This commit also fixes handling of texture provider deletion in ShaderEffect. Change-Id: Ib22a9308a35325972bc545cf29de11bd625b22b2 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-1/+1
| | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Switch to QMetaType::TypeAlan Alpert2012-02-081-12/+15
| | | | | | | | Looks like this change was made to QVariant for Qt5, slight behavioural difference because floats are now a separate case. Change-Id: Ia9d420b03454c13c97515ab9c89b743a668b37e2 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Added a few material flagsGunnar Sletta2012-01-201-1/+1
| | | | | Change-Id: Id324ebb82df985f1a7380761cc4923f60c7d1f20 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Update copyright year in Nokia copyright headers.Jason McDonald2012-01-171-1/+1
| | | | | | | | Update copyright headers from before 2011, and a couple of new ones that were merged after the previous change to copyright headers. Change-Id: Ia76e08e2734afa4ef3f1207dbcda5ff3bc81b366 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Added log and status properties to ShaderEffect.Kim Motoyoshi Kalland2012-01-161-2/+88
| | | | | | | Task-number: QTBUG-23531 Change-Id: I136f6d9642ff9d4074fe8dae1f5714a05349107a Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Introduce layerering support (ShaderEffectSource) directly in ItemGunnar Sletta2012-01-031-1/+1
| | | | | | | | | | | | | This is enabled by doing "Item.layer.enabled: true". The implementation is solely based on the existing shader effect (source) and simply swaps in a sibling next to the item when enabled. This change also adds the QSGTextureProvider to the public API, as it is now a natural part of the QQuickItem API since all items can be textures. Change-Id: I26705c11e92d5623a5121300acc123782b784077 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Say hello to QtQuick moduleKent Hansen2011-12-021-0/+317
This change moves the QtQuick 2 types and C++ API (including SceneGraph) to a new module (AKA library), QtQuick. 99% of this change is moving files from src/declarative to src/quick, and from tests/auto/declarative to tests/auto/qtquick2. The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to a plugin, src/imports/qtquick2, just like it's done for QtQuick 1. All tools, examples, and tests that use QtQuick C++ API have gotten "QT += quick" or "QT += quick-private" added to their .pro file. A few additional internal QtDeclarative classes had to be exported (via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the QtQuick 2 implementation. The old header locations (e.g. QtDeclarative/qquickitem.h) will still be supported for some time, but will produce compile-time warnings. (To avoid the QtQuick implementation using the compatibility headers (since QtDeclarative's includepath comes first), a few include statements were modified, e.g. from "#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".) There's a change in qtbase that automatically adds QtQuick to the module list if QtDeclarative is used. Together with the compatibility headers, this should help reduce the migration pain for existing projects. In theory, simply getting an existing QtDeclarative-based project to compile and link shouldn't require any changes for now -- but porting to the new scheme is of course recommended, and will eventually become mandatory. Task-number: QTBUG-22889 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>