Commit Graph

7705 Commits

Author SHA1 Message Date
Lars Knoll 855784e5a7 Add support for large items to the memory manager
This is required, so we can track ExecutionContexts
through the regular memory manager.

Change-Id: I1bd2e2ef275e6e9e1f364a35affbb991f4377b05
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-11-22 14:54:14 +01:00
Lars Knoll ce26bfcb39 Speed up arguments object
Don't fully create the arguments object unless required.
In the 95% use case, we can avoid creating any array based
data structures for the arguments object and directly
manipulate the functions arguments. only create the full
data structure for the other 5%.

Speeds up the raytrace test by 50%, gives around 10% overall
on v8-bench.

Change-Id: If727d28b96585e83314f544031a6c3ca1817ea19
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-11-22 14:54:12 +01:00
Lars Knoll 9bf5e87ef0 Use lookups for create_property (ie. new foo.bar)
This is not used that often, but it removes one more place
where we do lookups by name.

Change-Id: I9f798b8b4a64be3fdf3e53090e4288724c9d2b22
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-11-22 14:54:05 +01:00
Andrew den Exter 1a76a4926a Fix assert after giving focus to a disabled item.
If an item has focus stolen by another item remove activeFocus from it even
if the item that gains focus doesn't gain activeFocus.  Otherwise the focus
tree will enter a state where an item that is not the subFocusItem of its
focus scope has activeFocus which is invalid and will trigger an assert
in QQuickWindowPrivate::clearFocusInScope().

Task-number: QTBUG-34779

Change-Id: I72408ec0e4fd9b05ef595147ef1ef95b6aed1c16
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-11-22 02:01:39 +01:00
Friedemann Kleint 9b7dabbe9a tst_qqmlxmlhttprequest: Use QScopedPointer.
Ensure resources are cleaned up in case of failing tests.

Change-Id: Ie27800da37beac09fec34111af276ed029dcde20
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
2013-11-21 20:52:58 +01:00
Robin Burchell 8121ae60de Always check for dragging changed, not just when movement starts
Otherwise, if you flick and then start a new drag before the flick
completes, dragging remains false.

Change-Id: I9bbe20107317a6edf765c87d2e0afe3e9e2618e9
Done-with: Aaron Kennedy <aaron.kennedy@jollamobile.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
2013-11-21 00:58:04 +01:00
Jocelyn Turcotte 8171e3f8c8 Use the sharing context when grabbing a hidden QQuickWindow.
This allows QtWebEngine auto tests to grab the window's contents
without having to show it.

Change-Id: I5989a9815d0f69a7eff655f322c99d6051fc4d25
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-20 14:20:32 +01:00
Frederik Gladhorn 79ba800108 Merge remote-tracking branch 'origin/release' into stable
Change-Id: Id732233d56e8d1706f62ef7a153d4a471406c551
2013-11-20 13:36:53 +01:00
Gunnar Sletta 8ae390e75b Fix bad refcounting for Context2D.drawImage with an image item source.
The pixmap we get from createPixmap is cached internally in the
QQuickCanvasItem's cache so we need to refcount it properly. Using
take would result in the refcount going to zero in this function
which would cause a crash.

Task-number: QTBUG-34714
Change-Id: I5f0e75a7117c53e4b89ac133ba7d161bc7b9053d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-20 10:22:16 +01:00
Frederik Gladhorn c8a688a56d Stabilize tst_qpauseanimationjob
This test is highly timer dependent and contains so many windows special
cases that indicate problems (when timers are not accurate or the
machine is busy).

Change-Id: Ie057d560d39300252ffb6c19b4d1446179c0e56a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-11-20 10:16:54 +01:00
Lars Knoll 91364ea88a Check that the pathlist is not empty before calling sort() on it
Try to fix QTBUG-34834, where the app crashes because we replaced
qSort with std::sort(). Apparently std::sort always dereferences
begin(), even if it is the same as end().

Task-number: QTBUG-34834
Change-Id: I6207a27f61f21265dd964d7f4a6b78d059c615c8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-11-20 10:06:18 +01:00
Liang Qi 6d4d98bc59 V4: fix Array.indexOf() for QStringList
Autotest is included.

