Fix nodetest autotest.

GL context was initialized with the wrong surface format resulting
in warnings, and we did not clean up the render context properly.

Change-Id: I19f748ca985a0becf1f7a6caa987f21567029cfd
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Alex Montgomery
Do not crash if /proc is not mounted

When proc is not mounted pthread_getattr_np fails, so default
to 1MB stack in getStackLimit and to exactGC in MemoryManager

Change-Id: Ic7515fd420f2d39a656808d24a3915a657722891
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix some compiler warnings in tests and examples.

Change-Id: Ia739c995005635caf6fd0bd4e495ed8567350e83
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Add support for a separate index buffer

The renderer binds same buffer both for vertex and index data.
This is allowed on desktop & ES but is forbidden in WebGL.
Add a compile-time flag to disable this optimization(?) and
force using a separate buffer for the index data.

Change-Id: I57c17c883a55e02513a8e4427efb202cafaaf37e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Make sure that profiling can only be started if debugging is enabled.

Enabling the profiler doesn't make much sense if there is no debug
service as the messages can't be sent anywhere then. Furthermore, the
profiler instance is only properly initialized if debugging is enabled
and thus enabling profiling without debugging being enabled can cause
problems.

Change-Id: I784a110126d45a9a2bc9d9e14d9a22e2980c3a42
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Remove the two default role names listed in cppmodels documentation.

The list is incomplete, and they are now fully documented under
QAbstractItemModel::roleNames(). This saves us maintaining two lists
that can easily get out of sync.

Change-Id: I4895a8ba19a4f48c26b4077e8bf2eba8c4c8407c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
V4: remove unnecessary spills and order them correctly.

When doing edge resolving, too many spills were generated, and the
dependency tracking of moves was not complete. Now we only insert spills
that are caused by phi-nodes (because any other spill would be generated
at the point a variable was defined). However, there can still be
multiple dependencies between the moves generated by the edge resolving.
Instead of only checking the first dependency, all of them are tracked.

The bug report was a case where an unneccesary spill was generated, that
got tracked, but "suppressed" the other (valid!) dependent move. The
randomness was caused by the hash seeding of QHash.

Task-number: QTBUG-35840

Change-Id: Ifbc3c8fc13de53c46a8b5859721b2497189921a3
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Revert "Support batching of rotated antialiased elements."

This patch broke scaled text rendering

This reverts commit 6acaa1c42936f89d74324be9c0cce4873a9a565b.

Change-Id: I1f7a3ba0556f6d59bc1e28946631be2d9fc2b67d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Increase the timeout for QPacketProtocol tests

Recent failures when testing a completely unrelated one-line commit
(https://codereview.qt-project.org/74584) suggest that the timeout is
actually too small.

Change-Id: I9c3fd0b09c6be2d42f92485c3c223fe88bb8328e
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Make sure the test window has focus

Some setups like xvfb-run under Linux do not focus windows
after showing them, this means that any focus based test will
fail since the windows itself is unfocused. This makes sure
the test window will be shown and focused.

Change-Id: I1903b7cdf88b772e1ca15acd4899695b49615712
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
V4 IR: update immediate dominators when purging unreachable basic-blocks

The basic block scheduling uses this information to place loops. When
the immediate dominator information is invalid, the scheduling can be
sub-optimal, or will sometimes forget to schedule some blocks.

Change-Id: Iaeb45f2b757b676310be25a658ceadc07d5722ec
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
V4: lower memory allocator pressure.

Changes to datastructures and more re-using of locally used temporary
vectors. For the test regress-74474-002.js this lowers the total
allocated memory from 1.98GB to 158MB. Thse peak memory usage stays at
75MB. There is no functional change.

This should give a modest performance improvement which mainly depends
on the speed of malloc()/free().

Change-Id: I1877c1903e59a33ee79ff2b801ef6f2c1cee30a6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
V4 IR: do edge splitting after SSA transformation

This reduces the work for the dominator tree/frontier calculations,
because there are less blocks to consider. All blocks inserted by
splitting the critical edges, have (by definition) no effect on the
dominator calculations. However, the immediate dominators for all new
blocks needs to be added, because this information is used by the block
scheduling.

This change reduces memory/time usage during optimization passes,
especially when processing excessively big switch statements.

Change-Id: Ia69882e9dabdddffa1c98b1079012d8d988e1e8f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix failing context->next != 0x1 assertion

After commit bf173fe5da381c88343296ca33ef6b06389c6d20 context objects are
always on the GC heap and no more in that special linked list or stack
allocated, so the next pointer became dangling/uninitialized and asserting on
it was bound to fail randomly.

Since we no more allocate contexts on the stack, we can safely remove the
assertion.

Task-number: QTBUG-35917
Change-Id: I104bd129c6c32f46a6302052f563abdf926cb879
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
QtQuick.Dialogs FileDialog: don't go astray into qrc:/ on Android

Was due to string->URL conversion when setting FolderListModel.folder.

Task-number: QTBUG-36006
Change-Id: Ia768d8a5473b3d4c22ef9be7c8b3cf28d3956f6f
Reviewed-by: Liang Qi <liang.qi@digia.com>
Fix usage of FileDialog.folder property in QtQuick

The content of the FileDialog.folder property has not been applied
to the native QFileDialog, so it was not possible to pre-select a
folder for the file dialog.

Change-Id: Iaadd6aa71bc37739c16a2e7c5bff2d0050f15f3a
Task-number: QTBUG-35973
Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
V4: relieve more memory allocator pressure.

For _ZN13BenchmarkDemo11initPhysicsEv from the Octane testsuite, the
total allocated memory drops from 1.5GB to 51MB. Peak memory usage stays
at 29MB.

Again, slow implementations of malloc()/free() will see a performance
improvement.

Change-Id: I21bc2f0d3735de0980fc9b3745906016e2e48a61
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Re-enable mac tests

Task-number: QTBUG-35344
Change-Id: Ifc4d5420c95a615b35f02ec585c324b2cc93c5e0
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Bump MODULE_VERSION to 5.2.2

Change-Id: Id20a6043ba142c14cd2b1062181a399e93782179
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Merge remote-tracking branch 'origin/release' into stable

Change-Id: Id18709cb0a4d85ffdadffa28aef98323367292d4