aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickimagebase.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devLars Knoll2017-05-021-0/+2
|\ | | | | | | Change-Id: I71275a2076c3d32ee2896571be882067320a2e9e
| * Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | | | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QQuickImageBase: Avoid a signal connection altogetherRobin Burchell2017-04-281-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7568922fa240e6e9440e9c6e93bf8ec00c06ec17 already made this faster (by making it not string-based, and used when it was required). We can do one better after d870ea28656a2155c39a1aabefa1c56871a017e4, by avoiding the connection altogether, and explicitly only updating when the DPI changes. This doesn't affect qmlbench performance a great deal AFAICT (presumably because ItemSceneChange events don't just fall out of the sky); but it will help when they do happen, and it will also no longer allocate memory (for the connection). Change-Id: I043f6e22565554cee9ce6346fa7feefadfff0c7a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickImageBase: allow derived classes to affect devicePixelRatio usageMitch Curtis2017-02-241-19/+28
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickImageBase currently sets its d->devicePixelRatio member in three scenarios: - The URL uses the image: scheme (an image provider) - The URL is an svg/svgz - The URL contains the "@2x" syntax In all other cases, it sets d->devicePixelRatio to 1.0. QQuickIconImage derives from QQuickImageBase, and can display theme icons in addition to regular images. Theme icons have their own directory structure that determines what is and is not a high DPI image: https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html In particular, they use e.g. a 22x22@2 directory to indicate that the icons contained within it are high DPI images, as opposed to storing that information in the file name. To account for these images, QQuickIconImage must be able to affect the decision making progress that determines whether or not an image is loaded at a higher DPI. This patch adds a virtual function to QQuickImageBasePrivate that allows subclasses to have some control over this. Change-Id: Id45e0580c8e2ea9a96a41c54ef5fa765ce5922cf Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Port existing qmlInfo callers to qmlWarningRobin Burchell2017-01-111-1/+1
| | | | | | | | | | | | | Now that qmlInfo actually reports info messages, we want to change existing callers to use warning-level messages to preserve the original message level. This was done through: perl -p -i -e "s/qmlInfo\(/qmlWarning\(/" **/*.{cpp,h,qdoc} .. with a little care taken to only add the hunks that should be changed. Change-Id: I511cee11ce0a26ec1048cd2b84c7536b812a0d89 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Scale images correctly with sourceSize and PreserveAspectCrop/FitAlbert Astals Cid2016-11-111-6/+7
| | | | | | | | | | It also introduces a private QQuickImageProviderWithOptions to allow passing options to image providers so that they can return more fine-tuned images. This private class will disappear in Qt6 and the functionality will be merged into QQuickImageProvider. Change-Id: I619065d889d21d3a9e1f8e45fdb6076b9657c7ed Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Quick: use const (and const APIs) moreAnton Kudryavtsev2016-08-121-1/+1
| | | | | | | | For CoW types, prefer const methods to avoid needless detach()ing. Change-Id: I270cdc6eb8c5946f5c20b379bbb7c60f0ba518eb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-271-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickimagebase.cpp src/imports/layouts/plugin.cpp Change-Id: I5f48474df4034a1347ec74795c85d369a55b6b21
| * Fix high-DPI image and svg providersMorten Johan Sørvig2016-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 834f9c76 accidentally inverted a validity test by going from !isEmpty() to !isValid(). Change to isValid() which preserves the previous logic: a set sourceSize is automatically scaled by the target devicePixelRatio. Verified with: tests/manual/highdpi/imageprovider.qml tests/manual/highdpi/svg.qml Change-Id: Ie979d566418c365d4d7fc5e5c3e6a795a891db51 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Quick: replace QStringLiteral with QLatin1StringAnton Kudryavtsev2016-02-101-1/+1
| | | | | | | | | | | | | | ... in string comparisons. It's more efficient. Change-Id: I51b4f5dd79ddb8a448e59ebfc537b86b78730dfb Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | 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>
* QQuickImageBase: Add support for @3x imagesOlivier Goffart2015-12-071-28/+12
| | | | | | | | | | | | Use the qt_findAtNxFile function from QtGui. Note: this changes the behavior slightly if the file name contains '@2x' not at the end of the file name. We now check that it contains '@2x.' including the dot. Change-Id: I7e6a97d2d9c5aa0706538badf22a13e4c41824c0 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Quick: Sanitize reading environment variables.Friedemann Kleint2015-10-261-1/+1
| | | | | | | | | | | | | | Where possible, use qEnvironmentVariableIsSet()/ qEnvironmentVariableIsEmpty() instead of checking on the return value of qgetenv(). Where the value is required, add a check using one of qEnvironmentVariableIsSet()/Empty(). Move QSGAtlasTexture::qsg_envInt() to qsgrenderer.cpp for reuse as qt_sg_envInt() and add qt_sg_envFloat(). Change-Id: I4c93f16c228d4f537154f389a0fa1427654485f7 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-1/+1
|\ | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: I3e2326bc86a9d3adaafbe3830b75ce9afa81c45b
| * Image: fix crash when switching between multiple screensMitch Curtis2015-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When moving a Qt Quick application containing Image delegates in a view (e.g. ListView, GridView, etc.) between multiple screens, it's possible that the amount of visible delegates changes due to potential differences in the screens' sizes. For example, moving an application using the Window + left/right arrow keys on Windows causes the window to snap to the side of the screen. If one screen is smaller than the other, moving the application back and forth in this manner will cause some delegates to be destroyed, as they are no longer visible in the smaller screen. However, between receiving the Component.destruction signal in QML and being actually destroyed in C++, the Images may try to reload their pixmaps (when the cache property is set to false, for example). Since the views had (correctly) already hidden those delegates and hence they had no associated QQmlEngine, the load() function would crash because of the assumption that there was a valid engine. This patch checks that there is a valid QQmlEngine with which to load pixmaps before doing so. Change-Id: I8a3f0ec5220fddfd79758985c1eb2b55b0baae47 Task-number: QTBUG-45991 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QQuickImageBase: Use QUrl::path() instead of QUrl::toString().Robin Burchell2015-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | This copies less data, which is faster. Increases creation/delegates_image from 560 ops/frame to 600 ops/frame for me. Change-Id: I9c230bb9fa82fd631020881fb741857285589bca Suggested-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-301-3/+3
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/qml/qqmlengine.cpp src/quick/items/qquickitemsmodule.cpp tools/qml/main.cpp Change-Id: Ida8daf6b4d7e675385f2f5514c446e52dedaf136
| * Fix performance regression in Image construction.Gunnar Sletta2015-06-081-3/+3
| | | | | | | | | | | | | | | | Setting up the signal leads to a significant memory and performance overhead. This patch improves the benchmark by almost 10%. Change-Id: Ib0a76ba42fdce1ca707044a8f8b6bdc6405f20c3 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | QQuickImageBase: Use the static form of QFile::exists().Robin Burchell2015-06-231-1/+1
| | | | | | | | | | | | | | | | | | This avoids the penalty of creating a QFile along with a private, engine, etc when we're going to do nothing with it. This raises the delegates_image creation benchmark from ~450 to ~500 per frame for me.) Change-Id: I7665a55a3ee23102325f5d5f330967743b0c8538 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | QQuickImageBase: Minimize the cost for devicePixelRatio setting.Robin Burchell2015-06-091-8/+20
|/ | | | | | | | | | | | | * Don't convert QUrl to QString twice (that massively blows up transient allocations and is very slow) * Don't do anything at all if a sourceSize isn't set (checking it is super cheap) This fixes the performance regression (introduced in 428b92583ee2102c7ef16776a9b7785df7ff4e2c) in the delegates_image creation benchmark (from ~520 up to ~540 items per frame). Change-Id: I1cd350e42e763b7a771ff207d23e3e411810b268 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix the implicitSize of SVG Images on retina displayJocelyn Turcotte2015-05-221-1/+1
| | | | | | | | | | | | | | | | | | | If the user relies on the Image implicitSize to do the layout but still sets sourceSize to the image, the sourceSize might be (0, 0) instead of (-1, -1). readImage checks that the size is > 0 to use the requestedSize and this would cause us not to use the requestedSize, but still divide by the devicePixelRatio in QQuickImageBase::pixmapChange, which would give a different implicitSize on retina display. Make sure that we get the same implicitSize on both by only keeping the targetDevicePixelRatio if sourceSize is > (0, 0) like readImage does. Task-number: QTBUG-38991 Change-Id: Ib93f57efa47d096f88883845985b44f62db4ad74 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Optionally apply orientation on imagesAllan Sandfeld Jensen2015-05-191-1/+26
| | | | | | | | | | | | | | | Adds the option to follow EXIF orientation. This was previuosly automatically applied to TIFF images, but not JPEGs except in Qt 5.4.1. [ChangeLog][Image] An autoTransform property has been added to control whether metadata image transforms such as EXIF orientation are automatically applied. By default it enabled for TIFF images and disabled for JPEG. Change-Id: I8a4cf204985b2a7d158a0e046e52db7cda970d20 Task-number: QTBUG-37946 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-1/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| * Image: Fix that HiDPI image was not found with QRC aliasEike Ziller2015-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When using images in QRC and giving the 1x and 2x image files respective aliases but without any file extension (for example 'myimage' and 'myimage@2x'), then Image would fail to find the 2x variant. Task-number: QTBUG-44049 Change-Id: I20d0cb2eb48b909775b0ba737b850bc1b6697b35 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Fix deprecation warnings about constructing QString from const char*.Friedemann Kleint2015-02-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | types/qqmlmodelindexvaluetype.cpp: In static member function 'static QString QQmlModelIndexValueType::propertiesString(const QModelIndex&)': types/qqmlmodelindexvaluetype.cpp:47:56: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations] items/qquickimagebase.cpp: In member function 'virtual void QQuickImageBase::load()': items/qquickimagebase.cpp:213:49: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations] items/qquickimagebase.cpp:213:88: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations] Change-Id: I03266aba589ade8228bc286cd3f3f237cd06a780 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | High-dpi SVG and QQuickImageProvider ImagesMorten Johan Sørvig2015-02-131-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | Scale sourceSize by the target devicePixelRatio before passing it to the providers. Task-number: QTBUG-38127 Task-number: QTBUG-38991 Change-Id: I1746e0859b4e63eb0d28d1a1c8aac610b68a9eb9 Reviewed-by: Jocelyn Turcotte <jturcotte@woboq.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | 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>
* Avoid string-based connect in QQuickImageBase.Michael Brasser2014-12-081-5/+5
| | | | | | | | | | | | | String-based connect is relatively slow, and should be avoided in core items. This improves performance of the tst_librarymetrics_performance::instantiation_cached(043) image - empty test case (approximately halving the time). Task-number: QTBUG-43096 Change-Id: I02485c515435eceacc95c55f877fc8566e7406d7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix disfunctional QQuickRenderControl with multiple screensLaszlo Agocs2014-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | Having a retina and non-retina screen connected resulted in getting no output from QQuickRenderControl and QQuickWidget on the non-retina screen. This is caused by the fact that Quick is blindly calling QWindow::devicePixelRatio(). This approach is wrong when using QQuickRenderControl since the QQuickWindow does not have an actual native window and so devicePixelRatio() merely returns some default value which will definitely be wrong for one of the screens. The patch fixes the problem by introducing QQuickWindow::effectiveDevicePixelRatio(), which, via QQuickRenderControl::renderWindowFor, supports the redirected case too. Task-number: QTBUG-42114 Change-Id: I057e01f0a00758dde438fc9b10af3a435b06bb0b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* 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>
* Don't try to reload QQuick images when changing to null screenTaylor Braun-Jones2014-08-061-2/+2
| | | | | | | | | | | | | When a QGuiApplication is destructing, a screen change occurs causing QQuickImageBase to reload images ultimately resulting in "QPixmap: Must construct a QGuiApplication before a QPixmap". This patch fixes the issue (except for systems which multiple screens, which is a separate issue). Task-number: QTBUG-40539 Change-Id: I4bafc9790741204e90190a4491ac7a9393d0d0a7 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Add opt-out environment variable for @2x imagesMorten Johan Sørvig2014-07-031-0/+5
| | | | | | | | | | | | | | There are cases where @2x images are in use but where you don't want the associated behavior: - You are implementing an image editor - You are inheriting a resource set which has @2x images, but don't want that behavior with Qt. Add support for disabling @2x behavior with QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING. Change-Id: Ia570dfe556e0571a19e5ebdc626c4a7e626721b9 Task-id: QTBUG-38485 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix warnings about deprecated construction of QStrings from ASCII.Friedemann Kleint2014-03-271-2/+2
| | | | | | | | items\qquickimagebase.cpp(322) : warning C4996: 'QString::QString': was declared deprecated items\qquickimagebase.cpp(342) : warning C4996: 'QString::QString': was declared deprecated Change-Id: I550a13680d54ef2c3734151f56ea56ac8b9f3b9b Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Implement high-dpi "@2x" image handling.Morten Johan Sørvig2014-03-201-2/+71
| | | | | | | | | | | | | | | | | | | | | | | | Make QQuickBaseImage::load() load "@2x" image files on high-dpi displays. Reload images on screen change in order to load the correct version depending on screen dpi. Modify QQuickImageBase::updatePaintNode() to work with @2x images. QQuickBaseImage::load() now looks at the target window's devicePixelRatio and checks for the presence of a "@2x" file on disk. If found the @2x version will be used. Unlike QPixmap, QQuickPixmap has no special knowledge of "@2x" files. They pixmap system will be asked to load "@2x" files and will cache them and report the (device) pixel size, like any other pixmap. Add auto-test and manual test. Task-number: QTBUG-32862, QTBUG-33069 Change-Id: I1f57a10075e499f6eee61df5421e1986521c6ab0 Reviewed-by: Andy Nichols <andy.nichols@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>
* Disconnect from previous loading image when loading a new image.Michael Brasser2013-01-241-0/+1
| | | | | Change-Id: If2fa95d9715a55d3f07ecf5f232e4f4b9a44a6fb Reviewed-by: Gunnar Sletta <gunnar.sletta@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>
* Update SGNode after pixmap is invalidatedAlan Alpert2012-11-301-1/+1
| | | | | | | | | | If the QDeclarativePixmap on a previously valid Image is cleared, and the scenegraph updates before the networked pixmap request returns, the scenegraph can crash when trying to paint a now invalid texture. Task-number: QTBUG-27795 Change-Id: I83436f846a3e965b324ff6ebf057708fe8c3b82a Reviewed-by: Alan Alpert <aalpert@rim.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>
* Fix signal emission for the Image based items when loading.Damian Jansen2012-07-131-24/+33
| | | | | | | | | | | StatusChanged signals are now always emitted. Other properties only emit when altered. AnimatedImage local and remote loading was also unified in this fix. BorderImage duplicated loading code is streamlined. Task-number: QTBUG-26405 Change-Id: Ib412d5879e0007229a8098e1fa960003051508de Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Remove QQuickImageBase's explicitSourceSize.Robin Burchell2012-07-021-10/+2
| | | | | | | | | | | The only case where this really did anything was in resetSourceSize() to avoid resetting if it had not been set already, but this logic is already in setSourceSize too, so it's really not useful. Done-with: John Brooks <john.brooks@dereferenced.net> Change-Id: Idb86686ea5ab711ceb2390e3703e0e04f7d537bb Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Checking for QUrl equality is not all that expensive, so remove hack.Robin Burchell2012-06-261-2/+2
| | | | | | | | | | QUrl's operator== used to perform allocations by comparing normalized URLs, but even then, this code seemingly would not apply: Qt 4's QUrl still has a fast path for the case where the URLs are empty, the same as this code implemented. Change-Id: I69e82c848f47f5e5660bd707bfba0ff7343c8a42 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-5/+5
| | | | | | | | | | | | | 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>
* 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>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Say hello to QtQuick moduleKent Hansen2011-12-021-0/+290
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>