Task-number: QTBUG-33542
Change-Id: I46c3a81006019c6613a3d35aa018217f85a15d0b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-11-20 10:06:12 +01:00
Sergio Ahumada 893143e395 Bump MODULE_VERSION to 5.2.1
Change-Id: I211610ee4153fa1e24de085d64bd735ce3746ae0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-11-20 08:58:56 +01:00
Andy Nichols d53313288e iOS: Fix Build error in QSGTexture
We don't do build tests for qtdeclarative, and so this guy slipped
through the cracks.

Change-Id: I2ac29c6b7ec70f4dc4ca4bc682203bbca06f0e2a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-11-19 17:49:22 +01:00
Tor Arne Vestbø 13158e4bc3 Fix build on iOS
Icccd542b8122c7bfa0e83 and Ia6e9f06dbb850 clashed.

Change-Id: Iaea844c9955eb29104ee32660499a67cb7224cbf
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-11-19 17:45:21 +01:00
Lars Knoll 2602390bdb Greatly reduce memory consumed by QQmlEngine instances
Due to a inefficiency in our InternalClass implementation,
we were not sharing the string and attribute table between
internal class instances.

This was extremely inefficient with the Qt object, as it created around
1000 internal classes with large string and property tables. With the
patch these tables are now shared.

Reduces memory consumption of a QQmlEngine instance from around 6.5M
to a couple of 100k.

Change-Id: Ib763f31deca0808c000ac2c30aa0b05e806bda40
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-11-19 14:39:26 +01:00
Shawn Rutledge 8b8f8382d6 FileDialog example: remove setGeometry button
This was more of a manual test than an example: it should be possible
to set the geometry of widget-based and qml-based dialogs.  Since it
doesn't work for native dialogs let's not invite bug reports about it.

Change-Id: I43cb97bff0af932268ae541e3f812fc17a1f76ae
Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-11-19 13:00:53 +01:00
Fabian Bumberger d6f9e961ca Fix compilation on QNX
pthread_getattr_np is not available there, so we use the default implementation (1MB stack limit) for now.

Change-Id: Ia1f3cbbcd846998b688541c0b576ef42f22ac8b6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-19 13:00:45 +01:00
Erik Verbruggen 48c45418cc V4: remove failing assert and fix code.
Assert failed for cases where the node’s ancestor with lowest
semi-dominator number was not the same as the parent. The test case
exemplifies this.

Task-number: QTBUG-34792
Change-Id: Ie6847b22a27211801bff7479bfcbfaf329c6005a
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-11-19 13:00:37 +01:00
Gunnar Sletta 12eab91627 Safely abort when we don't succeed in creating a GL context.
Task-number: QTBUG-33363

Change-Id: Ia2b0c329157786cb4ec703989f12d2fdb1ce6bc8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2013-11-19 12:16:25 +01:00
Simon Hausmann cac9989643 Fix failing assertion when trying to assign to an id referenced QML object
References to id addressed QML objects are member expressions, which are unlike
other member expressions by not being lvalues. Handle this correctly.

Task-Number: QTBUG-34890

Change-Id: Ied6230edbc561128ad36bf0d1a1918185204deec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-19 07:57:45 +01:00
Erik Verbruggen da31479ee2 V4 SSA: speed up dominator calculations.
Changed three recursive routines to worklist-based iterative ones. This
not only speeds up the dominator frontier calculation, but also prevents
the algorithm to run out of stack space.

This is a partial fix for QTBUG-34047.

Change-Id: Ife8dc35724d50408ad356e1621884bdb82db9626
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-18 20:24:07 +01:00
Erik Verbruggen 034cc94459 Fix compiler warnings with mingw64.
Task-number: QTBUG-34152

Change-Id: Ibb93d1cac8c343a7ca34ce7d010f24fc56ba89df
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-18 20:23:29 +01:00
Gunnar Sletta e1b51ed1db Make sure we clean up GL resources before we delete the GL context.
Task-number: QTBUG-34806
Change-Id: I5013baaff0ca86357292474976944c1a3056f219
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2013-11-18 17:03:00 +01:00
Lars Knoll b864e16728 Fix small bug in array sorting
Task-number: QTBUG-34321

Change-Id: I33089499f730bce16a9dfdda04cc8402602bc5fa
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-11-18 17:03:00 +01:00
Albert Astals Cid 96ee686016 Make comparison of singletons and qobjects work
Otherwise you can end up with some weird situation in which you have
two objects, you print them and then you print the comparison and get
a Foo(0x858480) b Foo(0x858480) a == b false

Task-number: QTBUG-34651

