aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Document limits of QSGGeometry::setLineWidth5.4Kai Koehne2015-06-041-2/+8
| | | | | | Task-number: QTBUG-46260 Change-Id: Ib84a41da10d38391c3248a209a851f5b603d46b0 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Doc: Added the missing \brief and \image to the example docsVenugopal Shivashankar2015-06-021-1/+2
| | | | | | Task-number: QTBUG-41996 Change-Id: Ica6e069c7753a2004a4a4c0e93a49d1f240569d3 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Avoid calling potentially pure virtual methodDavid Edmundson2015-04-271-18/+9
| | | | | | | | | | | | | | | | | In Qt 5.4 screenChanged is called indirectly from the destructor of QPlatformScreen. By comparing new values against the oldScreen we call call virtual methods of QPlatformScreen from it's own destructor which results in a crash. This patch simply emits change signals whenever a screen change regardless of whether the value differs from the previous screen. Arguably less efficient, but better than crashing. This fix is not needed in Qt 5.5 where the QPA architecture has changed. Task-number: QTBUG-45753 Change-Id: Ic155906928855a377add9b21bff9e72b31f4667e Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Don't send deferred delete events from windowDestroyed()Andy Shaw2015-03-302-7/+1
| | | | | | | | | | | This is a follow-up to 657766f19b31d83f361fd3c9ad717b207e1dff8c which removed it from the destructor itself. This goes one step further and removes the calls from the windowDestroyed() calls which also sends the deferred deletes. Task-number: QTBUG-40920 Change-Id: I491b79bb600914575ba5565d2862d041726217e8 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Always remove reply from replies when processing cancelledAlbert Astals Cid2015-03-301-3/+5
| | | | | | | | | | Otherwise we if we leave the entry in replies later QQuickPixmapReader::networkRequestDone will give a potentially already deleted pointer in replies.take(reply) which will then crash when trying to post something to it Change-Id: I157a58e3ebe0a3fd6422742843eafbbdc58a7801 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Make sure we deref an item from its window.Gunnar Sletta2015-03-061-3/+2
| | | | | | | | | | | | | | | | | We should compare against our own window, not our parent's. The ref/deref logic for items is there to aid us with having "property var foo: Image { }" in ShaderEffects, where the property is a parentless member of a given window. The shader effect would ref all member properties which are used as samplers, giving these items the same d->window as itself. As a consequence, it is wrong to check the old parent's window when it is the item itself that knows which window it is attached to. Change-Id: Ic34354fd86b52a7334f9757bf408bef0e25ecfd5 Task-number: QTBUG-43376 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Fix crash in overdraw and change visualizersDaiwei Li2015-02-251-2/+2
| | | | | | | | It appears to be possible for node->element()->batch to be NULL Task-number: QTBUG-43129 Change-Id: If6e4e265a02ee305bf3aa9cad387b7a73648367a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix memory leak of QSGContext object in QSGThreadedRenderLoopjian liang2015-02-242-0/+6
| | | | | | | Add destructor for QSGThreadedRenderLoop to destory QSGContext object. Change-Id: I479947eb35a5d7888d45655a9b8e2ece5e30bc33 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* docs: Add a link to Drag and DropArea in MouseArea's drag sectionSérgio Martins2015-02-171-0/+2
| | | | | | | They are related subjects so deserve a mention. Change-Id: I52f338402c8568f54dfd4b91845f9fafa762ca4d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Doc: fix exampleJoerg Bornemann2015-02-161-1/+2
| | | | | | Change-Id: I818e0a3235060fa48c61d4f21f1202d976b15d5e Task-number: QTBUG-38456 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix width/height property assignment during animations.Aaron McCarthy2015-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | During animations the behavior of anchors.fill: parent and width: parent.width height: parent.height can be different resulting in subtle UI bugs where the final value of a property is not applied because it is within epsilon of the previous value. Fixed by directly comparing the width and height instead of using operator==(QSize, QSize) which does a fuzzy comparison. Change-Id: I4288b93db2b7baacd9f71ae1932ae743a428313a Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.4.1' into 5.4Frederik Gladhorn2015-02-101-1/+1
|\ | | | | | | Change-Id: I127c746c4131fc907ea4b6713d307f12a4760666
| * QQuickTextItem: fix crash on polishingGiuseppe D'Angelo2015-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | The "d->extra" pointer is lazily allocated, hence we must check if it's valid before dereferencing it. Task-number: QTBUG-44128 Change-Id: Id69c91e889193b0e9b73ed178c0ff3b13003227f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Doc: fix a file name of an imageLiang Qi2015-02-061-0/+0
| | | | | | | | | | Change-Id: I6c93fd9d97649eee819a48863b92bde533dabe63 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Fix regression where QQuickScreenAttached overwrites QScreen valuesAlbert Astals Cid2015-02-062-2/+10
| | | | | | | | | | | | | | | | | | | | Up to Qt 5.3 it was fine setting the orientationUpdateMask in QScreen in C++, with 5.4 that value is always discarded and overwrote with 0, this change makes it possible to still set the orientationUpdateMask value in C++ and not have it overwritten unless specifically changed from QML Change-Id: I134290ce91be8b91df4e9e8e71120753813f48d7 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Fix crash when QQuickWindow::updatePolish() deletes QQuickItems.Gunnar Sletta2015-02-061-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an item is deleted as a result of an updatePolish() call, it will be removed from the itemsToPolish set. However, updatePolish() internally works on a copy of the itemsToPolish set because changes to the set would invalidate its iterator. Because it is a copy will still contain the deleted item. Fix this by simplifying the algorithm to instead pick items one by one from the itemsToPolish set until it is empty. The recursion guard has been increased because we're not decrementing it for every single QQuickItem::updatePolish() call. Task-number: QTBUG-42913 Change-Id: If7ab7f7616b01daf4d3ed843f927c163dfb03843 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Doc: link issues qtdeclarativeNico Vertriest2015-02-048-31/+29
| | | | | | | | | | | | Task-number: QTBUG-43810 Change-Id: I154ffa83512435c3e455937a3f81931a45d9e368 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | TextInput: update the baseline offset when vertical alignment changesJ-P Nurmi2015-02-031-0/+1
| | | | | | | | | | Change-Id: I2153e879c7ad8b770d5ca47dac68f994bb171b2d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Fix Text wrapping when growing from 0 width.Michael Brasser2015-02-031-1/+1
| | | | | | | | | | | | | | | | The fix for QTBUG-30896 caused a regression in the test case. Now check both width and implicit width validity before resetting widthExceeded. Change-Id: I4aba2aad299746906cfe20e288fa60cfe2acc64f Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | Doc: Fixed a broken link about sprite sheet scriptLiang Qi2015-02-021-8/+6
| | | | | | | | | | | | Change-Id: Ia574bee49f9c509c83bf9818442fbd314a0259b7 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Fix vertical positioning of the first image in TextJoni Poikelin2015-02-021-1/+1
| | | | | | | | | | | | Task-number: QTBUG-38528 Change-Id: Ie16000cf9ba20598da51683751a8fb62798a1322 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | Ensure that Canvas has the correct size with complex bindings.Mitch Curtis2015-01-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a Canvas is a child of an item with certain width and height values (as described in the bug report), it won't paint correctly. For example, the order of events might occur like so: 1. Canvas width set to 1 2. Canvas height set to 1 3. Canvas width set to 32, which causes the height to also be set to 32 Every size change causes QQuickCanvasItem::geometryChanged() to be called, but the third event above causes it to be called recursively, such that the most nested call results in the size being 32x32, but then the execution returns to the first call and 32x1 is used instead, overwriting the correct size. We fix this by setting the new canvas size to width() and height(), ignoring the recursion and instead using the latest size of the item. Change-Id: Iebbcbfaa3217319b32b97f6b68f7a8af197a0e89 Task-number: QTBUG-42878 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Canvas: don't crash when getContext("2d") is called on destruction.Mitch Curtis2015-01-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'd assume that a Window existed when that's not always the case. For example: import QtQuick 2.4 import QtQuick.Window 2.2 Window { Loader { sourceComponent: Canvas { Component.onDestruction: getContext("2d") } Component.onCompleted: active = false } } Change-Id: I5f30876e21ced5658adfa3bac494fd4196e0a7e3 Task-number: QTBUG-42222 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* | Avoid sRGB usage when targeting an incapable FBOLaszlo Agocs2015-01-261-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Native text rendering results in very different output on OS X with QQuickWidget/QOpenGLWidget. When targeting an FBO, enabling sRGB is futile if the FBO was not created with the correct format. In this case we need to disable the usage of sRGB. Task-number: QTBUG-42861 Change-Id: I887482e70be2cbfba40d6758546128d03b36def1 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | 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 docs for QQuickWindow::RenderStageLaszlo Agocs2015-01-211-6/+6
| | | | | | | | | | Change-Id: I55265f16de153289b3e6f80d510d428f48492bbb Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Doc: link issues qtdeclarativeNico Vertriest2015-01-201-1/+1
| | | | | | | | | | | | | | | | Added modules to depends stat. qtquick.qdocconf Task-number:QTBUG-43810 Change-Id: If6010a382e2c9011b7599f25eb31ba9c9c3b3eb0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Fix grammar in Keyboard Focus documentation.Mitch Curtis2015-01-201-1/+1
| | | | | | | | | | Change-Id: Ia15e5fbe9b241f99bd0c43b427e20273fa35ac67 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* | Doc: Rename section title 'Text' to prevent incorrect linkingTopi Reinio2015-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Other modules use 'Text' as a link target, with the intention to link to the Text QML type. This change renames a section title on the "What's New" page. This way, links to 'Text' will always be resolved to the correct page. Change-Id: I69738d91cb3c01db794c38331a448c9f954fbd2b Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Scale mipmapped npot images when not supportedLaszlo Agocs2015-01-191-2/+11
|/ | | | | | | Task-number: QTBUG-43847 Task-number: QTBUG-40789 Change-Id: Iceacaa49bafffb31752a9fb26c896df570153fec Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Make opengl context current in context2d's toImage if necessaryUlf Hermann2015-01-121-4/+26
| | | | | | | | | | With the basic render loop the scene graph thread is the render thread and thus we don't get a different opengl context for context2d in immediate/fbo mode. We have to make sure the opengl context is current when we call flush() from functions exposed to JS. Change-Id: Idd91cf1ce9c299a7645cf3b78d4498652376b17e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix timing output from windows render loopLaszlo Agocs2015-01-111-1/+1
| | | | | | | Print the frame time, not the total, and in milliseconds. Change-Id: Ia7fe3bea8efafcce475c49517d7adab1b3841729 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix grammatical error in Text and TextEdit documentation.Mitch Curtis2015-01-092-2/+2
| | | | | Change-Id: I6fd68166108a060931cd6bcd64ccd865d251a4c3 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* TextEdit: fix construction time text cacheJ-P Nurmi2015-01-081-1/+1
| | | | | | | | | | | QQuickTextEdit does not apply cached text to the underlying document until component construction is complete. However, if text() was called during the construction (eg. because of a binding), it would blindly overwrite the cached text with (still) empty document content. Task-number: QTBUG-41583 Change-Id: I6c5c1b6283d70d8a5ec2c8bd986095ee3c35a14c Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Doc: Updated the snippet to call the right functionVenu2014-12-181-1/+1
| | | | | | Change-Id: I0ac6424e728b8a06f6bcbe30d036a22f649129bb Task-number: QTBUG-43406 Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
* Fix QQuickText alignment when lineHeight is setDaiwei Li2014-12-162-3/+15
| | | | | | | | | | | Text is always aligned to the top of the lineHeight rectangle, and no offset is added when verticalAlignment is set to AlignVCenter or AlignBottom. This change adds an offset based on the lineHeight and font height in those cases. Task-number: QTBUG-42050 Change-Id: Ibc63c80d4178b0f5c498cc126156df828855fd76 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Add hiDPI @2x retina image support to AnimatedImageMarko Kangas2014-12-101-1/+8
| | | | | | | | | Copied hiDPI image support from base Image-class in to overwritten load() function that ignored it before. Change-Id: Iee89b572b523bbf990b6dd0e94c59c71f2b2ed31 Task-number: QTBUG-43104 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix the visualization of unmerged batch geometries without indexJocelyn Turcotte2014-12-092-2/+5
| | | | | | | | | | | | indexData() is null for most QSGGeometryNodes subclasses in QtQuick, make sure that we draw using vertex array data in that case. The patch also increases the contrast of the line pattern, since it is almost invisible with brighter hue values, to make it easier to see which batches aren't merged. Change-Id: Ife7b26692ee318feb0810ee0e787289eb151ea8a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into ↵Simon Hausmann2014-12-093-4/+4
|\ | | | | | | refs/staging/5.4
| * Merge remote-tracking branch 'origin/5.4.0' into 5.4Simon Hausmann2014-12-053-4/+4
| |\ | | | | | | | | | Change-Id: I5978bab8a4fde4c2ee33907fd81f49cb69e4fb26
| | * qttest: make findChild available only for QtTest 1.1Fawzi Mohamed2014-12-051-2/+2
| | | | | | | | | | | | | | | Change-Id: I4ceb1a969bd4296b82f899088b02b5e8cf100bcd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Update plugins.qmltypesKai Koehne2014-12-052-2/+2
| | | | | | | | | | | | | | | | | | Change-Id: I9b6c54b572d4653d609b154000e274b9e64d591f Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Avoid string-based connect in QQuickImageBase.Michael Brasser2014-12-082-6/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | 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 QtQuick2 module unload supportChris Adams2014-12-044-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit ensures that the value type providers installed by the QtQuick2 QML module during initialization are uninstalled when the plugin is unloaded. It also fixes a bug in the type compiler so that it now works with types from plugins which get unloaded and then reloaded. Task-number: QTBUG-43004 Change-Id: I4b3fb75aae65dfbc5de9c88701ed82514087ab7d Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* | Error out when trying to set an item as its own parentFrederik Gladhorn2014-12-031-1/+1
| | | | | | | | | | | | Task-number: QTBUG-43063 Change-Id: I92a33047ac7fa2afeff4986b6e42c07afbc59918 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | QtQuick.Window: add missing documentation for Window methodsShawn Rutledge2014-12-031-19/+102
| | | | | | | | | | | | | | | | | | | | | | Several more methods/slots are inherited from QWindow but are not documented for the QML Window type. Also some other documentation improvements. Task-number: QTBUG-40093 Task-number: QTBUG-42426 Change-Id: Ib753be269cbc41ee540e6556e0ef483758eefe62 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge remote-tracking branch 'origin/5.4.0' into 5.4Simon Hausmann2014-12-022-2/+2
|\| | | | | | | Change-Id: I89bbb2977350a03c156d531f810d08a5560ffbb3
| * Make effectiveDevicePixelRatio() return a qreal.Morten Johan Sørvig2014-11-302-2/+2
| | | | | | | | | | | | | | | | | | | | Fractional scale factors are not as broken as previously believed, especially for Qt Quick. Keep the door open for finding a way to support it at some point in the future. Change-Id: Ifeadcc53175ac6c25ea0288d5fe1966e3de408f9 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Don't default to HighQualitySubPixelAntialiasing on WinRTAndrew Knight2014-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The subpixel shader is probably not a good default here because most devices are mobile (can change screen orientation) and have high pixel densities. Furthermore, it breaks text rendering on the Surface RT, where the graphics hardware is too weak to support the number of uniforms the subpixel shader uses. Task-number: QTBUG-41769 Change-Id: I10210af91976ab55e611025c0452a1ee1f3114a9 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Add missing call to rendercontrolLaszlo Agocs2014-11-281-1/+3
| | | | | | | | | | Change-Id: Ic8c8e6d7a9d99216292b8b4faa2926d849333a05 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>