There's no equivalent to #pragma GCC optimize ("O0") yet, so we cannot run
these test (sort of) reliably with clang.
Change-Id: Ie41d3ba7911cefacca00165941761b20579107a2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
When registering the QList<qreal> sequence type, make sure to register it
with "QList<qreal>" as name right there. Otherwise it might happen that
the registration (without name) will find an existing QList<double> type id
and not register anything.
Change-Id: I15c837f26bfa713f50dfdbd7c697d55b094f3f0c
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Math functions come in std:: when #included through <cmath>
Change-Id: I62550e5c23cb6f4464f2c2f5c4188a91b3512d1a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This adds breakpoint support to the Debugger, a helper function in the engine
for enabling debugging (which will switch from JIT to the interpreter) and a
DebuggingAgent interface, for use by v4 clients.
Change-Id: I78e17a6cbe7196b0dfe4ee157fc028532131caa3
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This fixes the advanced tutotial based on
the samegame example. Several instances where
\page and \example occur in the same comment
are corrected by removing the \page and leaving
the \example. And the links in the tutorial's
list of chapters are correct.
Task-number: QTBUG-31578
Change-Id: I89bb179bc4d4f6120b8d13ba05a51c802a7d4013
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This fixes the dynamic view tutotial based on
the pets model example. Several instances where
\page and \example occur in the same comment
are corrected by removing the \page and leaving
the \example. And the links in the tutorial's
list of chapters are corrected.
Task-number: QTBUG-31578
Change-Id: I5a35b55806e33da5c82c37db1193f96fe74f038a
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Make the generated FDE program reflect that ESI and EDI are callee
saved registers. For some reason the program we've had in qv4unwindhelper_p-dw.h
for 32-bit was already correct, but the generator was broken (and even mixed
up the registers).
Change-Id: Id8132580d20636c8ea17f8460d161547227c95fc
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
The iterator stores the Property pointers the QV4::ObjectIterator returns,
which breaks when iterating over string objects, that always return the
same Property pointer in subsequence calls: &this->tmpProperty.
Given that internally QJSValueIterator already advanced the iterator to
the next property, value() will return the next value for strings instead
of the current value.
This patch eliminates the permanent storage of Property pointers in QJSValueIterator
and instead get()'s the properties when requested. This is slightly slower,
but safer.
Change-Id: I59028319a0b5dff339a7c9500f117b73f0677451
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This saves a conversion step in the FileDialog and rounds out the
FolderListModel API.
Task-number: QTBUG-32039
Change-Id: I63bc54cb91673aafba08d0d9f132073c129f0c18
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Clang complains about namespaces leaking from a header.
However in case of the QtQml namespace this is a
conscious decision. So we disable the warning.
Change-Id: I2a0536363abaa13b66984ddd681297aeab67edbd
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Partial revert of 1e9589eb0c2bb9404e11c69e1d76ef9efd89af56.
Creator currently needs this variable in order to find the QML files.
(see https://bugreports.qt-project.org/browse/QTCREATORBUG-9860)
Change-Id: Id5882dfe9733a6b401976e4d6e5baf2066d21b1b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Depends on f5dbc876378ae58a7bdfe1e9664fc81caca18dfb and
5069e203d7aff7fb49bf746071f66bfd41c1ae89
Reverts commits 17ded06804 and
and d9751bc29d
Change-Id: Ibe2347f3b57e4e569bc4966735e9623dfd274628
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Older versions appear to be much more sensitive to missing
unwind tables, and as it turns out: We were compiling QtQuick (not QtQml)
with -fno-exceptions.
Since the entire module has access to the private V4 API and may therefore
be subject to exception traversal, make sure to compile the entire module
with CONFIG += exceptions.
Change-Id: If2d029879392c22af7da2f1bba94366d51518226
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
the magic in qt_example_installs.prf handles this automatically.
Change-Id: I19f0560a6e3d2ddbe8a0128b463aecb7ff45475e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
None of the subdirectories here apepar to depend on each other.
Change-Id: Id8ac9f030ecc0b440ee5193bad9bb710cec11edd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
QtQuick and QtQuickTest data was missing from before,
so taking the opportunity to add it now.
Change-Id: I120ecd440c0c25e338aa2badafec6e1eddae5425
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some test cases rely on the fact that show() is not fullscreen, which may not
be true for some platforms. Explicitly make use of showNormal() to avoid
full-screen show on these platforms.
Change-Id: I0787fb62b8e37a73974f87857de200485d7ba6da
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The setParent function was used by the qml designer!
This reverts commit 8cb3b01688.
Change-Id: Id6236f5f27d0bf997c5670f3431cfd43721f380b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Followup to I9ae09416acdbe437acbe9672d0ecfc42059695ae so qtbase change
I61e99d498252241f38ec05724702a90ba050c4bb can get through CI.
Change-Id: I8bf3bca9b2a3b00b2471045cdc73f20329f99d9d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Make sure to initialize the vtbl correctly.
Change-Id: I65eab6e3fbb329b3595773db31fae4726d7683d4
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
We need to be able to reliably generate stack back traces for JavaScript
calls, and since we use the C stack we therefore need to be able to reliably
walk the stack.
On most platforms the stack back trace generation is tied to the same
mechanism that's used to unwind the stack during exception handling,
which uses compiler generated per-function tables that allow the run-time
to unwind the stack even when no regular stack frame was created.
Unfortunately on i386 on Windows there are no unwinding tables in use (as
opposed to all other architectures Windows runs on), and therefore we have no
reliable way of generating a stack back trace if functions can omit the
generation of a stack frame. Therefore we have to disable this compiler
optimization, using -Oy- for MSVC (see http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.71).aspx )
and -fno-omit-frame-pointer for gcc.
Technically this change needs to be done only in places where we support
throwing or catching V4 exception as well as code that is traversed during the
unwinding. Due to the use of internal V4 api throughout the entire module,
this patch is applied to .qmake.conf.
This also fixes tst_qqmlvaluetypes
Change-Id: I21a9e5522741446de25a5d0046f7e34f741f7722
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Sync up relative paths in the qrc and the actual directories so that
you can run qmlscene with any of the QML files in this directory
and it will still find the shared resources.
Change-Id: I0f216df6b370c19948312fa00a33ce77ccabcd78
Reviewed-by: Liang Qi <liang.qi@digia.com>
On ARM/Android we have the problem of not being able to inject the ARM
exception unwind tables into the exception handling run-time - we need to be
able to override the __gnu_Unwind_Find_exidx symbol, which is weakly declared
in libgcc and strong in libc or the dynamic linker.
The solution is to avoid throwing the exception from within libstdc++ but
instead do it ourselves and include the unwinding code along with it, so that
we can replace the symbol. This works by throwing the exception the way the
standard describes __cxa_throw() works, eventually calling
_Unwind_RaiseException. That function in turn will (indirectly) reference
__gnu_Unwind_Find_exidx. If our code references _Unwind_RaiseException and we
link libgcc statically, then the linker will include all the dependencies of
_Unwind_RaiseException in our library, including the resolution of the weak
__gnu_Find_exidx symbol to our implementation in qv4unwindhelper_p-arm.h.
The "catch" with this approach is that it relies on the layout of the exception
object in libstdc++, which deviates from the standard by an added reference
count. The code in question has NOT changed in years, so for now that's a risk
we accept.
A different solution that only depends on the cross-vendor C++ ABI (implemented
by pretty much any compiler other than MSVC that we support) would be to not
throw a pure C++ exception but a foreign exception (still ABI compliant
__cxa_exception, but with a different class). The GNU personality routine would
still catch it if we used catch (...), and we could get hold of the
__cxa_exception pointer via the standardized __cxa_get_globals(). But that in
turn would require replacing the use of "catch (QV4::Exception &e) { ..." in
our client code with macros that abstract away the difference between the win32
C++ based exceptions and the CXX ABI way, thus making the catch code a little
uglier.
Change-Id: I3f9bfaa9f657e80ebe4f88369cf51922367570b1
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This is the auto-test part of https://codereview.qt-project.org/#change,61117
The test passes as-is but we should forward the fix to ensure that we
don't regress.
Change-Id: Ief8fcfc29d671f33cd1b2c3bab7acfd4fcd1df2b
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
It's unconvenient with it to extent Dialogs to multiple versions.
Change-Id: I8c7059921875764dc74f80321caebfad16965a6a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
MinGW on ia32 uses dwarf2 tables and provides __register_frame, so let's use that.
Change-Id: If68598686ff03c8d3d6b1e0db13b477b469adb71
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This is in preparation for some platform specific code regarding throwing
exceptions, as well as a general cleanup :)
Change-Id: I23fb4f12fd09423a1f2cb225145780925002677b
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Otherwise it will have the wrong size on KDE.
Task-number: QTBUG-32223
Change-Id: I3ed92ff8aead5c6e5a37a5189c7103a5383087ae
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
On bionic we need to call a different symbol right from bionic instead of using
dlsym() to find the original arm exception table registration function.
Change-Id: I6bf20454e5395f7b09a46d4be3502e401abcd1b2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
When throwing exceptions we have a tendency to save a backtrace, using
StackWalk64 on Windows. Before we can do that stack walk, we have to
capture the current processor register state, in particular the frame pointer,
for which we call RtlCaptureContext. Almost naturally that function requires
the caller to have set up a stack frame, which may not have happened when
compiling with release flags.
As a remedy, this patch moves the code that calls RtlCaptureContext into
a separate file, which will be compiled with frame pointer optimizations
disabled.
Change-Id: I3ce53b47c4a421efeaa3e575429d85327540ca97
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
In order to find the number of items in the model, the model did a
second query on the document representing the result set.
So, suppose the user queried for //a/b/c, the result set would contain
all the 'c' elements from the input document.
In order to find the number of items in the result set, it did a second
query with the expression "count(/dummy:items/c)", where 'c' was
extracted from the last step in the original XPath expression
For simple expressions, this worked fine.
However, if the last step had a predicate such as "//c/parent::b" it
didn't work.
The solution is to not filter *again* the last step when we query for
the count, since we know that all result items are direct children of
"dummy:items", and instead just execute the query
"count(dummy::items/*)".
This should also potentially improve performance.
Task-number: QTBUG-17588
Change-Id: Ib2fdf1ec8b91022df0597e089ad34d34b04428b0
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
tst_qquickvisualdatamodel and tst_qquickpositioners have been failing
recently on CI. One can't reproduce the failures locally unless
running the tests parallel, like CI does.
Task-number: QTQAINFRA-705
Change-Id: I09a9123d045f2213af915518917ce622b33b27ba
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>