aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * TestCase::mouseDrag: set mouse move delay >= 1 msShawn Rutledge2016-08-193-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Infinite-speed drags do not work well with velocity-sensitive components like Flickable. As with change d04982dc on qtbase, adding a short delay helps to stabilize tests. To keep it flexible, we make QTest::defaultMouseDelay() available via the qtest_events.defaultMouseDelay property. So the delay can be increased by passing a larger delay value to mouseDrag, or by changing the QTEST_MOUSEEVENT_DELAY environment variable (as before). Task-number: QTBUG-55382 Change-Id: I8f8088758a206be104a439ee0d1832eeca574e8c Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * Remove some double-meaning text from documentationFrederik Schwarzer2016-08-181-1/+1
| | | | | | | | | | Change-Id: I9b69dbe929947795bdfbff4e0e3a16a47fa94197 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QML: Do not register dependencies of deleted bindingErik Verbruggen2016-08-181-1/+1
| | | | | | | | | | | | | | Because it can lead to a use-after-free. Change-Id: I6701b370c0ecee4967e5f749f673a6f9ee3d504c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QQuickGridView: fix doc for itemAt() and indexAt()Anton Kudryavtsev2016-08-181-2/+2
| | | | | | | | | | | | | | These methods have real arguments. Change-Id: I5362a407b8417b62bb27bb313dccce8611b5e316 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * QQuickListView: fix doc for itemAt() and indexAt()Anton Kudryavtsev2016-08-181-2/+2
| | | | | | | | | | | | | | These methods have real arguments. Change-Id: Ieb4ea8396876f237adedf5df8ab5aeec1055229f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Revert "localstorage: disable warning about tautological comparison"Shawn Rutledge2016-08-181-5/+0
| | | | | | | | | | | | | | | | | | | | After 12c7f22, the comparison should now be done at compile time. This reverts commit a858ce0039cb63a6a0afdfabab80ad4adc98ce17. Task-number: QTBUG-53373 Change-Id: I79d2c8aaabba8a2676df6da64206fefc9cdef3b2 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-1813-15/+24
|\| | | | | | | Change-Id: I20c622263f40c322954328e4d10a8071db3ca6d1
| * QQuickPathView: fix doc for itemAt() and indexAt()Anton Kudryavtsev2016-08-171-2/+2
| | | | | | | | | | | | | | | | These methods have real arguments. Change-Id: I61f42076d36265b58dcc598394c6b3576b02dd60 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * QV4Object: fix GCC 6.1 tautologial compare warningMarc Mutz2016-08-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC warned: qtdeclarative/src/imports/localstorage/plugin.cpp:152:126: error: self-comparison always evaluates to true [-Werror=tautological-compare] Fix by comparing the types for equality instead of the addresses of their static_vtbls. Task-number: QTBUG-53373 Change-Id: Idd1598610ad6381c03c3a46abe56a332726bd6a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Fix throwing an exception inside a finally block with a return in catchSimon Hausmann2016-08-162-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When exiting a catch block with a return statement, we'll unwind the exception handling manually and emit finally statements right before jumping to the exit block. If we throw an exception in the final block, we'll end up using the exception handler of the catch block that contains the return statement, which means we'll end up popping the exception scope one too many times, once through ScopeAndFinally::CatchScope in unwindException() and then when executing the exception handler block. The latter we should not be executing, instead we should jump straight to the exit block. Therefore any statements emitted as part of the manual exception unwinding (finally block here) need to be part of a new basic block with no exception handler. This bug became visible in debug builds where the Scope destructor compares the scope mark against the engine stack top to ensure correct cleanup order (which was wrong). However that in turn was hidden in debug builds again due to an accidental = instead of == in a Q_ASSERT. With the Q_ASSERT fixed this use-case is covered by ch12/12.14/S12.14_A13_T3 Change-Id: Id74a1b2bb3e063871b89cc05353b601dd60df08e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Doc: Change instances of 'OS X' to 'macOS'Topi Reinio2016-08-159-9/+9
| | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change all occurrences where the Mac platform is discussed to use the macro \macos (defined in the documentation configuration in qtbase). Change-Id: Iea114ac73c01d74401bcd77373b41a825d2636c9 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Doc: Remove references to Windows CEVenugopal Shivashankar2016-08-171-1/+0
| | | | | | | | | | | | | | | | The platform is not supported since Qt 5.7 Task-number: QTBUG-55331 Change-Id: I5a38940bd8ebf7dd62d04015e1738ee23ac65bb2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Doc: mention when Flickable.AutoFlickIfNeeded was addedJ-P Nurmi2016-08-151-1/+1
| | | | | | | | | | Change-Id: Icf72c05c9573715771353bd03735f64eadd808f2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-1313-222/+246
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h tests/benchmarks/qml/qqmlimage/qqmlimage.pro tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp Change-Id: Iad11ce7fdf0c6d200fdebc16a94081bd8069a87a
| * PathView: fix infinite construction/destruction loopAnton Kudryavtsev2016-08-121-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... when all (or almost all) items are in the cache. When all items are in cache, check lower bound is equal to upper_bound. In rare cases, especially when almost all items are in cache, the inserting code was used (not only appending and prepending). In this code there was not bound check before creation of item and there was such situation: 1. Create item by inserting code (without bound check) 2. At the next call of refill() remove this item by life cycle because this item does not meet the conditions. And go to step 1. In other words at the first call we create some item, at the second remove this item. And again. So we had infinite construction/destruction loop. To break it we should check position of new item before creation in inserting code too (like we do in appending and prepending code). Task-number: QTBUG-37815 Change-Id: I015cdeb67ca5fcd06c34b3145b49cbd3e38d4078 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * PathView: fix item creationAnton Kudryavtsev2016-08-121-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First call of QQuickPathView::refill() did not use currentIndex for item prepending and there was situation when items were not created, e.g.: PathView with current item in center and currentIndex was set so that item with index 0 was after current item and before path end. The result of this situation: items from path begin to current item were not created. The reason was that idx always equaled (modelCount-1) for item prepending. Now first filling uses currentIndex to calculate valid idx. Task-number: QTBUG-53464 Change-Id: I7e343b0712c9c5c5cd56b1d8e020cf8c0f6e6301 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Move the moth stack slot allocator into qmldevtoolsSimon Hausmann2016-08-122-162/+164
| | | | | | | | | | | | | | This way it's accessible to the QML compiler. Change-Id: I3918a796c698fc75e134b29a61eed2ec028bc851 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * QQmlObjectCreator: prefer initializer syntax over assignmentEdward Welbourne2016-08-111-5/+4
| | | | | | | | | | | | | | | | Greater uniformity; also opens the door to potential const-ing, should this ever be worht considering. Change-Id: I91b44472cb7d84f85b3033f14a763beeea837459 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QQmlObjectCreator: initialize _bindingTargetEdward Welbourne2016-08-111-0/+1
| | | | | | | | | | | | | | Coverity (CID 163180) noticed _bindingTarget wasn't initialized. Change-Id: Ia727d00a161e514c437a72084b6ef01a7ebf4abc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix char conversions in QMLChristian Strømme2016-08-092-27/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of 90b06e2773842, as it had unwanted side effects. The original intention was to make assignment from char to string possible, or more specifically, we wanted a solution where a QChar could be assigned to a QString, as a character and not a string representation of its value. While this behavior is desirable for QChar, we most likely want the opposite for the regular character types. Task-number: QTBUG-49232 Change-Id: I82d5f72b900fe984c4db1478fd52a9eb69ad2ee6 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Don't accept left clicks when text format is plain.Eike Hein2016-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Text elements may contain rich text with embedded links, and need to accept left clicks to open them. However, setting the textFormat to PlainText can disable mouse handling entirely, as it is not required. Accepting left clicks if there can be nothing to interact with is unexpected and surprising, and can cause bugs in code that performs child event filtering and doesn't expect Text elements to produce child events. Change-Id: Ibd5b9cf8d06fd30ea26f78b5393cc43e94646e73 Reviewed-by: Marco Martin <mart@kde.org> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Clarify doc on modification of the global object in JS imported by QMLMitch Curtis2016-08-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, reading the documentation for modification of the global object in JavaScript can be confusing. http://doc.qt.io/qt-5/qtqml-javascript-hostenvironment.html says: JavaScript code cannot modify the global object. In QML, the global object is constant - existing properties cannot be modified or deleted, and no new properties may be created. ... Any attempt to modify the global object - either implicitly or explicitly - will cause an exception. If uncaught, this will result in a warning being printed, that includes the file and line number of the offending code. http://doc.qt.io/qt-5/qjsengine.html#globalObject says: Returns this engine's Global Object. By default, the Global Object contains the built-in objects that are part of ECMA-262, such as Math, Date and String. Additionally, you can set properties of the Global Object to make your own extensions available to all script code. Non-local variables in script code will be created as properties of the Global Object, as well as local variables in global code. If QQmlEngine "is-a" QJSEngine, and QJSEngine can have its global object modified, it might seem reasonable to expect that imported JavaScript code should be able to modify the global object. This patch aims to be more explicit about the restrictions and give examples of how libraries should expose their APIs correctly for use by QML code. Change-Id: I11beb894a88d52038be90ffe6baa9337943810db Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix crash with Component.onDestructionSimon Hausmann2016-08-051-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A call to a handler of Component.onDestruction may end up causing WeakValues such as QQmlData::jsWrapper to be set again, even though they've been set to undefined in an earlier iteration of the loop that walks through the weak references. That in turn may result in invalid object references to objects that are scheduled for destruction by the collector. So after calling all destroy handlers for QObjects, reset all of the weak values again. Task-number: QTBUG-54939 Change-Id: I00ebabb76274e296fb1bd90d8d3e21dbbb920b57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Remove artifacts in font renderingEirik Aavitsland2016-08-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The distancefield cache did not clear the textures before using them. Hence, random values could leak through in the edges of the distancefields, leading to random pixels at the edges of the rendered glyphs. This issue was rarely visible before, because of the way the glyphs were stacked on the textures. That stacking was changed as a result of 7190aa26f65ab97b4f54c156a107ed7748a11df5, which made the issue happen more often, so it was detected by lancelot. Change-Id: Ibe7a20dd7ba557ab92966e714c25a100e218ed24 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| * Fix crash when cache property can not be foundFilipe Azevedo2016-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | For some reason if a cache property is not found this cause an application crash instead of just reporting an error. Now instead of a crash we get this kind of error visible: qrc:///the_file.qml line 64 column 30: Cannot assign object to property Change-Id: Ic420713df30603f1d164da439cba30a18af8f2bc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Flickable: avoid infinite velocity during release after dragShawn Rutledge2016-08-051-2/+6
| | | | | | | | | | | | | | | | | | | | It sometimes happens on touchscreens that mouse events occur too close together. We cannot calculate velocity based on zero elapsed time, so just ignore the event. Task-number: QTBUG-45527 Change-Id: I120e73cfa60e2fcc594cb1f3b69f530e746abddd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| * Fix QQuickDefaultClipNode::updateGeometry()J-P Nurmi2016-08-051-1/+1
| | | | | | | | | | | | | | | | | | There are segments top + border and for each segment 2 points -> 4. Change-Id: I6df11e557054e4b942de430bd2cad8e2f798b0db Task-number: QTBUG-51894 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | TextInput: fix horizontal alignment when implicit resizing is disabledJ-P Nurmi2016-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, TextInput updates its implicit width to match the content width. This implies that when TextInput does not have an explicit width set, there is no need to handle horizontal alignment. TextField wants to override the default implicit width, so it disables the "implicit resizing" feature of TextInput. In this scenario, the implicit width does not match the content width. Therefore the text layouting code should also treat the item as if it had an explicit width set to achieve the correct horizontal alignment. Task-number: QTBUG-55138 Change-Id: I8c04971a6aff44c6f1734df50153a9788849e98a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | V4: Align stack on 16 byte boundaries in the YarrJITErik Verbruggen2016-08-091-2/+20
| | | | | | | | | | | | | | | | This is the required alignment for Aarch64, and a number of other ABIs prefer this size too when calling into system libraries. Change-Id: Ie38cabb77cf83543b915553e69c5c5728a67503b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-053-4/+10
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h Change-Id: I1e6a9424e7f87d9e4ac1ea387ec70e151106f1c7
| * V4 Debugger: use engineAdded() instead of engineAboutToBeAdded()Ulf Hermann2016-08-042-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It does not make a difference in functionality, but after engineAdded() the server won't wait on a mutex anymore. Before this change, if you managed to send a message to the V4 debugger after the server had called aboutToBeAdded(), but before it had stopped waiting, you could produce a deadlock by scheduling an event for the GUI thread that was never delivered. This is a cherry-pick of 18c4295e25503ae637a715858de5c94a3d105a92 from 5.7 as apparently the problem also occurs in 5.6. Change-Id: Ie2343e6da4bd0b8956d41ff8ebd4d7594616ebd1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix recursion during aggressive GCSimon Hausmann2016-08-041-0/+3
| | | | | | | | | | | | | | | | With aggressive GC enabled we may end up calling the GC recursively, which does not work at all, so disable that. Change-Id: I9ce0abbdb7b2bfa8499b33fd0be0d6e4a5212a15 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Fix grammar in JavaScript Host Environment docMitch Curtis2016-08-041-2/+2
| | | | | | | | | | | | Change-Id: Ib7bc3f62fc27e982f59f1c8b2c2e0cf26306c3b9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * QQmlComponent: fix handling of relative pathsDavid Faure2016-08-031-2/+5
| | | | | | | | | | | | | | | | Calling QUrl::fromLocalFile() on a relative path leads to a non-relative URL, as per the definition of QUrl::isRelative(). Change-Id: Ibaa9ecac56c6a14f6e41c5cf5250d7bbafed9837 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-0112-74/+288
|\| | | | | | | | | | | | | | | Conflicts: tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp tests/auto/quick/qquickitem/tst_qquickitem.cpp Change-Id: If261f8eea84dfa5944bb55de999d1f70aba528fd
| * Revert "macOS: Use sRGB when doing native font rendering into FBO"Sérgio Martins2016-07-291-27/+4
| | | | | | | | | | | | | | | | | | | | This reverts commit 1e18a4f985f6ec4a0191a2e0cc087b13d29b1719. It breaks a QtCanvas3D unit-test and I can't look at it now. Will have another take at this soon. Change-Id: I22acd55443783934596d25cc4c8774bd34609f6b Reviewed-by: Liang Qi <liang.qi@qt.io>
| * Doc: Describe how to implement custom SQL models for QMLVenugopal Shivashankar2016-07-281-0/+105
| | | | | | | | | | | | Change-Id: I31781f32c2f9699f386a326f18cb5cc705582a89 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix documentation of Component.createObjectGiuseppe D'Angelo2016-07-261-1/+1
| | | | | | | | | | | | | | The parent argument should really be any QObject, not just Items. Change-Id: I4d105722b9d76585dd353eddf464a1ec39fea75e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Mention Q_FLAG in C++ <=> QML type conversion documentationMitch Curtis2016-07-261-0/+2
| | | | | | | | | | | | | | | | | | For a user visiting doc.qt.io/qt-5/qtqml-cppintegration-data.html, it's very difficult to know how to use an enum as flags in QML, because it's not mentioned anywhere on this page. Change-Id: I35065bff825b8aebab1477ec883d17cbab92b3ba Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * QQmlPropertyMap: Don't spuriously emit valueChanged() signalThomas McGuire2016-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | The valueChanged() signal was emitted when the property was written with the same value. This increased the potential for binding loops in user code. Change-Id: Ifeb8f6f23e2022aa35cb6cac7cf1a3dbc0e8ca2f Task-number: QTBUG-48136 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Work around ICC bug about C++11 noexcept inheritanceThiago Macieira2016-07-231-21/+21
| | | | | | | | | | | | | | qquickitemanimation.cpp(213): error #809: exception specification for virtual function "QQuickParentAnimationData::~QQuickParentAnimationData" is incompatible with that of overridden function "QAbstractAnimationAction::~QAbstractAnimationAction" Change-Id: I149e0540c00745fe8119fffd1463cb59e590b6b8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix QQuickItem's setAcceptedMouseButtons functionDan Cape2016-07-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using setAcceptedMouseButtons to only allow the LeftButton, the user can click the LeftButton and while still holding it press the RightButton. There would be a press event sent for both. To resolve this, a check needed to be added to ensure the acceptedMouseButtons are checked when a second press comes in. [ChangeLog][QtQuick][QQuickItem] Fixed issue with mouse button events being sent even when they were disabled by setAcceptedMouseButtons. Change-Id: I064f3ff56ede12b1572e172be326eb337e280750 Task-number: QTBUG-31861 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Fix string property assignments to 2d vectors and quaternionsSimon Hausmann2016-07-212-0/+50
| | | | | | | | | | | | | | | | | | Just like it's possible to assign "1,2,3" to a QVector3D, the same should be possible for a QVector2D and a QQuaternion. Task-number: QTBUG-54858 Change-Id: I8f394279dcdf5c057876efaa316b4bad51a4c126 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Fix QQmlEngine crash on big endian 64 bit architectures (s390x)Maximiliano Curia2016-07-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This change disables the BIG_ENDIAN 32 bits words mangling in 64 bits machines (where the words are 64 bits long); this would otherwise result in a segfault. Task-number: QTBUG-54717 Change-Id: I6b5ab6f213880b030795185c05e609d290168901 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Timo Jyrinki <timo.jyrinki@iki.fi> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * JS: Check for errors before using sub-expression resultsErik Verbruggen2016-07-201-21/+95
| | | | | | | | | | | | | | | | Specifically: don't de-reference a result and assume that it's not-null. Task-number: QTBUG-54687 Change-Id: If07d3250a95a7815ab7a3262b88e0227965ef8e7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Remove vsync sleep before rendering first frameMilian Wolff2016-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QSGRenderThread slept for up to one vsync interval before the first frame was rendered. This happened when the QSGRenderContext was not yet initialized and thus a sync could not result in changes. With LTTNG and custom trace points this latency was easily visible before the first frame swap. With perf it can also be checked, when one does: QSG_RENDER_LOOP=threaded perf trace record -m 10M \ -e syscalls:sys_enter_nanosleep,syscalls:sys_enter_ioctl \ --call-graph dwarf qml main.qml ... [ perf record: Captured and wrote 116.731 MB perf.data (14309 samples) ] Then afterwards have a look at the output of perf script --comms QSGRenderThread And you will notice the sleep directly at the start, followed by the bulk of ioctl required to setup the OpenGL contexts: QSGRenderThread 10875 [001] 13940.801449: syscalls:sys_enter_nanosleep: rqtp: 0x7f1ab954cd60, rmtp: 0x7f1ab954cd60 7f1ada3997fd __nanosleep+0x2d (/usr/lib/libpthread-2.23.so) 7f1ada9683ed qt_nanosleep+0x2d (/home/milian/projects/compiled/qt5-5.7-opt/lib/libQt5Core.so.5.7.0) 7f1ada8c73b8 QThread::msleep+0x38 (/home/milian/projects/compiled/qt5-5.7-opt/lib/libQt5Core.so.5.7.0) 7f1abb594320 QSGRenderThread::syncAndRender+0x320 (/home/milian/projects/compiled/qt5-5.7-opt/lib/libQt5Quick.so.5.7.0) 7f1abb598b0c QSGRenderThread::run+0x19c (/home/milian/projects/compiled/qt5-5.7-opt/lib/libQt5Quick.so.5.7.0) 7f1ada8c7f89 QThreadPrivate::start+0x149 (/home/milian/projects/compiled/qt5-5.7-opt/lib/libQt5Core.so.5.7.0) 7f1ada390484 start_thread+0xc4 (/usr/lib/libpthread-2.23.so) 7f1ad982e6dd __clone+0x6d (/usr/lib/libc-2.23.so) ... ioctl follow This change here checks the validity of the render context before sleeping, thereby removing the vsync latency before rendering the first frame. Note that simply skipping the calls to `syncAndRender` from `run` is not an option, as those also trigger the expose event that is required for the initialization to happen eventually. [ChangeLog][QtQuick] The threaded scene graph renderer does not sleep up to one vsync interval before the first frame anymore. Change-Id: If7474d5420e0d4a1d05ccb664c7c6932fa989127 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Doc: syntax error qml exampleNico Vertriest2016-07-201-1/+1
| | | | | | | | | | | | | | | | onRelased --> onReleased Change-Id: I0078229b66bc8db4c70789d0536de70166ee0852 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-158-31/+56
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/demos/photoviewer/deployment.pri One side made it redundant; the other removed part of it; remove it all ! src/quick/scenegraph/util/qsgatlastexture.cpp One side changed a preprocessor condition, the other a code condition, on adjacent lines; keep both changes. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side changed a condition, the other the content of its block; keep both. Change-Id: Idb8937f92a7edb28212449dfe0c5cfdb8e6de986
| * Avoid crashing when failing to query GL_EXTENSIONSJoni Poikelin2016-07-151-2/+2
| | | | | | | | | | Change-Id: Ice542d53c4eb9f34745e2d06dd03c32de7a9817e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Fix missing closing parenthesis in TextEdit docsMitch Curtis2016-07-141-2/+2
| | | | | | | | | | Change-Id: Ib1872e6353a49bc12a6a714a79873e8c0a7032f7 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>