aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Let render loop be more tolerant wrt when markDirty is called.Gunnar Sletta2014-03-272-0/+6
| | | | | Change-Id: I95f1d6fe4695a09b1b6ccaf026137dabc22ec82c Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Call tzset() from getLocalTZA() so we learn about tz changesIain Lane2014-03-271-0/+1
| | | | | | | | | | | | | | Per POSIX, localtime_r isn't required to call tzset(). This means that we don't notice that the timezone has changed when calling Date.timeZoneUpdated() from JS. Call this in getLocalTZA() so that it always returns results pertaining to the selected timezone. Task-number: QTBUG-37683 Change-Id: Ia9098ef0100b7c909a82b125a5ea4f39fba1f306 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Document limitations of QQuickWindow::createTextureXxx functions.Gunnar Sletta2014-03-271-2/+10
| | | | | Change-Id: I6813f5109cad3e4ace354337d258db8c120b52c5 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix build on older MinGWKonstantin Ritt2014-03-271-1/+14
| | | | | | | | | | | The correct declaration of the SHGetPathFromIDList symbol is being used in mingw-w64 as of r6215, which is a v3 snapshot; until then, SHGetPathFromIDList was declared to use LPITEMIDLIST. Change-Id: Icc2f7814bad475c9b825f7d70c0ae4da72f471d9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use an offscreen surface in CanvasLaszlo Agocs2014-03-272-3/+6
| | | | | | | | | | | | | | | | | | | | | | | Canvas elements using the default Immediate render strategy and an FBO result in a failing makeCurrent() and subsequent crashes due to trying to make the Quick window's surface current on the gui thread while it is current on the scenegraph render thread. The EGL spec disallows this explicitly and so the makeCurrent fails with EGL_BAD_ACCESS. Others, like GLX, do not seem to have this issue since the spec says nothing about this scenario. To overcome this, a QOffscreenSurface is used instead since what the canvas does (rendering into an FBO on a thread that is different than the one on which the rest of the rendering happens) is a primary use case for offscreen surfaces (pbuffers) anyway. This makes demos like stocqt functional again. Task-number: QTBUG-37772 Change-Id: Id89f71545154856415bbbe4fa924176b25b5086f Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Pass the actual window format to the offscreen surface during cleanupLaszlo Agocs2014-03-272-1/+3
| | | | | | | | | | | | | | | | Using the requested format (we don't have anything else since the platform window is gone) is wrong on EGL implementations that offer a different set of configurations for window and pbuffer surfaces, because we may end up with a pbuffer surface that is incompatible with the context/window due to having different color buffer sizes. To be absolutely sure that the surface is compatible, store the actual surface format so that it is available even after the platform window is gone. Change-Id: Id17c25439c463d4c37af95fc90f336d3f67c6427 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Lars Knoll <lars.knoll@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>
* Don't create prototype objects for bindingsLars Knoll2014-03-251-2/+2
| | | | | | | They are neither used not accessible from QML. Change-Id: I14fa6059b8e64cb2c3b9d025061548009a473f96 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Optional reporting of GC statistics to stdoutLars Knoll2014-03-252-13/+46
| | | | | | | | Use QV4_MM_STATS to get some statistics about each GC run written to stderr. Change-Id: Idc30c06e1c3ca8353a2f16615cb26df13a8f23ed Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove unused methodLars Knoll2014-03-252-13/+4
| | | | | Change-Id: Ia7df68e78ac105fe5519cb4f80a64561310d3324 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove code for conservative GCLars Knoll2014-03-252-187/+0
| | | | | | | | | | This was meant as a debugging help after we took the exact GC into use. Turns out it doesn't help debug any issues, aggressive garbage collection is much more helpful in finding GC issues. Change-Id: Idfff26d3a4a15e570615009c1e57921bca6297ca Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Correctly parse unicode escape sequences between 0 and u001fLars Knoll2014-03-251-2/+0
| | | | | | | | | The old code rejected these escape sequences because of a slight misreading of the spec. Task-number: QTBUG-36968 Change-Id: I56a0e76295d1903b4798719de028bd21ad5be719 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Small fixesLars Knoll2014-03-251-4/+5
| | | | | | | | | Don't cast from ushort to uchar and back, and remove a condition that's always true. Allocate some more memory for matching. Change-Id: I8167b6e4b4989365ca0ea8e17f4bdb15c0d8e27d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix some documentation errors.Friedemann Kleint2014-03-2412-38/+36
| | | | | Change-Id: I5d4b3e26742202c4b634d0001fd3658c7263c50a Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix infinite loop in method overload resolutionSimon Hausmann2014-03-241-0/+5
| | | | | | | | | | When resolving overloaded slots in a situation without property cache, then we need to detect that we've reached the end of the overload lists and exit from RelatedMethod with zero. Task-number: QTBUG-37157 Change-Id: Ifaab8cc1b377725c99c1bb89bb9bb74d5a0af1b8 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Don't crash on Runtime::getQmlImportedScriptsAlbert Astals Cid2014-03-241-0/+4
| | | | | | | Task-number: QTBUG-37303 Change-Id: I083ca0cc3223fe0dbf1c768ad43a0d4927579867 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanupsv5.3.0-beta1Simon Hausmann2014-03-2115-49/+22
| | | | | | | | | * Get rid of members in QQmlCompiledData that were used by the VME and are now unused * Get rid of QQmlVME friend declarations that are not needed anymore Change-Id: I11b4b6f0b4b0b60edf92a1256be3d0d44d76bbc9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix QQuickView::grabWindow() on retina displaysMorten Johan Sørvig2014-03-205-5/+5
| | | | | | | | | Multiply by window->devicePixelRatio() at all qt_gl_read_framebuffer() call sites. Task-number: QTBUG-35962 Change-Id: If58e4f97fc5d931ba2e222f8cb1a0641d52c3257 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Implement high-dpi "@2x" image handling.Morten Johan Sørvig2014-03-204-8/+85
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Clearly point out the distinction between GUI and Render threads.Gunnar Sletta2014-03-208-12/+49
| | | | | | | | This is something it is easy to get wrong, so try to make it as visible as possible. Change-Id: I2253ae63214cef0fb91c8b9423d7918ffc20e888 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Finish QML test cases after waiting for deletionUlf Hermann2014-03-191-1/+1
| | | | | | | | | | Otherwise messages triggered by the waiting (and the event loop that's run in QTest::qWait()) won't be correctly attributed to the test function being run. Task-number: QTBUG-37609 Change-Id: Iccc13d8caa021fc26fbf76da0056cb0dd870ec0e Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* Behavior fix when creating QML windowsFabian Bumberger2014-03-191-1/+19
| | | | | | | | | | | | | | | | | | | | When a QML window is created it is set visible after the QQuickWindowQmlImpl component is complete. This works fine for a single window, but because componentCompleted is called first for the last created windows, the behavior is not as the user might expect (and different compared to version 2.0 of the QML Window API). One of the results is e.g. that a window which is created as a child object in QML will have a lower z-Order than the parent. On some platforms (e.g. BlackBerry) an even bigger problem arises because the first created window acts as a container for the whole application and is always shown fullscreen. On other platforms (Linux) the initial window position and the window focus ares not set correctly. This patch postpones showing windows until the "transientParent" is visible. [Changelog][QtQuick] Making a QtQuick Window visible is postponed till its transient parent is visible Task-number: QTBUG-37440 Change-Id: I09a94ff038c066a5d3298c6c103dafde50bef1fa Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Cleanup: Remove last traces of QQmlScriptSimon Hausmann2014-03-1917-242/+52
| | | | | | | | | | What remains is the code for removing .pragma from script source code (and replacing it with white-space to preserve line/column numbers). The previous code even returned the value of the pragmas, but for the remaining caller sites that value isn't used, so we can just return void. Change-Id: I16db15da236970660b817d6c4493005365a7a1af Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QQuickWidget: Fix SizeViewToRootObjectPaul Olav Tvete2014-03-192-14/+10
| | | | | | | | | There were two problems: 1) QWidget does not have a default size of (0,0) or (1,1), but uses WA_Resized. 2) event() would eat timer events without checking the timerId. Change-Id: I355acbb10d3d5073e117c29de18bb94857881141 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Invalidate all batches potentially affected by a change.Gunnar Sletta2014-03-192-3/+12
| | | | | | | | | | | | When two separate changes have occurred, we need to not only invalidate the batches directly overlapping those, but also any batch which has render orders between the two. So, keep track of the range of invalidated render orders and invalidate everything in between. Task-number: QTBUG-37422 Change-Id: Ie5a289d5c569b84917ec9ac52671173c566e69b3 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Set correct FBO size for devicePixelRatio != 1Morten Johan Sørvig2014-03-191-1/+1
| | | | | Change-Id: I3cc584e8ff980cd4328639a5e98241713a13cb04 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Compilation fixaavit2014-03-191-8/+7
| | | | | | | | gcc 4.6 chokes on this construct. Replace with a shorter and more readable one :) Change-Id: I02ff7a2c5300de656e61ee5ca8effabdd74991bb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Clear the chain of incubated objects in QQmlIncubatorPrivate::clearAlbert Astals Cid2014-03-191-14/+14
| | | | | Change-Id: I432310c0e6006d567fd59b4b1021a9e1538ef78f Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Cleanup: Get rid of QQmlScript::TypeReferenceSimon Hausmann2014-03-193-18/+9
| | | | | Change-Id: I5f8b203ac71f0667947087bd2b1e7ce6d91d843d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cleanup: Remove dead codeSimon Hausmann2014-03-193-49/+0
| | | | | Change-Id: I073a8c61d666a08b5e88edcbf4cefa71d7f5b7c3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* CleanupSimon Hausmann2014-03-194-135/+88
| | | | | | | | Get rid of QQmlScript::Import in favor of operating on QV4::CompiledData::Import structures throughout the type loader. Change-Id: I29de369373a3dc4fd8e7f30517b804edcce93e7a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Clean up script importsSimon Hausmann2014-03-198-335/+318
| | | | | | | | | | Move the .pragma and .import script extraction out of qqmlscript and into qqmlirbuilder, where it can populate a QQmlIR::Document. Changed the script part of the type loader to use that, which also allowed eliminating the m_source member and m_metaData. Change-Id: Icc64d219fff5666679a02e6afda73f7edfca132b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Clean, part 3Simon Hausmann2014-03-196-50/+18
| | | | | | | | | | * Get rid of QQmlScript::Pragma * Allow retrieving the QML unit size after generation * Add flag equivalent of .pragma library to QV4::CompiledData * Remove unused method Change-Id: I2f95b83f919004013741bc539c82960cc878f3a4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use Q_ASSERT instead of assertLars Knoll2014-03-1913-64/+55
| | | | | Change-Id: I6185b59a7dfd6977ce82581ab4385e07d78f13f6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Enable constant propagation for all typesLars Knoll2014-03-193-13/+28
| | | | | | | | | So far constant propagation was only enabled for numbers and booleans. Enable it for all types now and make sure the propagation does the right thing. Change-Id: I202b0073f463d8a42e34931a736544207284b6dc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fixes to for...in statementLars Knoll2014-03-198-9/+9
| | | | | | | | | | | Properly convert the argument to an object if it's not null or undefined as mandated by the standard. Add a similar test case for the with statement. Change-Id: Idd8e245e8dae4803eb0e2010e3d43bb912670444 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Optimize construction of SimpleArrayDataLars Knoll2014-03-193-2/+5
| | | | | Change-Id: I7f8a0ac8a368af23534378e8c31d820b3b9f1f4c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Dynamic GL in QuickLaszlo Agocs2014-03-1811-97/+115
| | | | | | | | | | The counterpart to I716fdebb. Implements the dynamic path in scenegraph. Task-number: QTBUG-36483 Change-Id: I2dc613ba84560b7b8e36d3cd1da61c050ab08db0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Add surface format to QQuickWidget.Laszlo Agocs2014-03-183-3/+55
| | | | | Change-Id: Id72a042588e37832a0d3757bad935c531ef8275a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Release the mouse grab from PinchArea when it's not needed anymoreUlf Hermann2014-03-181-5/+8
| | | | | | | | | If we keep the mouse grabbed no other items will receive mouse events until the next click. Task-number: QTBUG-37485 Change-Id: Id3936fbe09b262ddbefc68334ef8fe7e161fbcd4 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Doc: Fix broken \qmlsignal linksSze Howe Koh2014-03-1813-37/+36
| | | | | | | | Fix the breaks caused by the re-categorizing of \qmlsignal pages Task-number: QTBUG-35846 Change-Id: I528ae16ec522fc902133e22d8f53c87a7f0d56ad Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Document signals (not handlers) under \qmlsignalSze Howe Koh2014-03-1820-237/+428
| | | | | | | | Append the handler names to the end of the corresponding signal doc. Task-number: QTBUG-35846 Change-Id: I3d627ba7ed5be94e5c402ab092b4d582536499e8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Register animation profiler callback also from render threadUlf Hermann2014-03-183-8/+29
| | | | | | | | | | | The QUnifiedTimer in the GUI thread doesn't cover the render thread animations. We need a separate registration for those. We also need to keep track of which animation events are coming from which threads. Task-number: QTCREATORBUG-11659 Change-Id: I1fdd80a5630cc6a33e527b99be7347f3bd63510f Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Doc: Reintroduce missing sample XML file for XMLRole documentationTopi Reinio2014-03-183-3/+29
| | | | | | | | | | | | | XMLRole documentation talks about sample XML content, but erraenously quoted a QML file instead. This change brings back the sample file from Qt 4.8, and updates it to cover the use of boolean role. Change-Id: Id71550fab15c761320551f6583a138cd7cc88376 Reviewed-by: Bea Lam <bea.lam@jollamobile.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* PinchArea: zooming requires pinch distance to exceed the thresholdShawn Rutledge2014-03-181-32/+39
| | | | | | | | | | | | | | | | | | | | | | If you use a PinchArea and a Flickable together on OSX, you will be able to use two fingers on the trackpad to flick the Flickable because the OS will send scroll events which Qt turns into QWheelEvents; and at the same time you will have two touch points, which the PinchArea will grab and use. That's nice, but it means we need to be more selective about gesture recognition, so that when you mean to flick you can do it without simultaneously pinch-zooming. Therefore, iff pinch.dragAxis is Pinch.NoDrag, the startDragDistance (threshold) is treated as a pinch distance threshold rather than allowing any direction of movement to begin the pinch gesture. [Changelog][QtQuick][PinchArea] do not begin zooming until the change in distance between two touch points exceeds startDragDistance Task-number: QTBUG-37294 Change-Id: I01026364970428aae9a4c5436517db719387f8e8 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* FolderListModel: pessimize change signals when the filter changesShawn Rutledge2014-03-181-24/+17
| | | | | | | | | | | FileInfoThread doesn't have separate signals for insertions, deletions and updates, so QQuickFolderListModel shouldn't make an assumption that if the list got bigger, an insertion was the only thing that happened. Task-number: QTBUG-36576 Change-Id: Ibb02d64e1645dd6df231d28a93e424aaad0effff Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Small optimization to RegExpLars Knoll2014-03-183-1/+14
| | | | | | | | | Also add markObjects() calls to all the identifiers we keep around in the engine. It's probably pure luck this hasn't caused any issues until now. Change-Id: Ie31d19793efa53867e4e240ba548070dcde32ec1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add some specialized lookups for two internal classesLars Knoll2014-03-183-28/+187
| | | | | | | | | | | | Some methods are being called with two different types of objects, alternating between them. This adds a specialized lookup for that case. Speeds up the splay test by ~20%. Also create a clean path to a fallback lookup instead of going back to the generic lookup and then alternating. Change-Id: I3082d70d27155ef5f2cf2b680d227c6dd389956d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Minor optimization: Avoid some QString constructorsLars Knoll2014-03-181-1/+1
| | | | | | Change-Id: I51af67e9ba4076216142e05b5de5b2e8f8c526bc Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Item views: improve initial Z-value handlingJ-P Nurmi2014-03-183-9/+32
| | | | | | | | | | Respect the initial Z-values of item, highlight, header, footer and section delegate instances. Mention also the default values in docs. Change-Id: I2ce4bb537898a0f5fdfa776b79d5747b1c080a7b Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Martin Jones <martin.jones@jollamobile.com>