aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix caching of QML singleton typesSimon Hausmann2017-03-132-2/+36
| | | | | | | | | | | | | | When a QML file depends on a QML singleton, we failed to include it in the dependency hash. Thus changes to the QML singleton did not result in a re-creation of the caches of files that use it. The list of singletons comes from random-ordered hashes in the qml import handling. We provide an order to the direct dependencies by sorting by the singleton type names. Task-number: QTBUG-58486 Change-Id: Ie7e9d006f9bf3a60af1f819ee439c29bc234bd8a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up type dependency hashing for QML cachingSimon Hausmann2017-03-138-23/+29
| | | | | | | | | | | | | | Instead of passing the engine parameter all the way through the data structure generator, along with the dependent type data structure that is unused otherwise, let's simply provide a function object for the dependency hashing. This is also in preparation for adding singleton types to the dependency hash. Task-number: QTBUG-58486 Change-Id: I5bb5e5c06b7b5c77195cec3da13141333cfea7a8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix accidental assignment in assertionSimon Hausmann2017-03-131-1/+1
| | | | | | Change-Id: I5b63697c0607f4300b7f203eeac74914f3fb43af Reviewed-by: Holger Freyther <holger+qt@freyther.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* JS: Fix 0 == -0Erik Verbruggen2017-03-081-0/+2
| | | | | | | | | | | The double representation of 0 and -0 are different in the sign bit, so the raw values are not the same. However, neither is managed, so non-strict equality comparison erroneously returned false. Task-number: QTBUG-56808 Change-Id: If966ddbc9f1a1c006dc5901aecafca063f71e404 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QThreadData::threadId is now QAtomicPointer, so relax loads from AcquireThiago Macieira2017-03-062-3/+3
| | | | | | | | | | | | | | operator T() does loadAcquire, to match std::atomic behavior. We don't need that, so let's use a relaxed load. Side note: why does QtQml need to access the thread ID this way? Couldn't it do object->thread()? This code comes from a pre-5.0 commit 5570040771ec610583473e2d9e8e069474364cf1 ("Permit signals to be emitted in a different thread"). Change-Id: I4139d5f93dcb4b429ae9fffd14a34a84d3255a6f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix build with -no-feature-libraryUlf Hermann2017-03-061-1/+1
| | | | | | | | The versionUriList() function is unused in this case, and we cannot build the extension plugins test. Change-Id: I6c2ea1c2d078e508b0752efb45f4ccdfdbcbf22e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix build for -no-feature-quick-pathStephan Binner2017-02-271-0/+1
| | | | | | | | Change-Id: Id57c9bc4421fc252ab02e2a0cfe00d08aef0176d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix build for -no-feature-quick-shadereffectStephan Binner2017-02-275-2/+18
| | | | | Change-Id: I334603209818a8030ddb5b5b316cab596c328bf1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add feature.qml-profiler with extended build dependenciesStephan Binner2017-02-241-0/+13
| | | | | Change-Id: If165cea6f176e7a7066f50b73261baf97634a0bb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix QQmlExpression leaking QQmlError objectsRobert Griebl2017-02-231-0/+1
| | | | | | | | | | If the user doesn't clear any potential errors manually via clearError(), then do it automatically in the destructor. Found with valgrind. [ChangeLog][QtQml][QQmlExpression] Fixed memory leak Change-Id: If5b1181850c7463c939a7ba536d74e7054c53d60 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix build for -no-feature-quick-spriteStephan Binner2017-02-221-1/+3
| | | | | Change-Id: I864b436b7cb1e1fedb15555f53951987dc74012c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix build without features.cursorStephan Binner2017-02-201-2/+4
| | | | | Change-Id: I20821e5fd4d2154aa49ef90015d512dd09c134f3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Shaders: Fix crash when disconnecting shaders from item propertiesErik Verbruggen2017-02-151-3/+7
| | | | | | | | | | | | The disconnect was done with a signal index local to the item, instead of 'global' to the item and all its parents. The index also had to be a method index, not a signal index. Together this resulted in a failing disconnect, which would keep SlotObjects alive with outdated data. Any subsequent use would result in a crash. Task-number: QTBUG-58336 Change-Id: I26b1868b2f8c61a4ffab1c72c85178632ca87599 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Finish sentence properly in documentationFrederik Schwarzer2017-02-151-1/+1
| | | | | Change-Id: I9bdae64a2d1b38c0b3f1b7f4cf460b3466d45dad Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Minor wording issues and typo fixes in docsFrederik Schwarzer2017-02-153-4/+4
| | | | | Change-Id: I60af106607dca02fafc1df2d21d16053d64742b6 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Use QQmlType for looking up enums, even on singletonsUlf Hermann2017-02-081-5/+10
| | | | | | | | | | | | | | | | | | QQmlType has more information than the bare QMetaType. The optimizer already uses it for looking up enums, so some code would behave differently, depending on whether the optimizer was enabled or not. In some cases we cannot use QQmlType for lookup of enums because QQmlType might have been created with only a callback. The object only shows up later in that case. Then the only thing we can do is query the metatype. We can test this by adding an eval() because eval() disables optimization for the surrounding code. Task-number: QTBUG-58394 Change-Id: I8c90591b19fe1ed3e5339d877f9e6ec7c6f9aa73 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Improve QQuickAsyncImageProvider exampleAlbert Astals Cid2017-02-081-0/+4
| | | | | | | Also link it from more places Change-Id: Ib5fbf89f4a039f885e918d57ee477e9788049d8d Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Flickable: handle child mouse ungrab when hidden or disabledJ-P Nurmi2017-02-081-1/+4
| | | | | | | | | | | | If Flickable got hidden while a child had mouse grab, it ignored the mouse ungrab event of the child mouse grabber, and got therefore stuck in pressed state. Consequently, item view transitions were not executed since the item view though it was being pressed. Task-number: QTBUG-58453 Change-Id: I76f9f3190c3a95a2fafdce036d69ea1dc8127434 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* QQuickMouseArea: only start pressAndHoldTimer for accepted eventsRichard Moe Gustavsen2017-02-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | Most likely because of changes done to mouse event handling in 5.8, a QQuickMouseArea can now get a mousePressEvent call without a subsequent mouseReleaseEvent call if the press event was rejected. A regression seen from this is that QQuickMouseArea starts a pressAndHold timer upon receiving mouse press, which will never be 'cancelled' since the following mouse release is sent elsewhere. As a result, TextArea in QtQuickControls will e.g receive a pressAndHold signal each time the user touches the control, which again will cause weird behavior like selecting words and messing with focus on iOS. This patch will instead change this so that we only start the pressAndHold timer if QQuickMouseArea accepts the mouse press event. Change-Id: I43e2f02e2b4f75e7b6761e326e3fec54ea97683a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Implement QAccessibleQuickWindow::focusChildFrederik Gladhorn2017-02-062-0/+9
| | | | | | | | | | | | | | | When we post a focus change notification, VoiceOver verifies what the application thinks is focused. Without this function, when moving the keyboard focus (e.g. by pressing tab) the VO focus will not follow. [ChangeLog][QtQuick][Accessibility] Fixed focus handling so that keyboard and VoiceOver's virtual focus are in sync (QTBUG-58340). Task-number: QTBUG-58340 Change-Id: I7d4871c13b36c3ab9241614ca8a06452461e3cd1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Fix move ordering while resolving edges in register allocationErik Verbruggen2017-02-044-67/+104
| | | | | | | | | | | | | | | | | | When register allocation on an IR in SSA form is done, the last step is to turn the Phi nodes into moves and swaps and put those instructions in the predecessors. As the Phi nodes are conceptually "executed in parallel", this can result in cycles: r1 <- r0 r0 <- r1 These have to be turned into a swap instruction. Also, the moves have to be ordered in order to make sure that no values are overwritten: r1 <- r0 r2 <- r1 Here the two moves need to be switched. The comments in the code document the algorithm. Change-Id: I4151988681f7554b00a3eb70d224e6e2f29ebf04 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* MouseArea: fix bug preventing dragging from startOleg Yadrov2017-02-031-7/+18
| | | | | | | | | | | | | | | | The same bounded dragPos values were used for - moving the target item to new position; and - if dragging didn’t start yet, determining whether cursor moved over the threshold distance. It is right for moving the target item, but in the second case it led to that dragging did not start if the distance between item's left border and minimumX (right border and maximumX, top border and minimumY, bottom border and maximumY accordingly) was less than drag.threshold. Task-number: QTBUG-58347 Change-Id: If61a98bf734739323ef19dee6709560b754b2456 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Enable PropertyChanges to correctly restore binding on aliasMichael Brasser2017-02-021-2/+2
| | | | | | Change-Id: I88ffdd1d1224705e980e449b6c799c9f186143b1 Task-number: QTBUG-58271 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Prevent propagating results of a phi node into another phi nodeErik Verbruggen2017-02-011-8/+37
| | | | | | | | | .. of the same basic block. Phi nodes are "executed in parallel", so such a situation will lead to interesting results. Task-number: QTBUG-58553 Change-Id: Ibed439df91d46ea416dcb0a20457310e91dce8b4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix libs build with msvc on Chinese locale on WindowsLiang Qi2017-02-012-5/+5
| | | | | | | | | | | | | | | Chinese locale means Code Page 936 here. It's also related with removing C4819 warnings. And it's also following Conventions in Qt source code: All code is ascii only (7-bit characters only, run man ascii if unsure) See also http://wiki.qt.io/Coding_Conventions Task-number: QTBUG-56155 Task-number: QTBUG-58161 Change-Id: I1c38a6ce74670716f730663edbcdec3919b438c2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix regression with UniformAnimator target property validationJoni Poikelin2017-02-013-1/+10
| | | | | | Task-number: QTBUG-58549 Change-Id: Iaa2a9cd8b86e8c2bb7e20b99fabad99d0bd51799 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* fix memory leak in QQuickWindowPrivate::deliverTouchAsMouseShawn Rutledge2017-02-011-7/+7
| | | | | | | | | | A QTouchEvent is allocated with a reduced subset of TouchPoints for each Item to which we attempt to deliver it, and thrown away afterwards. (Ιt's not efficient to heap-allocate it, but we can't avoid doing it at all without changing behavior.) So now it's stored in a QScopedPointer. Change-Id: I48badb493610d0a715e582a2eedae95e2006eb2b Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Doc: Improve introduction to Qt Quick SceneGraph RendererKai Koehne2017-02-011-9/+5
| | | | | | | | | | | | | | Mention that the new backends are introduced with Qt 5.8. Also remove some details that rather belong in subsections, in particular the mentioning that the Qt Quick API's originally were designed for OpenGL. It is unclear what consequences this has for the user. Limitations on backends should be rather spelled out in the respective subsections. Change-Id: I21239ea99b89b4c7771e3d79a38c6aa39007d0ea Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Fix -no-qmldebug debug build with MSVCKai Koehne2017-02-014-10/+15
| | | | | | | | | [Platform Specific Changes][Windows] Fixed compilation on MSVC with -no-qml-debug configure argument. Task-number: QTBUG-58412 Change-Id: I915ed3d345b3f1e4e5863456522784ab6c9b15cf Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Quick: Check fbo msaa related extensions via QtGuiLaszlo Agocs2017-01-313-9/+11
| | | | | | | | | GL_EXT_xxxx is not sufficient here. QOpenGLFunctions already has support for the ANGLE and some other variants of the framebuffer multisample and blit extensions, so use that instead of the manual checks. Change-Id: I2d8e0850d3b0b9a9cfd9e55aa38adad07a0ba45d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Doc: Fix documentation warningsTopi Reinio2017-01-306-16/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | src/qml/jsapi/qjsengine.cpp:524: warning: Undocumented parameter 'metaObject' in QJSEngine::newQMetaObject() src/qml/qml/qqmlengine.cpp:1023: warning: Undocumented parameter 'retCode' in QQmlEngine::exit() src/qml/doc/src/qmlfunctions.qdoc:182: warning: Undocumented parameter 'reason' in qmlRegisterUncreatableMetaObject() src/qml/qml/qqmllist.cpp:393: warning: Undocumented parameter 'at' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:393: warning: Undocumented parameter 'count' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:402: warning: Undocumented parameter 'at' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:402: warning: Undocumented parameter 'count' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:402: warning: Undocumented parameter 'append' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:402: warning: Undocumented parameter 'clear' in QQmlListProperty::QQmlListProperty() src/quick/items/qquickwindow.cpp:4461: warning: No such parameter 'backend' in QQuickWindow::setSceneGraphBackend() Also do some minor language editing. Change-Id: I2e806d1a77e3c4264d709c27d2bfc4542a782716 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix build without animation by disabling quickTasuku Suzuki2017-01-301-1/+1
| | | | | | Change-Id: I3b9bc6aa69dbf2a780765ba935b76be6a22280e6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* QQmlTypeCompiler: Fix read after free in tst_qqmllanguageRobin Burchell2017-01-281-2/+1
| | | | | | | | | | invalidAlias.11 revealed a problem with the loop here, in that the vector was modified while it was being iterated. There isn't any need to modify the vector being iterated, as it'll be put into pendingObjects for the next loop. Change-Id: If9b537c4ac00697237d12e4b0be67ef39cc8b3c4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Mention that QVariantList is also a supported model typeKavindra Palaraja2017-01-281-6/+16
| | | | | | | | | Also added a section with more info that asks the reader to refer to the QStringList example above. Task-number: QTBUG-47768 Change-Id: I4e99b81ac242f7df1ddc412f85c9c1b822080514 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Doc: reinserted hello.qml which had been deleted by mistakeNico Vertriest2017-01-272-1/+77
| | | | | | | | | During the update of plugin.cpp this file was deleted by mistake. plugin.cpp still refers to it and it needs to be reinserted in src/quick/doc/snippets. Change-Id: Ie23c926ff6096392da96f0063c767009a3965a30 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Fix build without features.temporaryfileTasuku Suzuki2017-01-271-0/+5
| | | | | Change-Id: I31bcf56ee0c4ec9285dccb356b03b89e8ce8356a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* remove obsolete host build declarations from subdirs projectsOswald Buddenhagen2017-01-261-2/+0
| | | | | | | follows up qtbase/4eb2feb2. Change-Id: I13ba74fb25dfd059782b369350fa14e44b70bf79 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix build without qml-debugTasuku Suzuki2017-01-241-1/+1
| | | | | Change-Id: If4308195b05255a49a06184cab3db88ec9532f76 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix build without features.localserverTasuku Suzuki2017-01-231-2/+2
| | | | | Change-Id: I25edd84fb67f417caa98e63f284547eac3a7793a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* No need to define c99 math functions in c++11 modeJulien Gueytat2017-01-221-1/+1
| | | | | Change-Id: I5a04cb678ad4a222d2a716dd1499f5103bb66c8e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* StackLayout: propagate rearrange() call to child layoutsOleg Yadrov2017-01-191-1/+5
| | | | | | Task-number: QTBUG-57867 Change-Id: I0190b892e2bc2966b82a0dbd99e53fd9d6848957 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Fix memory leak in V4Gunnar Sletta2017-01-191-1/+1
| | | | | | | | | | | | | | | | | | Transitions contain both an id and a set of flags, but the sorting failed to take the flags into account in the operator<. As a result we would some times end up with duplicate entries if the same id was added multiple times with different flags. If the same id was added again and again with varying flags, this could lead to an ever expanding list filled with duplicate entries. Fix this by also taking flags into account in operator< so that operator< and operator== are symetric and the list gets correctly sorted. Change-Id: I762ec3f0c5b4ed9a1aecb9a883187a0445491591 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Fix support for QJSValue as C++ signal parameter type, part 2Simon Hausmann2017-01-181-1/+1
| | | | | | | | | | | | | | | | After commit 0e3380f9c6ab6e3ea7398caccf5aa84f1575f1cd we wouldn't crash anymore, if QJSValue::UndefinedValue was provided as value for a QJSValue C++ signal parameter. However that was not a complete fix for the regression of commit aa869cbb06bcf005e238059a2cb0205947ff0b5f, as other primitive values stored in QJSValue as QVariant were not converted, so for example QJSValue(42). So let's fix this once and for all by using QJSValuePrivate::valueForData, that handles all types of QJSValuePrivate encodings. Task-number: QTBUG-58133 Change-Id: Ib7c0461b18df6260ccd4bce729ae2348281eb7f3 Reviewed-by: Arnaud Vrac <avrac@freebox.fr> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clarify that QML's date object includes timeKavindra Palaraja2017-01-161-2/+2
| | | | | | Task-number: QTBUG-42495 Change-Id: I0f7693ed32d3ec696f5c75b7ce7acdb41dd0ce6f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix build without feature.statemachineTasuku Suzuki2017-01-161-2/+2
| | | | | Change-Id: Iea95465a88627e312259ea62a8908d9cbb3f82ac Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix build without feature.shortcutTasuku Suzuki2017-01-153-3/+17
| | | | | Change-Id: Id0ea0037db4cc3878ae2f75109aa3a7daa120189 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.8.0' into 5.8Liang Qi2017-01-141-1/+9
|\ | | | | | | Change-Id: I981c19429b1bf6f0990b5740c165e235829f702e
| * Fix incorrect JavaScript evaluation with the JITv5.8.0Simon Hausmann2017-01-061-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression from commit 7e14b531b294650733a61a9365eb9ef74f8a7a90, that replaced a QHash<temp, liveInterval> with a vector of intervals. When an interval is split, it may happen that during one interval a temp is stored in a register and in the second interval it ends up in a different register or the stack. The _liveIntervals variable, formerly the _intervalForTemp hash, tracked the intervals per temp when going through the basic blocks and statements during the renumbering phase. Indexing uniquely by temp is important therefore for _liveIntervals and addNewIntervals violated that by replacing the QHash replacement _intervalForTemp[i->temp()] = i; with _liveIntervals.push_back(i); This is how we may end up with multiple intervals for the same temp (in different locations), and when doing the linear lookup we'd only find the first. Restoring the replacement behavior and thus ensuring uniqueness by temp fixes the miscompilations. Task-number: QTBUG-57779 Change-Id: Ib8f53672b66750f68e16e47794dbc5f39989e1a2 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Remove documentation references to internal functionsKavindra Palaraja2017-01-131-7/+0
| | | | | | | | | | | | | | | | | | | | QSGOpacityNode::combinedOpacity() and QSGTransformNode::combinedMatrix() are intended to be internal. Task-number: QTBUG-53897 Change-Id: Icc73476eb8af5cdc673f7ce9bacd25ecc75202b5 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* | Fix crash when C++ QJSValue parameterized signal interacts with JSSimon Hausmann2017-01-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | When converting the parameters of a C++ signal to JS values to provide to a signal handler written in JS, the conversion of a QJSValue to a QV4::Value* may yield a null pointer in case of a default constructed QJSValue for example. This is a regression from commit aa869cbb06bcf005e238059a2cb0205947ff0b5f and we must check for this. Task-number: QTBUG-58133 Change-Id: I528b606b2851dfb3072e54902bd8843d31571a55 Reviewed-by: Lars Knoll <lars.knoll@qt.io>