Improve qmlimportscanner.

Fix several qmlimportscanner defects:

- Expand qml file search to include subdirectories.
This applies to search paths specified with "-rootPath"

- Add "-qmlFiles" for specifying the file list directly

- Parse files with UTF8 BOMs correctly

- Don't set properties where the value is the empty string

Change-Id: I81a538d73487b49fb635c18ef4fe479748ba0bfc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
V4 interpreter: remove stack-slot allocator.

The life-ranges are only valid when the IR is in SSA form. So the use
of them in the interpreter after converting out of SSA form introduced
bugs. Instead, allocate a stack-slot for each unique temporary, and
re-use the code for this from the JIT.

Change-Id: I294f1116064f0b85996cf96a0b408b41a3c785e2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4: fix loop block marking for initializer blocks.

Any new blocks generated as part of the initializer were incorrectly
marked as belonging to a loop. For example, if a LocalForStatement
would contain a ternary expression, the generated then and else blocks
would be marked. This would confuse the block scheduling, because all
blocks are postponed unil the condition block (“group start”) is
scheduled.

Task-number: QTBUG-33754

Change-Id: I45919ebeac356f015bb91fe0210472b3df0b56d8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4 IR: scan arguments when entering function scope in QML.

When doing IR generation for a function declaration in a QML object,
call through the helper methods to check for forbidden names, and most
importantly, also checks if the function has parameters. If the latter
is the case, they need to be added as a member for the current scope
in order to get IR generation correct.

Task-number: QTBUG-34493

Change-Id: I0ade15ee19e1b1ac8ee2f2d3fa186d1551800199
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4 JIT: fix invalid sanity assert.

If there are multiple incoming edges to a block, and there are one or
more phi nodes at the start, then only check the temp uses for the edge
we are resolving.

Task-number: QTBUG-34770

Change-Id: Ibb5c7c323d6be8bc1ed492b08ed098de2f2726cc
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Remove unused _info on non-debug builds

Otherwise clang generates a warning which is fatal because of
treating warnings as errors.

Change-Id: I47c280edf6b0f8efa5ce24f9e92551304aed15fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Fix Canvas2d.createConicalGradient

The method requires 3 arguments, not 6

Task-number: QTBUG-34718
Change-Id: Ib6c117ba18844acecea3707720c0c88449b50fb6
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Fix Object::getArrayHeadRoom()

The method didn't adjust the size of the allocated array
properly, leading to crashes when being called repeatedly.

Task-number: QTBUG-34723
Change-Id: Ib58e7dcab6d0f5f46f3cf342eb541c1cc6b6cdc6
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
QtQuick.Dialogs: hide internal functions and properties

with double-underscores

Change-Id: If397bfaf50e0878516296eb4237bcf012eb8dae4
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Update .qmltypes files for 5.2

Task-number: QTBUG-34601
Change-Id: Icf5bdc2ea66b9a13186de957d5ae9c8701b481c7
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4 IR: change basic-block cleanup to remove unreachable cycles too.

The previous version left unreachable cycles untouched. For example in:

function f() {
  if (false)
    while (true) { doSomething(); }
  anotherThing();
}

The edge to the then-part would be removed, but the loop itself would
not be removed. This resulted in the basic-block scheduler choking when
hitting the block with the anotherThing() call, because it wants to have
all blocks from incoming edges resolved first.

Task-number: QTBUG-34776
Change-Id: I5b3a79140e6058c4ade4ec7687c1a795f1a74f97
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Fix out of bounds array index in the generated JIT code

When converting a double to int, make sure we check for >= 0
before using it, otherwise we get out of bounds accesses.

Task-number: QTBUG-34635
Change-Id: If72e116c08fe1dff03cd88ce510cf8b96d249b92
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Fix property dependency generation for accelerated QML QObject properties

The previous approach of collecting the dependencies through an IR visitor
doesn't work, because it relies on a fixed structure - for example MEMBER(NAME,
prop) - which we can't guarantee (it's usually MEMBER(TEMP, prop)). But it
turns out that we can only pre-calculate dependencies for context, scope or id
properties, so we can do that right away in the QML specific JS codegen, store
that information in the IR function and use it from there in the data structure
generator as well as in the isel as a parameter to getQObjectProperty to tell
the run-time whether capture is required or not.

Change-Id: I33711c3420d6534c653c2a6a4284f0fc12e941cf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix boundingbox calculation of rotated items.

Task-number: QTBUG-34328

Change-Id: If0202a67d95500333a0fb6f4ca3eb19ecb027770
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix warnings about deprecated string conversions in V4-debugservice.

Change-Id: I1b45876d2016fdcf1117c4f77b33c75f7d712657
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Polish up QQmlFileSelector

Incorporate beta feedback, and hide QQmlAbstractUrlInterceptor as the
implementation (instead of making that "the API").

Change-Id: Ib7b14afeb9205fb8a87ed16a6d38b1f468b2aaaa
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Revert ffaf39e9a7f11d4e2800b3b37160a2a952795614

Making it public right now seems a little premature, given all the work
happening on the engine now (and for 5.3). We'll be in a better position
to commit to it or not next release.

Change-Id: Ib7b14afeb9205fb8a87ed16a6d38b1f468b2bbbb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix native compilation on linux/arm with gcc 4.7.2

/disk/qt5-dev/qtdeclarative/src/qml/jsruntime/qv4function.cpp: In instantiation of ‘int QV4::LineNumberMappingHelper<field, SearchType>::lowerBound(int, int, SearchType) [with int field = 0; SearchType = int]’:
/disk/qt5-dev/qtdeclarative/src/qml/jsruntime/qv4function.cpp:142:49:   required from here
/disk/qt5-dev/qtdeclarative/src/qml/jsruntime/qv4function.cpp:106:13: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
cc1plus: all warnings being treated as errors

Change-Id: Ic97d6a2a9acd392d565e9c66f30159552473e092
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Make tst_nodes use QSGRenderLoop to behave more like QQuickWindow

Change-Id: I284164a45cabdb9f1fdbc2050db0cb00810ce946
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Doc: Adding FontDialog type to group "dialogs".

-needed for FontDialog to show up in the landing page.

Task-number: QTBUG-33360
Change-Id: Ic3ea5722e963045704e81a673ebd85770c0253a3
Reviewed-by: Matti Paaso <matti.paaso@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>