aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersJani Heikkinen2015-02-12748-6579/+5803
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Add offset test for QV4::Heap::String::texthjk2015-02-121-0/+9
| | | | | | | | This is used in Qt Creator's "native mixed" access to runtimeStrings. Change-Id: I5c94ec8bff0734e5dc032aa739bfbb51af9b9820 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
* Respect the text's background-color when it is set in the style in HTMLAndy Shaw2015-02-051-0/+14
| | | | | | Task-number: QTBUG-36837 Change-Id: Iea85f4bc7c66124178a318f0ebd776726cf72c96 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* tst_qquickview: Prepare test to handle multiple pieces of data.Robin Burchell2015-02-041-7/+7
| | | | | | | | Additionally, stack allocate the view. It's shorter, and saves an almost totally pointless QVERIFY. Change-Id: Ic90602d24659e1455dd50b706f96ef5ccac14f3a Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* QQuickItemParticle: Only delete owned particlesAlan Alpert2015-02-043-0/+165
| | | | | | | | | | | | | | | | | A common pattern for ItemParticle (as shown in the particleview.qml example) is to use it to manage movement of a model's delegates. In such a case item management is handled by the user code (which bridges the needs of the Model and the View) and deleting the items in ItemParticle quickly leads to crashes. This change maintains (and improves, due to handling resets) the deletion of delegates created by the ItemParticles, as shown in delegates.qml. This example was expanded with a click to reset feature so as to more clearly see the impact of resets. Task-number: QTBUG-37486 Change-Id: I9de935034c11a7dd2abdd60e7b3bd42867dede9c Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Re-enable ListView auto-testGabriel de Dietrich2015-02-041-0/+1
| | | | | Change-Id: Ie0117dddc1da95b9463ca67e15fce8b5ac65e1dd Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Remove meta-type declaration for QPersistentModelIndexGabriel de Dietrich2015-02-032-2/+0
| | | | | | | | | The auto-test will be re-enabled once https://codereview.qt-project.org/103726 is merged in qtbase. Change-Id: I52ff538c3ca09b3e686483c2d0c3c66089acc13c Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Fix autotest not to rely on broken operator<<(QDebug, QUrl) behaviorKai Koehne2015-02-031-7/+6
| | | | | | | | | | | | QmlInfo does call nospace() in the constructor. However, the current streaming operator for QDebug permanently resets this to space(), which the autotest relies on ... Move QUrl to the end of the chain so that the broken behavior of QUrl isn't checked anymore. This allows us to fix it in qtbase ... Change-Id: I365df3479a2724f69e768c23c0844f10c34b71be Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add some tools specific consistency testshjk2015-01-293-1/+132
| | | | | | | | | | | | | | | | | This upstreams parts of Qt Creator's tst_offset test to serve as an early warning system by testing private implementation details that are used in Qt Creator's data structure "pretty printing" facility and "native mixed" QML-and-C++ debugging. While the tested implementation details can be changed without breaking binary or source compatibility, downstream tools like Qt Creator depend on them. If this test breaks, you are kindly asked to coordinate with the downstream stakeholders to avoid tool breakage. Change-Id: I2286efcec9bef105f80c2163a4f66f5c43f3a218 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* CleanupsLars Knoll2015-01-231-1/+1
| | | | | | | | Remove duplicated methods. Remove some mostly unused methods, and simplify some others. Change-Id: I605b249e54417bb32c3dfc8e22f2c8b6b684a1e1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove all remaining usages of ValueRefLars Knoll2015-01-232-6/+6
| | | | | Change-Id: Icd76d3d03fac2e57530e55f8ec15b97109dcdcbc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of most uses of ValueRefLars Knoll2015-01-231-1/+1
| | | | | | | | | | | | Instead pass a const Value & into the functions With our new inheritance structure, we can get rid of ValueRef and instead simply pass a pointer to a Value again. Pointers to Values are safe to use again now, as they are now guaranteed to be in a place where the GC knows about them. Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Introduce ShortcutJ-P Nurmi2015-01-235-0/+574
| | | | | | | | | | [ChangeLog][QtQuick] Added a Shortcut utility type for catching keyboard shortcuts Change-Id: I4af631bfa7987f0d809b1f5af499f1d9688a1e04 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Introduce Flickable.OvershootBounds behaviorJ-P Nurmi2015-01-211-0/+6
| | | | | | | | | | | | | | | | | | | Related to QTBUG-38515. It is not always desired to allow dragging over bounds even if flicking overshoots. This makes it possible to implement collision effects for flicks, while a drag over bounds would still do nothing. [ChangeLog][QtQuick][Flickable] Introduced Flickable.OvershootBounds behavior that allows content overshooting the boundary when flicked, but does not allow dragging content beyond the boundary of Flickable. [ChangeLog][QtQuick][Important Behavior Changes] Flickable.DragAndOvershootBounds value changed from 2 to 3. This will only affect you if you've worked around enum type checking and have the integer value explicitly in your code. Change-Id: I63c3540ab293a9c7c801d81220f74909d3fa1e17 Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
* QQmlValueTypeWrapper: Use QVariant to QString conversion if possibleGabriel de Dietrich2015-01-201-0/+30
| | | | | | | | | | | This makes it easier to customize displaying Q_GADGETs that don't have a toString() function defined. Instead of having to define a wrapper Q_GADGET class, it's more straightforward to register a meta-type converter. Finally, it ensures consistent value displays between QML and the rest. Change-Id: I76f93ee0bafabd74f311130972b49c572b38f43f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Send hover events also to QQuickItem::childMouseEventFilterJørgen Lind2015-01-201-0/+108
| | | | | | | | | | | | | childMouseEventFilter already gets touch events, and it is logical to send the hover events which are essentially mouse events. By also sending hover events to the filter it allows an item to track the mouse. Existing implementations of childMouseEventFilter should not be effected by more events being sent to it as checking for the event type should be practiced in all overloads. Change-Id: Ie00aceef05e41e4e8f6d80007343c5a5b9f566cf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Expose QStyleHints as Qt.styleHintsJ-P Nurmi2015-01-171-0/+14
| | | | | Change-Id: I0fc94e680b011963e645bdbf51110820751e53aa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devSimon Hausmann2015-01-168-4/+78
|\
| * Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2015-01-168-4/+78
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4debugging.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject_p.h src/qml/jsruntime/qv4qobjectwrapper.cpp src/quick/scenegraph/shaders/visualization.frag tests/auto/qml/qjsengine/tst_qjsengine.cpp Change-Id: I492e8546c278f80a300a2129e9a29d861e144a30
| | * TextEdit: fix construction time text cacheJ-P Nurmi2015-01-081-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickTextEdit does not apply cached text to the underlying document until component construction is complete. However, if text() was called during the construction (eg. because of a binding), it would blindly overwrite the cached text with (still) empty document content. Task-number: QTBUG-41583 Change-Id: I6c5c1b6283d70d8a5ec2c8bd986095ee3c35a14c Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
| | * Parse dates as Qt::RFC2822Date tooAlbert Astals Cid2015-01-082-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQml] Fix JavaScript Date parsing to correctly accept RC2822 dates. Task-number: QTBUG-38011 Change-Id: Ic7d3f5b8c624d6780d4c3595fd2efe22c427ffd3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * V4: fix reverse type propagationErik Verbruggen2014-12-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Only do integer add/sub/mul when all operands are known to be integers. [ChangeLog][QtQml] Fixed invalidly opportunistic truncating of non-integer values for additions/subtractions/multiplications in JavaScript and binding expressions. Change-Id: I21b3bede2fb3e8033305591110b98cc9e6bf52f8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * V4: only optimize out to-int32 conversions when the operands are int32.Erik Verbruggen2014-12-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | The operands of bit-ops are not typed as int32 when no type-inference is done, like for the interpreter. Task-number: QTBUG-43309 Change-Id: I67af18e14ddbc0649530ac23601332ee7d7a1f34 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Change Qt bugtracker URL to qt.ioAlex Blasche2014-12-162-2/+2
| | | | | | | | | | | | | | | | | | Change-Id: I3dde034b2a36c324df9f4e1fd2e05a07a7237c04 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | * QML Debugging: Fix breakpoints/stepping in a with-statement.Erik Verbruggen2014-12-101-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Also fix the stack-trace generation, otherwise the debugger engine would report a breakpoint hit on the wrong line. Change-Id: I6eb4b508fbdca64d03badd8f9312a05c78781ded Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * QML Debugging: Fix crash when stepping through try-catch block.Erik Verbruggen2014-12-091-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also fix the stack-trace generation, otherwise the debugger engine would report a breakpoint hit on the wrong line. Task-number: QTBUG-42723 Change-Id: I1f655a5174b28a1c9c31c85bbe023fbce5ddbb96 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * QML: fix warning in testsErik Verbruggen2014-12-091-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Mark unused fields as Q_UNUSED. They are still "used" to check if the compiler will generate warnings/errors (which it shouldn't). Change-Id: I38e1668e88d94ab8f26a92a06f5207b77369e136 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Avoid an incorrect warning when dynamically parenting a WindowJocelyn Turcotte2015-01-163-21/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Created graphical object was not placed in the graphics scene." QQuickWindow is the root of a graphics scene and doesn't need to be inside another one. It is already suggested in the Window documentation that Window can be an inline child of a top-level QtObject. This patch fixer the warning when dynamically creating a Window component. Change-Id: Ie6d9d37b9e9ffdb61101aaaad6f4b722216ec759 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Redirect console.info to new QtInfoMsgKai Koehne2015-01-151-1/+1
|/ / | | | | | | | | Change-Id: I6f4560a3baae16dd6db090d51a577060689825ef Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Make sure we always have an engine when assigning to a PersistentLars Knoll2015-01-131-3/+4
| | | | | | | | | | | | | | This prepares things for a rewrite of the internals of Persistent. Change-Id: Ib93ec5911984d1bfce87ffdc3f86bc75f6ecafe9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix flick() with ListView.SnapToItem at bounds.Michael Brasser2015-01-132-0/+39
| | | | | | | | | | | | | | | | | | | | Previously flick() would not always allow flicking to the very end of a ListView if ListView.SnapToItem were set. Stop ListView from adding overshoot, and then incorrectly correcting, if we are flicking exactly to the end of a list. Change-Id: Iad56e433bc1ba7d62f0553c4355469c9861df919 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Improve startup of bindings using QQuickScreenSimon Hausmann2015-01-121-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can optimistically initialize the underlying QScreen to the primary screen and this way ensure that in the common case the evaluation of bindings using the screen's attached properties results in correct calculations on startup. This way we can avoid re-evaluating the bindings again later. Previously on startup all the returned values were zero and the bindings got evaluated again once a window was assigned. Change-Id: I98ba5905953f0b5054d924919239d178570250d3 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Add ability to retrieve QJSEngine for a given QObjectSimon Hausmann2015-01-121-0/+15
| | | | | | | | | | | | | | | | [ChangeLog][QtQml] Added qjsEngine(QObject*) getter similar to qmlEngine(object) that allows retrieving the engine for an exposed object. Change-Id: Id14adec58d45fe58133f65bab773b07d6bc18569 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add Window.width and Window.height attached propertiesJ-P Nurmi2015-01-092-0/+8
| | | | | | | | | | | | | | | | [ChangeLog][QtQuick] Added Window.width and Window.height attached properties Change-Id: I3ef590a0d3e6fa660ed88992d5ae843deb09c7bc Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Stabilize the drag related autotests for higher dpi displaysLars Knoll2015-01-092-8/+8
| | | | | | | | | | | | | | | | Higher DPI displays might have a larger StartDragDistance (at least on X11), breaking the autotest on these displays. Change-Id: I9768a245a7654665dd9f718100289e9416d8c855 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Cleanup variant conversion codeLars Knoll2015-01-091-1/+1
| | | | | | | | | | | | | | | | Make public methods proper members of the ExecutionEngine, and move private methods into the .cpp file only. Change-Id: I3ca49e39bb1c4e559a2c63346e6ae6cfa446147d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Move the variant conversion methods from qv8engine to qv4::ExecutionEngineLars Knoll2015-01-091-1/+1
| | | | | | | | | | Change-Id: Ibd529ae5cc3ba06f46152e9daa9119a4e7a2561c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Clean up JS .import/.pragma directive scanningSimon Hausmann2015-01-082-3/+6
| | | | | | | | | | | | | | | | | | | | | | There's a scanner in QQmlJS::Lexer::scanDirectives that can parse those, so let's get rid of extra parser that operates on a string. Instead this way we can do the scanning all in one shot, avoid detaching a copy of the source code string and (most importantly) bring the parser closer to the copy in Qt Creator, which uses the directives approach to extract imports and pragma. Change-Id: Iff6eb8d91a45d8a70f383f953115692be48259de Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
* | Remove qv8engine usage in the contextwrapperLars Knoll2015-01-081-1/+1
| | | | | | | | | | Change-Id: Iaf807add5d971e96cac57e38e13385e901f9c930 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Get rid of QV8Engine::toStringLars Knoll2015-01-081-1/+1
| | | | | | | | | | Change-Id: Ib51fa09ae251c1b7b8878ecdf920016f8fcc0067 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove v8engine pointer from QQmlV4FunctionLars Knoll2015-01-081-1/+1
| | | | | | | | | | Change-Id: I68ddd79b8866ef9b8628a2eab1118d3ee3d72759 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Allow importing protected modules with different major versionsJ-P Nurmi2015-01-085-0/+98
| | | | | | | | | | | | | | | | This allows QtQuick.Controls 1.x and 2.x imports to co-exist even if they are two different plugins with the same module directive. Change-Id: Idee302439e3c2fd6813ba2f41b69144fbae7902c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix property access and method invocation on value types that use inheritanceSimon Hausmann2015-01-072-0/+57
| | | | | | | | | | | | | | | | | | | | For gadgets/value types we use moc's static_metacall, which doesn't call the parent class implementation. Therefore before placing a static metacall we must resolve the indicies and find the right meta-object. Change-Id: I258e3d9ecfc704498c68772dc42b16134a3bfd83 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Unify QQmlDirParser version parsing and error reportingJ-P Nurmi2015-01-073-1/+21
| | | | | | | | | | | | | | | | | | Add a parseVersion() helper function to avoid duplicating the same version parsing logic three times. Change-Id: I4e5b6a8c86ee3a26c4eb91c660a81176ac0346cf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | qmltime: Correct module name in error message.Robin Burchell2015-01-061-1/+1
| | | | | | | | | | Change-Id: Icccad866bdbaf53bf2cb3f1aff30ecd9ff6d06a5 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Add propertyName to errorAlbert Astals Cid2015-01-052-2/+2
| | | | | | | | | | | | | | | | | | May help a bit to the reader, even if the line is already there sometimes it can be confusing if it is a default property like data Change-Id: I5cb8e8833c78a784ad4f5541d094840477e8f350 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Use QV4::ScopedFunctionObject typedef instead of actual typeOleg Shparber2015-01-021-3/+3
| | | | | | | | | | Change-Id: I6b4effaa5bef992b4ae9402eea7fe655bc7b18f0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Use QV4::ScopedString typedef instead of actual typeOleg Shparber2015-01-021-1/+1
| | | | | | | | | | Change-Id: I64ecbf6cea463387a70e909ecc5f9165d22a7b0f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix build: include <qdatastream.h> before using QDataStreamThiago Macieira2015-01-021-0/+1
| | | | | | | | | | Change-Id: I779e0cd705f664368b47763d4367b9dc377c1770 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove v8engine dependency in toVariant conversionsLars Knoll2015-01-021-1/+1
| | | | | | | | | | Change-Id: I0f2f77c9cc268a0c5ca3ffe0cd66fc98bb1964b3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>