aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix trivial bug where ArrayBuffer.isView never returned falseNobuaki Sukegawa2015-07-152-1/+10
| | | | | | | | | | Change-Id: I168d2ec54997d057e3d32463c2b153df38073838 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Doc: replace Mac OS X with OS XNico Vertriest2015-07-157-7/+7
| | | | | | | | | | | | Task-number: QTBUG-40759 Change-Id: If21b4551eb95af3370cc21edd7a6721fc06e1346 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Test if the state machine reacts to a QObject signal.BogDan Vatra2015-07-154-1/+201
| | | | | | | | | | Change-Id: I4987e10ac0b31977249ce9ebe00e26de334db30d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Fix QML/JS debugging.Erik Verbruggen2015-07-121-5/+5
| | | | | | | | | | | | | | | | | | | | Converting from any ScopedObject to Object* resulted in the same pointer value. Prevent this by not using either, but instead use the QV4::Value directly. Task-number: QTBUG-47061 Change-Id: I98d3889f5504dbd5962099d30d4af9d57bc518f9 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* | V4: track C++ heap usage for Strings in the MemoryManagerErik Verbruggen2015-07-107-19/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and do a GC run when it exceeds a threshold. The issue with Strings is that they hold on to QString instances that store the real content. However, the GC only sees the light-weight JS handle, and doesn't take the size of the backing content into account. So it could happen that big QStrings accumulate in the heap as long as the GC didn't reach its threshold. The newly introduced unmanaged heap threshold is upped by a factor of two when exceeded, and lowered by a factor of 2 when the used heap space falls below a quarter of the threshold. Also grow the threshold if there is enough space after running the GC, but another GC run would be triggered for the next allocation. There is a special case for Heap::String::append, because this method will copy the data from the left and right substrings into a new QString. To track this, append notifies the memory manager directly of the new length. The pointer to the memory manager is stored in Heap::String, growing it from 40 bytes to 48 bytes (which makes it still fit in the same bucket, so no extra memory is allocated). Task-number: QTBUG-42002 Change-Id: I71313915e593a9908a2b227b0bc4d768e375ee17 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | doc: fix copy/paste error in warningGunnar Sletta2015-07-091-1/+1
| | | | | | | | | | Change-Id: I4a9a46913b589b14c879620848d76b31e435ee02 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Flickable: drag-over-bounds is not velocity-sensitiveShawn Rutledge2015-07-092-16/+34
| | | | | | | | | | | | | | | | | | | | | | The inspiration for velocity sensitivity was to make it feel more like native trackpad flicking on OS X. But on touchscreens it doesn't make as much sense, and it became too difficult to intentionally overshoot in applications that depend on pull-to-refresh functionality. Task-number: QTBUG-46108 Change-Id: I3fea5324aaac1f003ead200e14b0c76bd8c0ece6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | QtQml: Fix const correctness in old style castsThiago Macieira2015-07-0920-44/+45
| | | | | | | | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c958364a2e9859 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Fix encoding of QV4::Value in host buildsSimon Hausmann2015-07-082-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | When building on a 64-bit host targeting a 32-bit architecture, we would use QT_POINTER_SIZE == 4 from qconfig.h, which is unfortunately shared. However on 64-bit hosts the 32-bit encoding appears to result in gcc/clang to miscompile simple QV4::Value uses - when optimizations are enabled. As a workaround, let's use 64-bit encoding in all host scenarios. Change-Id: I000cf13abcc9240c931191d6361b6dee578cb5d4 Task-number: QTBUG-45364 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | Fix more casts that dropped the constness.Thiago Macieira2015-07-071-2/+2
| | | | | | | | | | | | | | Found with GCC's -Wcast-qual Change-Id: I66a35ce5f88941f29aa6ffff13dde502fccefb1d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Fix ICC warning about change of signThiago Macieira2015-07-072-3/+3
| | | | | | | | | | | | | | qv4typedarray.cpp(87): error #68: integer conversion resulted in a change of sign Change-Id: Iee8cbc07c4434ce9b560ffff13cf917dd8f9012e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Delete QQuickWindow's animator driver at the right time.Gunnar Sletta2015-07-044-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | For the non-threaded renderloops, we there might be a timer firing before the animationController is cleaned up through deleteLater() which will then reference the deleted QQuickWindow. Rely instead on direct and explicit cleanup at the right time in each render loop. Change-Id: Id81daddae78ce3922d6a932fb21200f2dc7955bb Task-number: QTBUG-33723 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | QSGSimpleTextureNode: Fix ownership of QSGTextureTobias Koenig2015-07-032-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | Make sure the QSGSimpleTextureNode deletes the old QSGTexture if a new one is set via setTexture() and the ownsTexture flag is true. [ChangeLog][QtQuick][SceneGraph] QSGSimpleTextureNode will now delete the currently set QSGTexture object, if a new QSGTexture is set and the ownsTexture flag is on. Change-Id: Iabfbccd390e16948d4575baf29e6c8b4a184a404 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Improve support for HTML entities in StyledTextKai Uwe Broulik2015-07-032-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | This adds support for the non-breaking space character (&nbsp;) and properly handling entities that do not end with a semicolon, such as a stray ampersand in a text. Change-Id: I2f157c9aa651b27511809d5a47ac07660949a290 Task-number: QTBUG-44869 Task-number: QTBUG-31816 Task-number: QTBUG-33368 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Add lancelot test for Emoji text rendering / color glyphsTor Arne Vestbø2015-06-291-0/+45
| | | | | | | | | | | | | | | | | | | | | | We test both native text rendering and distance field text rendering (which should switch to native for the emoji glyphs automatically), in various configurations of text color, opacity, and background color. Change-Id: I06178820943cd2a52cf338f7eb5c0fca881cb625 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Bump versionOswald Buddenhagen2015-06-291-1/+1
| | | | | | | | Change-Id: If10035949b42f8481dc182af3d176e68d07d71a3
* | Merge remote-tracking branch 'origin/5.5.0' into 5.5Liang Qi2015-06-2620-105/+395
|\ \ | | | | | | | | | Change-Id: I4020a1b3c59dea18faf7cbcbb78b90fcfc3680f0
| * | Version scrollGestureEnabled as a new propertyv5.5.0-rc1v5.5.0Alan Alpert2015-06-150-0/+0
| | | | | | | | | | | | | | | | | | Change-Id: I3408cf93a90327e8abbe2f8b7a85d8a84e24ae58 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | Version scrollGestureEnabled as a new propertyAlan Alpert2015-06-143-2/+4
| | | | | | | | | | | | | | | | | | Change-Id: I3408cf93a90327e8abbe2f8b7a85d8a84e24ae58 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | Make argument to QQmlDebuggingEnabler::startTcpServer an enumUlf Hermann2015-06-103-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | The bool argument is less intuitive as you don't know if e.g. true means "Yes, run the QML" or "Yes, block the QML engine". Task-number: QTBUG-46565 Change-Id: I6d268e1354cebeb794b065e118bc0c353d7dd59a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | V4: Fix use of uninitialized field.Erik Verbruggen2015-06-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Valgrind pointed out that Transition::id was used in a conditional jump or move. Fixes regressions of the following tests on OSX: ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-1 in non-strict mode ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-2 in non-strict mode ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-28 in non-strict mode Change-Id: Ia959ff6f9fdac8d4cb37f54f670fdff4c8ba9a67 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | Add a version of BitVector that uses QBitArray.Erik Verbruggen2015-06-081-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some C++ STL libraries are unable to ship a bug-free std::vector<bool>, and/or a bug-free specialization of std::find for std::vector<bool>. So, for those platforms there now is a slow version of BitVector, which relies on QBitArray, which we can fix if we find bugs. Change-Id: I5ddfb18cabe82049a7ede6083fe6ba142bca068b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | Wrap std::vector<bool> in our own class.Erik Verbruggen2015-06-081-74/+112
| | | | | | | | | | | | | | | | | | | | | | | | So we can replace the implementation when we encounter a broken version of std::vector<bool> or a broken specialization of std::find for it. Change-Id: I7d7c0af585388ddedf5167cd9863c52ab638442d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | Added auto-generated change logSimon Hausmann2015-06-041-0/+105
| | | | | | | | | | | | | | | Change-Id: I188f4137653505fd7635ad911ca41eecb89dd417 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
| * | Redirect the default FBO correctly with QQuickWidgetLaszlo Agocs2015-06-032-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similarly to QOpenGLWidget, functions like QOpenGLFramebufferObject::bindDefault() should bind the QQuickWidget's FBO, not 0, while rendering the scene graph. This becomes particularly important on platforms with surfaceless context support. Here offscreen surfaces are not backed by any surface. Therefore any OpenGL operation accessing the current draw framebuffer with FBO 0 bound may potentially crash, as there is no draw framebuffer at all. The distance field glyph cache exhibits this issue when running with EGL on Mesa: glViewport crashes when we render via QQuickWidget and the current framebuffer is reset to 0. The problem goes away when the code changed is to use bindDefault() - as it should have anyhow - and QQuickWidget is enhanced to communicate the "default" framebuffer to QOpenGLContext, just like QOpenGLWidget does. Task-number: QTBUG-46415 Task-number: QTBUG-43269 Change-Id: I35fe375a0870dadecc4a074dfdec122c6a4c92ab Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| * | Add left, right, top and bottom properties to basic QML rect type.Mitch Curtis2015-06-039-12/+82
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-45528 Task-number: QTBUG-45530 Change-Id: I83c4056b4bde37ef2dc4424ffddd823c1654d92e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Fix documentation for ItemSelectionModelGabriel de Dietrich2015-06-261-7/+12
| | | | | | | | | | | | | | | Change-Id: I28f61e1853ea2cc75fbf814f76a7ef09e0d17f5d Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* | | Correctly initialize ListView section attached properties.Martin Jones2015-06-253-13/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During item insertion, indexes of items in the visibleItems list were not adjusted before new items were created. Section initialization was broken during insertion because section calculation relies on the indexes of the items in the visibleItems list. The incorrect section properties caused spurious section header creation, and layout issues. Apply the index offset before creating the new items. This mirrors what GridView already does. Change-Id: I549a81825cf0e979bc5830840bf6cb75c7a82cac Task-number: QTBUG-43873 Reviewed-by: Bea Lam <bea.lam@jollamobile.com>
* | | Fix missing images when alpha and shader effects are involvedLaszlo Agocs2015-06-251-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once we hit removedFromAtlas() and the glCopyTexImage2D() path, bad things tend to happen with OpenGL ES, both on certain embedded devices (Beaglebone, RPi) and ANGLE. ANGLE just rejects GL_BGRA_EXT with INVALID_ENUM. So if it fails, just try with GL_RGBA. The BGRA extensions do not mention glCopyTexImage2D in any form and in plain GLES (any version) BGRA does not exist. So rejecting it may be valid, depending on how one reads the specs. Same problem on Beaglebone, where the call with BGRA fails as INVALID_OPERATION. The RPi 1 and 2 fails in a different way: the temporary framebuffer is not complete because BGRA textures are not supported as color attachments. So our only choice here is to do what we do for some Android devices already: ignore BGRA support. Task-number: QTBUG-46806 Change-Id: I89b3b38bf7f8883c39509606ec5ae525f131292b Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Doc: resize tables with overflowNico Vertriest2015-06-2519-69/+130
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-46475 Change-Id: Iebb2f7677f8b514d2b3e08480abfc98a0e155c1c Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* | | Support 32-bit color bitmap glyphs in native text rendering.Eli Fidler2015-06-234-6/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had been accidentally using the 8-bit alpha glyph shader, which resulted in rendering solid black outlines of the glyphs. Task-number: QTBUG-37986 Task-number: QTBUG-45514 Change-Id: Ie8728d50068f58d659e24bc5db2d73e01ca8db75 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Doc: document work-around for static builds using dynamic object creationRichard Moe Gustavsen2015-06-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we have no system to detect import dependencies that are not explicitly added to a QML file (other than qmldir "depends", which is for plugins only). Until we do, document the work-around. Change-Id: Ic7244728b63bd1f2eb4bf9734474b3e6e48e26fe Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | QSGDefaultRectangleNode: Fix gradient position calculationsSanttu Lakkala2015-06-173-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the gradient position calculations to consider full border, not just half of it, because the border is fully drawn inside the rectangle, not half outside, half inside. Task-number: QTBUG-36059 Change-Id: Ie7dec94d9f6e03ae07c612c6e3b1950781973dc7 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Enable high-dpi mode for qml.app on OS X.Morten Johan Sørvig2015-06-161-0/+2
| | | | | | | | | | | | | | | | | | | | | Add missing "NSPrincipalClass" key. Change-Id: If7d02470ecee9f85731626f26f2381d434db9367 Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
* | | qml: Output information about build and GL renderer in verbose mode.Friedemann Kleint2015-06-151-15/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make static contain() a member of LoadWatcher() and connect to QQuickWindow::onOpenGlContextCreated(). Print information similar to qtdiag. Change-Id: I0bc6bc43418e4392c6b5e2643d4f7899ff4f4f8b Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | | Android: Another work around bug of Vertex ShaderTakumi ASAKI2015-06-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Just like commit fd565ec6, this fixes another vertex shader compilation issue on certain OpenGL drivers. Change-Id: Ided3d6082fa0790659e9c242d0b43d7de5a2ae4d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | | Improve qml error message "invalid alias location"Aleix Pol2015-06-106-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specify we're talking about the target itself rather than talking location, which I always doubt about whether it's the location within the file. Also specify the offending property, so we get a clue about what to look into. [ChangeLog][QtQml] Improve "invalid alias location" error message by specifying what's the offending property and by calling it "invalid alias target location" Change-Id: I7a9390089ee8986872c119df44d8036bf267ab99 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Fix performance regression in Image construction.Gunnar Sletta2015-06-084-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | qml: Add options to control the GL renderer.Friedemann Kleint2015-06-041-0/+10
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-46030 Change-Id: I5af5a0ef267444d85e8da6df196229ad8199c00f Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | | qmlscene: Add option --verbose to obtain diagnostic output.Friedemann Kleint2015-06-041-2/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print the build information and connect to QQuickWindow::openglContextCreated() to print information on the GL driver (similar to qtdiag). Set a window title indicating render type and Qt version. Task-number: QTBUG-46030 Change-Id: Ib4376126bf9c63f4cab8cb530ff1da66394b634b Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | | qmlscene: Add options to control the GL renderer.Friedemann Kleint2015-06-041-18/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace boolean option controlling context sharing by a vector of QCoreApplication attributes (bearing in mind that for example High DPI changes might add more attributes) and add the GL switching attributes. Task-number: QTBUG-46030 Change-Id: I934dd8910b7b50ec96ae9e00823649c9df6a00ef Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | | tst_qquickwindow: Prospective fix for instability of cursor test.Friedemann Kleint2015-06-031-45/+95
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FAIL! : tst_qquickwindow::cursor() Compared values are not the same Loc: [tst_qquickwindow.cpp(1444)] Check that no windows are leaked in slot cleanup and fix all leaking tests. Position the window and enlarge it to fix the warning: WARNING: tst_qquickwindow::cursor() Mouse event occurs outside of target window. Add window titles to tests. Replace QVERIFY(a == b) by QCOMPARE(a, b). Change-Id: Ida892e8a8d7d5f40d4f50787608940dbffc7a29d Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* | Fix flickering when QQuickWidget becomes visibleJoni Poikelin2015-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | QQuickWidget used short delay before rendering. This caused black area to flash on the widget briefly. Instead of scheduling redraw, render scene immediately. Task-number: QTBUG-46387 Change-Id: I342d96a1aaef3244190221807b0d816815697623 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Document the render loops a bit moreLaszlo Agocs2015-05-281-6/+29
| | | | | | | | | | | | | | Task-number: QTBUG-42699 Change-Id: Ib8a1690bfe38bd0686799fac390207c26e5a6812 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Purge use of VisualDataModel from docs where DelegateModel is requiredAlex Blasche2015-05-284-9/+12
| | | | | | | | | | | | | | | | | | They are the same types except that VisualDataModel is deprecated and uses a different import statement. Now, references to VisualDataModel are only used where we explicitly refer to the replacement/deprecation. Change-Id: I1e68eb5784235a00233b3882c3d91e21e32af7d1 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Calqlatr Demo: Adjust ListView delegate height based on font sizeTopi Reinio2015-05-261-1/+1
| | | | | | | | | | | | | | | | | | To prevent the list tem text overflowing the delegate boundary. Task-number: QTBUG-45621 Change-Id: I46f35508ea49a2b435286de76dc9ab49620619a6 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Makes it possible to extract all data from a QML DropAreaAleix Pol2015-05-234-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | There's many types that aren't being covered by DropArea API, such as images. getDataAsString is not acceptable, since fromUtf8 chokes on reading non-utf8. This patch introduces getDataAsArrayBuffer method that won't try to convert the data into a QString and simply pass a QV4::ArrayBuffer, that internally keeps a QByteArray. Change-Id: I65411b3d365ee6c5e13effd9167156771ee08a05 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | 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>
* | qquickwindow: ensure we delete the correct delayed touch event after deliveryRichard Moe Gustavsen2015-05-223-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delivering a delayed touch event from QQuickWindow can cause the event loop to recurse (e.g if it starts a drag'n'drop). This again can cause new touch events to be delivered to QQuickWindow, and new delayed touch events to be stored. This results in the following: (1) Receive new touch press event in QQuickWindow, and set delayedTouch to be a copy of it (2) Deliver delayedTouch to items. This can cause an event loop recursion. (3) While inside the recursion, QQuickWindow receives another new touch press event. We then redeliver and delete the current delayedTouch event created in (1), and set delayedTouch to be a copy of the new event. (4) Later we return back from (2), and try to access delayedTouch (or actually a reference to the touchpoints inside it, qquickwindow.cpp:1958). Since the event was deleted in (3), we have a crash. This patch will ensure that we set delayedTouch to 0 before delivering it (so it cannot be redelivered), and that we safely delete it afterwards when it goes out of scope. By converting delayedTouch to a QScopedPointer we also ensure that the event is not leaked upon destruction. Task-number: QTBUG-45877 Change-Id: Ic372a39a0eb127abfd12cec2d51b3743ad83194d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Fix basic and windows render loops to use the correct screenLaszlo Agocs2015-05-212-0/+2
| | | | | | | | | | | | | | | | | | | | | | GLX, and potentially other platforms too, require that compatible contexts and surfaces are created with the same screen. This makes Quick functional on X.org configurations where each physical screen represents a separate X screen on the same X display. Change-Id: I03c87819e1aee148c880a3caca13d4a0c5409056 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>