Commit Graph

6667 Commits

Author SHA1 Message Date
Simon Hausmann 60bb004ea2 Silence qqmlecmascript::propertyVarInheritance failures with clang release builds
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>
2013-07-26 17:31:39 +02:00
Simon Hausmann 766367c3d0 Fix various QList<qreal> property related auto test failures in release builds
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>
2013-07-26 14:06:15 +02:00
Petr Nejedly 88054e4472 std:: fixes to make qtdeclarative closer to compilable with QNX NDK.
Math functions come in std:: when #included through <cmath>

Change-Id: I62550e5c23cb6f4464f2c2f5c4188a91b3512d1a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-07-26 14:06:15 +02:00
Simon Hausmann 07860794da Initial support for debugging in the v4 interpreter
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>
2013-07-26 11:53:42 +02:00
Simon Hausmann 993bc84f49 Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into merge
Change-Id: I5824a3eb624b325de10acfd5109c4c1bdabcf780
2013-07-26 11:52:32 +02:00
Frederik Gladhorn 8487119207 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-07-24 10:09:17 +02:00
Shawn Rutledge 117da3c1e6 FolderListModel documentation corrections
Task-number: QTBUG-32039
Change-Id: I214c5e58dedb6d752e0c42f6c67fad942bd71894
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-07-23 13:59:36 +02:00
Martin Smith 92cc84a373 doc: Eliminate more cases of multiple topic commands
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>
2013-07-23 13:55:47 +02:00
Martin Smith 7cbd086c81 doc: Eliminate still more cases of multiple topic commands
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>
2013-07-23 13:55:40 +02:00
Simon Hausmann 713a4c5b1d Fix FDE generation on Intel 32-bit
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>
2013-07-23 13:00:36 +02:00
Simon Hausmann b17f57df9d Fix tst_QJSValueIterator::iterateString() on Mac OS X
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>
2013-07-23 13:00:24 +02:00
Frederik Gladhorn c3c943545e Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I2279f181b1c30e81651f8907447ec5c826e11475
2013-07-23 11:10:39 +02:00
Shawn Rutledge cf62652614 FolderListModel provides file URLs and the QML FileDialog uses them
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>
2013-07-23 08:36:26 +02:00
Zeno Albisser 0181dc283f Silence clang header-hygiene warning.
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>
2013-07-22 19:37:38 +02:00
Shawn Rutledge e443c7ba55 Put back OTHER_FILES in systemdialogs example
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>
2013-07-22 17:12:00 +02:00
Shawn Rutledge 6499098a04 QtQuick.Dialogs: use URLs for interface with QPlatformFileDialogHelper
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>
2013-07-22 16:45:01 +02:00
Simon Hausmann e1b6513df5 Fix crashes in tst_qquickcanvasitem with older Ubuntu toolchains
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>
2013-07-22 16:13:28 +02:00
Oswald Buddenhagen 5f0c90475d remove pointless assignments
the magic in qt_example_installs.prf handles this automatically.

Change-Id: I19f0560a6e3d2ddbe8a0128b463aecb7ff45475e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-22 14:34:44 +02:00
Oswald Buddenhagen 2479b21dd3 unbreak installation after project move
Change-Id: I47e9e7009978b494e6b2b06f793bf1948d443b72
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-22 14:34:40 +02:00
Simon Hausmann 3a6f5735ee Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into wip/v4
Conflicts:
	src/quick/items/context2d/qquickcontext2d.cpp
	tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro

Change-Id: I36a4fd28b3156839aecd70039a3ba566bf19a0bc
2013-07-22 13:43:43 +02:00
Robin Burchell 8d43669cb0 Remove unnecessary CONFIG += ordered.
None of the subdirectories here apepar to depend on each other.

Change-Id: Id8ac9f030ecc0b440ee5193bad9bb710cec11edd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-22 11:24:02 +02:00
Friedemann Kleint a0ad43cc83 Use GET method for redirect in QDeclarativeXMLHttpRequest.
Initial-patch-by: Marek Więckowski <wiecko@fuw.edu.pl>

Task-number: QTBUG-32332
Change-Id: I5514d97ef8574f8e7eef8fcca39bed4cd7e917ad
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2013-07-22 11:24:02 +02:00
Simo Fält 8c19ca817b Mark tst_dialogs insignificant in win also
Task-number: QTBUG-30513
Change-Id: Ib7b2f7f710be223aeb572061757cd8acd6d6852e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-22 08:20:37 +02:00
Sergio Ahumada 00e6e6cedd test: Add 5.0.0/5.1.0 bic data for linux-gcc-ia32
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>
2013-07-20 09:42:08 +02:00
Rafael Roquetto a95f2998db Fix tst_qquickview for full screen platforms
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>
2013-07-18 21:37:32 +02:00
Marco Bubke 000b6330d4 Revert partially "Remove some unused code and forward declarations"
The setParent function was used by the qml designer!

This reverts commit 8cb3b01688.