Change-Id: Id2444d919f039be085eb5ed9112345db691540a5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-18 15:53:57 +01:00
Jerome Pasion 14518ca237 Doc: Fixed list of animation types.
-manually created list duplicates the generated list.
-\generatelist{related} doesn't do anything for a regular \page.

Task-number: QTBUG-33360
Change-Id: I0bf870c71d3985e232fa8c0d5ef7ad572f596e99
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-18 15:53:57 +01:00
Gunnar Sletta 2991947c31 Make use of GL_APPLE_texture_format_BGRA8888.
Texture uploads on iOS is extremly slow without it.

Change-Id: Icccd542b8122c7bfa0e839c25e988d107bc17d2a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-11-18 15:53:57 +01:00
Lars Knoll 95d35ab188 Fix interaction between head room and appending in arrays
We reserve space on both ends of the JS array for appending
and prepending. Make sure they interact well with each other
and don't cause any memory corruption.

Task-number: QTBUG-34853
Change-Id: I184280178690e3cb12ab9b199a8436b32383af38
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-11-18 15:53:57 +01:00
Lars Knoll 3d145175fd Don't assert in QQuickItem::update
The method can actually be called from QML, so we can not
have an assert in that method. Instead simply return if the
item has no contents

Task-number: QTBUG-34060
Change-Id: Ib28ffa5c6c63fbec956abe25020010ed73a9cfa9
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-18 14:43:13 +01:00
Friedemann Kleint a01ad3934b qqmldebugclient.cpp: Fix warning about missing return.
In file included from ../shared/qqmldebugclient.cpp:473:0:
../shared/qqmldebugclient.cpp: In member function
'QString QQmlDebugClient::stateString() const':
../shared/qqmldebugclient.cpp:452:1: warning: control reaches end of
non-void function

Change-Id: Ic5422dcff41591691621077ade45b6ea3ea3a8f1
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-18 11:15:04 +01:00
Lars Knoll 965878e88a Limit the amount of memory we allocate on the stack
Setup limits for both the C and the JS stack, and check
them before entering functions. If we run out of space,
throw a RangeError exception.

Be careful and recheck the stack bounds when things go
outside. This catches the case where the engine got
moved to another thread changing the stack boundaries.

Windows currently uses an unsafe fallback implementation,
this needs to be fixed later on.

Task-number: QTBUG-34568

Change-Id: I22fbcbec57b28f9cc8a49e12f1cc6e53e4f07888
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-18 11:05:25 +01:00
Alan Alpert a5d0ed01c8 Don't call receivers from disconnectNotify
A pending documentation update is going to explain that you can't call
into QObject functions from disconnectNotify, or it may deadlock
on the signalSlot mutex.

Task-number: QTBUG-34829
Change-Id: I57e7b4e457d813d4255c8cdbe36228b2e0f45aaa
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-17 12:42:48 +01:00
Kai Koehne b3d0da4ee6 Remove '-enable-debugger' argument from qml executable
Task-number: QTBUG-34836
Change-Id: I3ab2a16036a1086c0ac1f50880a402caf9f54f2d
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-11-16 07:05:29 +01:00
Gunnar Sletta f189bb4581 Fix lockup in creator.
My previous fix to force expose when the render thread is inactive
was not enough. We now lock down access to 'QSGRenderThread::window'
so that it will always be set when the thread is in the "exposed"
state and 0 when the thread is in the "obscured" state.

This introduces another sync point in handleObscurity to protect
the writing of window in the render thread.

Task-number: QTCREATORBUG-10793
Change-Id: I1e1153189b3a3562705892b42625f88ef6329188
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-15 21:25:05 +01:00
Jacek Całusiński e2ca539562 Do not crash when one of group animation's children is null
Check if pointer to QQuickAbstractAnimation for which we are setting
group is valid.

Task-number: QTBUG-34851
Change-Id: Iecb549f080804fd9489f884911fa51892def05a5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-15 16:33:46 +01:00
Maciej Kujalowicz 9656078366 Remove version definition from custom particle shaders for OpenGL ES.
Since OpenGL ES 2.0 does not support GLSL 1.2, #version 120 must
be removed from embedded shaders for a custom particle.

Task-number: QTBUG-34854
Change-Id: I8d3e51ff87acc099a53c4e312cd33d02e6a1cb4e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-11-15 16:33:39 +01:00
Alan Alpert 5eb2a916a4 Deprecate logicalPixelDensity
It's just not working out in practice, and we don't want to confuse
users with having to pick their flavor of pixel density.