Change-Id: Id6236f5f27d0bf997c5670f3431cfd43721f380b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-07-18 11:57:08 +02:00
Shawn Rutledge 17ded06804 Disable dialogs to allow changes in qtbase (use urls internally)
Followup to I9ae09416acdbe437acbe9672d0ecfc42059695ae so qtbase change
I61e99d498252241f38ec05724702a90ba050c4bb can get through CI.

Change-Id: I8bf3bca9b2a3b00b2471045cdc73f20329f99d9d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-18 08:19:26 +02:00
Simon Hausmann a96a1fe82b Fix failing QQuickCanvas auto-tests
Make sure to initialize the vtbl correctly.

Change-Id: I65eab6e3fbb329b3595773db31fae4726d7683d4
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-07-17 16:29:24 +02:00
Simon Hausmann 09454fe361 Fix JavaScript stack back trace generation in release builds on Windows
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>
2013-07-17 13:59:57 +02:00
Shawn Rutledge 16a6cba54f systemdialogs example: ensure that all QML files work with qmlscene
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>
2013-07-17 13:46:37 +02:00
Simon Hausmann a62e32cae6 Implement gcc compatible exception throwing using _Unwind_RaiseException
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>
2013-07-17 11:26:32 +02:00
Frederik Gladhorn d9751bc29d Disable dialogs to allow changes in qtbase (use urls internally)
Change-Id: I9ae09416acdbe437acbe9672d0ecfc42059695ae
Reviewed-by: David Faure <david.faure@kdab.com>
2013-07-17 09:39:53 +02:00
Simon Hausmann 3a67542e06 Forward port auto test for fix in QtQuick1
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>
2013-07-17 07:36:45 +02:00
Friedemann Kleint 184cf0e8f8 Fix organization domains.
Task-number: QTBUG-32390

Change-Id: Ibc7e0e85adfffdb7abbd61e8948064e36a8fce9b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-15 15:45:43 +02:00
Friedemann Kleint b27461dcdf Replace qt.nokia.com by www.qt-project.org in tests.
Task-number: QTBUG-32390

Change-Id: If318cf9bbcaa36e6e60d693dd0cb9a58768af47b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-15 15:40:43 +02:00
Liang Qi 37a8c1d1ad Remove DIALOGS_MAJOR_MINOR define in QtQuick.Dialogs code
It's unconvenient with it to extent Dialogs to multiple versions.

Change-Id: I8c7059921875764dc74f80321caebfad16965a6a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-15 13:14:53 +02:00
Simon Hausmann 54435e4206 Fix exception handling with MinGW on ia32
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>
2013-07-12 12:37:24 +02:00
Friedemann Kleint 4615ddde02 Replace www.nokia.com by www.qt-project.org in tests.
Task-number: QTBUG-32390

Change-Id: I595b1bf683d1e63e44354c042f23dd9e10847862
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-12 12:16:01 +02:00
Simon Hausmann 8cfba7d015 Move QV4::Exception into a separate compilation unit with header file
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>
2013-07-12 10:11:10 +02:00
Friedemann Kleint 3a1a38b0d7 Fix CLANG-warning '&&' within '||' [-Wlogical-op-parentheses].
Change-Id: Id724c86f87a78048df9b93f2d190593d36261943
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-12 08:43:00 +02:00
Friedemann Kleint 9b8b1ca4a0 Fix CLANG-warning about unused member variable m_defaultAntialiasingMode.
Change-Id: I68a04532bacd326b4bb3eb8f9a7ee04c67fcd68e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-12 08:42:24 +02:00
Frederik Gladhorn 58400a9011 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Idaaeba880a175166437e2a7266716c776c4483c6
2013-07-11 23:14:52 +02:00
Shawn Rutledge c3741b6e04 Window example: delay showing the splash until Component.onCompleted
Otherwise it will have the wrong size on KDE.

Task-number: QTBUG-32223
Change-Id: I3ed92ff8aead5c6e5a37a5189c7103a5383087ae
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-11 16:55:42 +02:00
Stephen Kelly 2fac1d95f7 Add a unit test for testing Qt in its install location.
Change-Id: Ide70affa28f0ec37535b5a4ce1bcafac8ac58351
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-07-11 11:58:10 +02:00
Simon Hausmann 4379bae227 Fix registration of unwind tables on Android
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>
2013-07-10 18:03:11 +02:00
Peter Varga 8913799632 Cleanup: Remove ExternalResource from QV4::Object
Change-Id: Ic512460009ad0f29670d7fae3bd4fe116b0b1c0f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-07-10 15:39:38 +02:00
Simon Hausmann 5706bda123 Fix rare crashes in release builds on Windows with exceptions
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>
2013-07-10 13:02:01 +02:00
J-P Nurmi 68b2f86919 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-07-09 14:01:27 +02:00
Jan Arve Saether ddcf9fc80e Don't assume that the last step of the XPath is an element name
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>
2013-07-09 10:25:34 +02:00
Simo Fält cc2d344863 QtDeclarative: Removing parallel_test from config
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>
2013-07-09 07:45:31 +02:00