Task-number: QTBUG-34798
Change-Id: I552e479515a6f5249685844143601cb7449ccccc
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-11-15 16:33:30 +01:00
Shawn Rutledge 69cf114723 examples/quick/window example: fullscreen is possible on OSX
It's normally disallowed without the WindowFullscreenButtonHint.
But if we're going to declare a value for flags, then we have to
put back the Window type which would otherwise be there by default.

Task-number: QTBUG-33607
Change-Id: Ibbd593b2648b98d37c7f70a0b9f96787b0a40f22
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-11-15 16:33:24 +01:00
Lars Knoll 0dc17ae4d8 Fix === operator for value types
Fix === comparison for urls and other QML value types.

Task-number: QTBUG-33546

Change-Id: I4a7066e6bbc7de7c599fe2c7b2fdfb75e0ff5196
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-11-15 13:07:52 +01:00
Jerome Pasion d7a876d002 Doc: Fixed QtQuick.Window documentation
-fixed import statement in \qmlmodule and \inqmlmodule command.
-Removed extra identifier in property documentation.

Task-number: QTBUG-33360
Change-Id: I1e7ca5f418c327d42247ab4f4a11733c63d8c273
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-15 13:07:36 +01:00
Gunnar Sletta ccc0e75fb6 Fix stacking order bug in the renderer
Since we are sorting batches based on the zorder of the first element
it is crucial that we don't continue adding to batches once an overlap
with a compatible element is found.

Task-number: QTBUG-34864
Change-Id: Ic2194c5c17bba0bc9874a14e8a69c81bff75bd1c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-11-15 13:07:26 +01:00
Lars Knoll d8fe3dfde9 Don't crash when trying to assign to null.prop
Fixes a regression introduced during the exception handling
refactoring.

Task-number: QTBUG-34544

Change-Id: Ib751274d759030db3e5d3b1380b30dc07ec85f83
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-11-15 13:07:11 +01:00
Kai Koehne a82f89da2a Make tst_qqmlprofilerservice more robust
Don't expect only application output to be printed. E.g. a stray
qDebug somewhere in Qt could break this test so far ...

Change-Id: Ibdc31fba3bd8d822c264bd44515d16e648db9a8e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-15 13:07:01 +01:00
Lars Knoll 23680b185d Don't dereference a null animationTemplate
If the SpringAnimation gets used inside a Transition, the
animationTemplate might get cleared, but updateCurrentTime()
still gets called on the SpringAnimation after that.

Task-number: QTBUG-34539
Change-Id: I1f27fdbfc594e6ff9a4343e45f7f4001964bb012
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-11-14 16:30:41 +01:00
Gunnar Sletta 44e204ea9d Avoid deadlock in Qt Creator
Task-number: QTCREATORBUG-10699
Change-Id: Ia88df5ec4ea74fda6a0449aa739a9c6976fedb02
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-11-14 16:30:10 +01:00
Gunnar Sletta c4ced2a9d4 Improve internal debug statements.
Now that we have one thread per window it is useful to know which
thread and window prints out the messages.

Change-Id: I699eae180575fd3355551ebe0bfe6fd6ac8837c9
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-11-14 16:29:52 +01:00
Gunnar Sletta f0553874b3 Respect device pixel ratio in "OpenGL under QML" example.
Change-Id: I1b67acfdcdb1fb47593a6acd62ffd6c3315b5503
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-11-14 15:54:11 +01:00
Gunnar Sletta cd0f3fba78 Add support for quaternion in ShaderEffect
Task-number: QTBUG-32605
Change-Id: I4e90a3505740dd9a8b369dac6ce05ce066d14d44
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-11-14 15:54:10 +01:00
Erik Verbruggen f0349e789a V4 debugging: fix step-over and step-out.
- step-out: only stop if we’re leaving the context for the function we
  previously stopped at, so intermediate calls between the current
  position and the end do not stop the engine
- step-over: set breakpoints on all lines in current function and
  continue to run. When hitting a breakpoint, see if we are in the same
  context, because recursive calls might happen. Breakpoints on all
  lines are needed, because the (pure) next line might be jumped over
  (like when doing step-over a single-line then clause, where the next
  line might be in the else clause).

Change-Id: Idf35dc740ca64fae5079162162906490a96af2a7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-14 14:43:38 +01:00