platform/upstream/qtdeclarative.git
11 years agoCleanup: Fold CompiledData::Value into CompiledData::Binding
Simon Hausmann [Fri, 13 Sep 2013 07:08:41 +0000 (09:08 +0200)]
Cleanup: Fold CompiledData::Value into CompiledData::Binding

Value isn't needed anywhere else

Change-Id: Ib12d85332a6096e6232a790a7e6fd63961329e3b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years ago[new compiler] Add support for id properties
Simon Hausmann [Thu, 12 Sep 2013 14:53:32 +0000 (16:53 +0200)]
[new compiler] Add support for id properties

Change-Id: Idb4a0ad06f6cbe5d040da075a8f43d067a27ebc4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years ago[new compiler] Initial support for group properties
Simon Hausmann [Thu, 12 Sep 2013 12:43:56 +0000 (14:43 +0200)]
[new compiler] Initial support for group properties

This implements support for "font.pixelSize: 24" for example. The representation
in the compile data structure is so that font.pixelSize is short-hand for

font {
    pixelSize: 24
}

which means that inside the braces is a complete object initializer. For that
initializer we create a dedicated CompiledData::Object, which however has its
type name empty. When populating the outer instance then, the "font" property
is read as QQmlValueType (a QObject) and instead of creating a new QObject we
use that value type as instance to run the rest of the QML object initializer
(everything in braces).

Change-Id: Ic0a37ac77ab88f582546b9c09a3d06a07726420b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMerge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into HEAD
Simon Hausmann [Fri, 20 Sep 2013 06:21:42 +0000 (08:21 +0200)]
Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into HEAD

Conflicts:
src/qml/compiler/qv4isel_masm.cpp
src/qml/jsruntime/qv4script.cpp
src/qml/qml/qml.pri
src/qml/qml/qqmltypeloader_p.h

Change-Id: Ia784d855a2131e3289454f12d841ca2c65be15c1

11 years agoDisable gui tests on Mac for now
Lars Knoll [Thu, 19 Sep 2013 17:11:27 +0000 (19:11 +0200)]
Disable gui tests on Mac for now

Qt base is still broken on the mac, leading to random
crashes in UI tests.

Change-Id: If636c44169c2386ea2f49d7936ef8d6fe1488537
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoAdd qmlProtectModule
Alan Alpert [Fri, 17 May 2013 22:32:19 +0000 (15:32 -0700)]
Add qmlProtectModule

A C++ analog to the protected qmldir syntax, this is also a potential
performance improvement because we can avoid some file system accesses.

Change-Id: I41781a6cc72aa65bd2d397800345ea16ef442e90
Reviewed-by: Antti Piira <apiira@blackberry.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRegister Locale object in the QtQml namespace.
Mitch Curtis [Tue, 17 Sep 2013 11:31:02 +0000 (13:31 +0200)]
Register Locale object in the QtQml namespace.

It was previously registered with QtQuick, which meant QtQuick had to
be imported in order to use Locale; a basic QML object.

Task-number: QTBUG-32505

Change-Id: I9d49cc0d87c0fae07b46885fcdec4f27fb0e0708
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoApply file selectors to QQmlApplicationEngine apps
Alan Alpert [Fri, 5 Jul 2013 21:31:06 +0000 (14:31 -0700)]
Apply file selectors to QQmlApplicationEngine apps

You can also manually apply them to a QQmlEngine using
setUrlInterceptor(new QQmlFileSelector(parent)), or using
your own QQmlAbstractUrlInterceptor subclass.

Change-Id: I0c0ff8b080c138686b3c03e0bc3b9f25bcd11a85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoqmlplugindump: adding verbose output for the instantiation operations
Fawzi Mohamed [Mon, 10 Jun 2013 09:16:38 +0000 (11:16 +0200)]
qmlplugindump: adding verbose output for the instantiation operations

Change-Id: Ic18d85de92f05c01b6ce00b071ef9b94d878434f
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
11 years agoQmlDebugging: Process commands in v4DebugService
Aurindam Jana [Tue, 10 Sep 2013 15:32:00 +0000 (17:32 +0200)]
QmlDebugging: Process commands in v4DebugService

Change-Id: I6371db756f72ee373884268fc49a5b16cb66fd34
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
11 years agoQmlDebugging: Replace QV8DebugService with QV4DebugService
Aurindam Jana [Tue, 10 Sep 2013 14:57:45 +0000 (16:57 +0200)]
QmlDebugging: Replace QV8DebugService with QV4DebugService

Change-Id: Ic8c99e3984d9ef6d122f7d8834df97eeb1f1fda3
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
11 years agoQmlDebugging: Add v4DebugService
Aurindam Jana [Tue, 10 Sep 2013 14:47:14 +0000 (16:47 +0200)]
QmlDebugging: Add v4DebugService

Initial checkin

Change-Id: Id38166bcc4a63e0543033d25515a135ad492ee2e
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
11 years agoMerge "Merge branch 'stable' into dev" into refs/staging/dev
Sergio Ahumada [Thu, 19 Sep 2013 15:38:18 +0000 (17:38 +0200)]
Merge "Merge branch 'stable' into dev" into refs/staging/dev

11 years agoMerge branch 'stable' into dev
Sergio Ahumada [Thu, 19 Sep 2013 13:50:28 +0000 (15:50 +0200)]
Merge branch 'stable' into dev

Conflicts:
src/qml/qml/v8/qqmlbuiltinfunctions.cpp
tests/auto/qml/qml.pro

Change-Id: Ib373aed6a8f8df9521740fb5b080daed38546cd2

11 years agoAdding QtQuick.Dialogs.MessageDialog
Shawn Rutledge [Mon, 26 Aug 2013 08:31:54 +0000 (10:31 +0200)]
Adding QtQuick.Dialogs.MessageDialog

Change-Id: Ifa3de21e6f611c24742118d6d178edbe14f243be
Reviewed-by: Liang Qi <liang.qi@digia.com>
11 years agoFix zero pointer access in renderer.
Gunnar Sletta [Wed, 18 Sep 2013 08:48:41 +0000 (10:48 +0200)]
Fix zero pointer access in renderer.

Change-Id: I185af453684c7223c0c9de103eb707d4918b8ae0
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
11 years agoMake QQmlAbstractUrlInterceptor public
Alan Alpert [Tue, 17 Sep 2013 04:47:37 +0000 (21:47 -0700)]
Make QQmlAbstractUrlInterceptor public

A supporting class for file selectors and qml import control, it allows
redirecting local file paths (use a QNAM for remote paths).

All work was done previously for Qt 5.1, including tests. This is just
making it public for Qt 5.2.

Change-Id: Icb319cc23200541c8e4088b2d400e9af94f3eee5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoAdd FontDialog to QtQuick.Dialogs
Liang Qi [Wed, 11 Sep 2013 05:22:08 +0000 (07:22 +0200)]
Add FontDialog to QtQuick.Dialogs

As with FileDialog, it tries QPA, then QFontDialog, and falls back to
a QML implementation (which is also provided here) if neither type of
native dialog is available.

The update of plugins.qmltypes files will be in a separate commit.

Task-number: QTBUG-31852
Done-with: Shawn Rutledge <shawn.rutledge@digia.com>
Change-Id: I066ebbcf44c413af26020ddf8414252b99f5218b
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
11 years agoqmlplugindump: Update the description for the generated file
Caroline Chao [Wed, 18 Sep 2013 09:25:45 +0000 (11:25 +0200)]
qmlplugindump: Update the description for the generated file

The full command was written in the generated file including
the full path to the qmlplugindump tool.
Now only the tool name without its full path will be
printed with the adjacent arguments.

Change-Id: I03aa7350d1cd6b96ce00341796f8944669989793
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
11 years agoqmlplugindump: Add --defaultplatform argument
Caroline Chao [Wed, 18 Sep 2013 09:18:31 +0000 (11:18 +0200)]
qmlplugindump: Add --defaultplatform argument

QT_QPA_PLATFORM is set to minimal by default unless
--defaultplatform is set when running the qmlplugindump tool.

This is for example useful for the QtQuick.Dialogs module.

Change-Id: I1194526ee0641d11802c4db20bd3043aebd1e261
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
11 years agoqmlplugindump: QMetaMethod signals have public access
Caroline Chao [Wed, 18 Sep 2013 07:32:45 +0000 (09:32 +0200)]
qmlplugindump: QMetaMethod signals have public access

Since 56bbf3c2d5b31142e5a1b872a0118479edcf874b (qtbase)

So public signals must be dumped.

Change-Id: Ic7047660fbac40f78c7a205e760c059256c71d6f
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
11 years agorerun qmlplugindump for QtQuick.Dialogs, now including QML types
Shawn Rutledge [Wed, 4 Sep 2013 11:18:40 +0000 (13:18 +0200)]
rerun qmlplugindump for QtQuick.Dialogs, now including QML types

Task-number: QTBUG-33106
Change-Id: Ib2ee0563f423bf7fe1d5990c621c46950f81516a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
11 years agoAndroid: Fix compilation when doing ARM builds
Simon Hausmann [Tue, 17 Sep 2013 08:31:10 +0000 (10:31 +0200)]
Android: Fix compilation when doing ARM builds

Clean up the code to determine when to _disable_ the JIT and add
Android to that list when targeting ARMv5 (dubbed armeabi as opposed
to armeabi-v7a)

Task-number: QTBUG-33507

Change-Id: Id78e08e888df8f8075d5655e15bb754cede70638
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoCorrectly convert an invalid QDateTime to JS
Lars Knoll [Wed, 18 Sep 2013 11:29:38 +0000 (13:29 +0200)]
Correctly convert an invalid QDateTime to JS

Task-number: QTBUG-33539

Change-Id: I645db2e12e3b46731c0bef04e2d48abb71650974
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoTemporarily disable tst_QJSEngine tests to allow qtbase dev integration
Mitch Curtis [Wed, 18 Sep 2013 13:53:38 +0000 (15:53 +0200)]
Temporarily disable tst_QJSEngine tests to allow qtbase dev integration

Temporarily disables:
- tst_QJSEngine::dateConversionJSQt()
- tst_QJSEngine::dateConversionQtJS()

so that https://codereview.qt-project.org/#change,65560 can merge.

Change-Id: I415daf1c5bd137e1905773f88fe5ebaaab1e0a06
Reviewed-by: John Layt <jlayt@kde.org>
11 years agoDoc: Reintroduce docs for Qt Quick Models and Views examples
Topi Reinio [Fri, 13 Sep 2013 12:26:40 +0000 (14:26 +0200)]
Doc: Reintroduce docs for Qt Quick Models and Views examples

The .qdoc files/images for these examples were lost during
modularization. This change adds them back and fixes related
links.

Change-Id: Id5260daad1c38284e3aa8178ae82d24067f4e88c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoFix handling of empty Values
Lars Knoll [Mon, 16 Sep 2013 13:27:16 +0000 (15:27 +0200)]
Fix handling of empty Values

Make things consistent between 32 and 64 bit again
Adjust test results after the changes

Almost all uses of Value::empty() will get removed
in the future, but for now this gets all our tests
to pass again.

Change-Id: I44784a43432e78febbdfe78115c9be2a3e3ece76
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSkip unstable tests
Lars Knoll [Wed, 18 Sep 2013 06:08:04 +0000 (08:08 +0200)]
Skip unstable tests

We can't test GC reliably due to our GC being conservative
currently. Once we moved over to an exact GC, we can re-enable
the test.

Change-Id: I6778ed9bee3b41372705f6b41c1379d224335e53
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix regression with isNaN and isInf
Lars Knoll [Mon, 16 Sep 2013 18:30:04 +0000 (20:30 +0200)]
Fix regression with isNaN and isInf

We use std::isnan and std::isinf to determine whether a number is
NaN or Inf. Unfortunately some versions of these methods seem to
return int instead of bool, breaking the Encode() call.

Change-Id: Iec58eb3a5f344373a389ddbc7f6ee81cdead2726
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoInitialize variables
Lars Knoll [Mon, 16 Sep 2013 12:57:58 +0000 (14:57 +0200)]
Initialize variables

They could end up being used uninitialized otherwise.

Change-Id: I169f0023a8079f32b42508d39f7655985eba5d6b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRefactor our NaN boxing to be more efficient
Lars Knoll [Sun, 15 Sep 2013 13:46:36 +0000 (15:46 +0200)]
Refactor our NaN boxing to be more efficient

* Use a unified way to store all Managed objects inside
a Value, instead of distinguishing between strings
and other objects.

* On 64 bit we store pointers as pointers, so accessing them
through Scoped<> objects is cheap. This implies that doubles
are now stored in a mangled form (xor'ed with a mask).

Change-Id: I582e0fb167a62c0c527c6bfa3452550e37944069
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoOptimize some runtime methods
Lars Knoll [Sat, 14 Sep 2013 13:08:11 +0000 (15:08 +0200)]
Optimize some runtime methods

This prings performance up by ~25% again.

Change-Id: I680466e11b722b2eac0edda0fe4199b717d23855
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert more methods to return a Returned<>
Lars Knoll [Sat, 14 Sep 2013 09:25:02 +0000 (11:25 +0200)]
Convert more methods to return a Returned<>

Change-Id: If294c9c4f574824c308b63a11da1337226180105
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert some methods to use Returned<>
Lars Knoll [Fri, 13 Sep 2013 19:54:21 +0000 (21:54 +0200)]
Convert some methods to use Returned<>

Change-Id: I631606cb5ab3b35b72104e70092a5200dd235fbc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert a few more methods in ExecutionEngine to use protected pointers
Lars Knoll [Fri, 13 Sep 2013 15:07:44 +0000 (17:07 +0200)]
Convert a few more methods in ExecutionEngine to use protected pointers

Change-Id: I2e6b1b9dff52bbd16f35a00152c9ac557f8346eb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert methods in qv4runtime to use Returned<X>
Lars Knoll [Fri, 13 Sep 2013 14:19:22 +0000 (16:19 +0200)]
Convert methods in qv4runtime to use Returned<X>

Change-Id: I1f68ecb298b049f3fa90de26b4b39233d48fb8e0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoExtend the ReturnedValue mechanism to pointers to Managed objects
Lars Knoll [Fri, 13 Sep 2013 12:11:55 +0000 (14:11 +0200)]
Extend the ReturnedValue mechanism to pointers to Managed objects

Add a Returned<T> that we can return instead of raw pointers
to Managed objects.

Start using the Returned<T> for a few methods.

Also clean up all our classes to use the Q_MANAGED macro instead
of manually defining their vtable.

Change-Id: I0a2962e47f3de955cd2cd8474f8f3fcc9e36d084
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMake QJSValue::prototype() gc safe
Lars Knoll [Fri, 13 Sep 2013 12:10:56 +0000 (14:10 +0200)]
Make QJSValue::prototype() gc safe

Change-Id: Ia93af291f97fd2b6473267e95520bc0759034029
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoDon't polish items if the screen is 0
Lars Knoll [Fri, 13 Sep 2013 10:49:46 +0000 (12:49 +0200)]
Don't polish items if the screen is 0

The current code leads to an assertion during qapp
destruction time, as the screen gets set to 0, which
triggers a force polish that in turns accesses the qapp instance.

In addition, we don't need to do any work when the screen is 0,
as the window can't be visble in that case. Once it gets visible
again, forcePolish() will be called again.

Change-Id: I81d9a11e494b4573a56d06bca651cc6b5fa785c7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoConvert most remaining return values from Value to ReturnedValue
Lars Knoll [Thu, 12 Sep 2013 20:37:41 +0000 (22:37 +0200)]
Convert most remaining return values from Value to ReturnedValue

Change-Id: If8b0c3b91be50678693868c10fefc3678008834d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix regression in Object.isExtensible()
Lars Knoll [Fri, 13 Sep 2013 06:37:49 +0000 (08:37 +0200)]
Fix regression in Object.isExtensible()

We need to encode a bool, but the extensible flag
in Object is a bitfield (ie uint).

Change-Id: I2461c8ae90e92840da737c0c7ee88b9a2cee21e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert more methods to use ReturnedValue
Lars Knoll [Thu, 12 Sep 2013 13:27:01 +0000 (15:27 +0200)]
Convert more methods to use ReturnedValue

Change Exception.value() and a few other places.

Change-Id: I53ce17e5656e260138b1ac7f6d467e4636c0a0b9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert builtin methods to return a ReturnedValue
Lars Knoll [Thu, 12 Sep 2013 09:13:03 +0000 (11:13 +0200)]
Convert builtin methods to return a ReturnedValue

Change-Id: I6b75adbf53a5be0deab023d2eed98ce2a7915551
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRename BuiltinFunctionOld to BuiltinFunction
Lars Knoll [Thu, 12 Sep 2013 07:23:34 +0000 (09:23 +0200)]
Rename BuiltinFunctionOld to BuiltinFunction

This is the correct abstraction for a builtin method.
Time to get rid of the 'old' in the name.

Change-Id: Ia386d2cc8ef0e6c269ab24da6fc8ebfac52d7f69
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoDon't check whether Scoped<T> really contains a T
Lars Knoll [Thu, 12 Sep 2013 07:18:47 +0000 (09:18 +0200)]
Don't check whether Scoped<T> really contains a T

When retriveing a pointer to T, there's no need to check
that we really have a Managed stored in the value, as the
type checking is already done by the constructor and
assignment operators.

Change-Id: I246610b8d6e33848e6a2e2179a5e6e6d9d0975ca
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert lookups to use ReturnedValue
Lars Knoll [Wed, 11 Sep 2013 20:45:47 +0000 (22:45 +0200)]
Convert lookups to use ReturnedValue

Change-Id: Idbcd1fbd2aa43775ce8c1a3d8fac29a6b58b678a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse a ReturnedValue for Managed::getIndexed()
Lars Knoll [Wed, 11 Sep 2013 19:48:23 +0000 (21:48 +0200)]
Use a ReturnedValue for Managed::getIndexed()

Change-Id: I0371ed21c4ef99564d3ffa1082dd109e890a78bf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse ReturnedValue for Managed::get().
Lars Knoll [Wed, 11 Sep 2013 14:28:17 +0000 (16:28 +0200)]
Use ReturnedValue for Managed::get().

Change-Id: Ia8f35d227b69d32e1f6a041283abbbd083aa34ca
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse ReturnedValue for Managed::construct()
Lars Knoll [Wed, 11 Sep 2013 13:09:25 +0000 (15:09 +0200)]
Use ReturnedValue for Managed::construct()

Change-Id: I9e702d60c4e1b7ba19a699ff7a8d53876d6cd5f7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoDon't access out of bounds arguments
Lars Knoll [Thu, 12 Sep 2013 10:58:39 +0000 (12:58 +0200)]
Don't access out of bounds arguments

QQmlV4Function wasn't checking argc correctly when
accessing the arguments it contains.

Change-Id: I475c1366d46a5ef9c91104c12343507e469a69bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRename QV4::ValueScope to QV4::Scope
Lars Knoll [Wed, 11 Sep 2013 12:47:34 +0000 (14:47 +0200)]
Rename QV4::ValueScope to QV4::Scope

The class is going to be used all over the place, so let's
give it a short name :)

Change-Id: If61543cb2c885e7fbb95c8fc4d0e870097c352ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRequire a ValueScope for ScopedCallData as well
Lars Knoll [Wed, 11 Sep 2013 12:36:01 +0000 (14:36 +0200)]
Require a ValueScope for ScopedCallData as well

This brings things more in line with ScopedValue, and
also simplifies cleanup of Scoped values.

Change-Id: If5f1466b4e13c629d56c1e7c638937f61ba48f77
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse a ReturnedValue for Managed::call()
Lars Knoll [Wed, 11 Sep 2013 11:55:01 +0000 (13:55 +0200)]
Use a ReturnedValue for Managed::call()

Change-Id: Ief2d75e9789dd367c603d90dc0fe5316a0d055e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoAdjust return values to use ReturnedValue
Lars Knoll [Wed, 11 Sep 2013 11:10:42 +0000 (13:10 +0200)]
Adjust return values to use ReturnedValue

Change-Id: I03822d360ad90cc659da66252439472ecb1a52bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoChange calling convention in JIT to use ReturnedValue
Simon Hausmann [Wed, 11 Sep 2013 10:46:20 +0000 (12:46 +0200)]
Change calling convention in JIT to use ReturnedValue

This simplifies the masm backend as well and should be faster.

Change-Id: I64ad5d9ee1b6caca950471e3aec4ef19d7503e62
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoDisable quick autotests on mac until qtbase is fixed
Lars Knoll [Wed, 18 Sep 2013 11:15:47 +0000 (13:15 +0200)]
Disable quick autotests on mac until qtbase is fixed

Change-Id: I8c4fecfe42f93b3d6c272d2552a856e3ed1fce28
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoAvoid copying touchpoints, and only check until we find a match.
Robin Burchell [Tue, 17 Sep 2013 13:20:22 +0000 (15:20 +0200)]
Avoid copying touchpoints, and only check until we find a match.

Change-Id: I46fad782e93fe1f940acec05f4e1bb4afb5be230
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoExpose "Qt.application.state".
Yoann Lopes [Thu, 29 Aug 2013 15:18:06 +0000 (17:18 +0200)]
Expose "Qt.application.state".

This deprecates Qt.application.active.
The new property can indicate more states than just active or inactive
(currently Suspended and Hidden exists in addition to the
aforementioned).

Change-Id: I8d5bf72f89a357c13daf1625c20e8e7311dac013
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoThese files are not used anywhere.
Gunnar Sletta [Fri, 13 Sep 2013 06:27:47 +0000 (08:27 +0200)]
These files are not used anywhere.

Change-Id: I0aa3b7ad944375ec53d8bd831a233d8055d21582
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
11 years agowince: Build fix, Windows can also run on ARM.
Sergio Martins [Sun, 25 Aug 2013 20:08:13 +0000 (21:08 +0100)]
wince: Build fix, Windows can also run on ARM.

Change-Id: I113a9fd86215700fe11fa5b2bfb8461953b1255b
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoDoc: PathView::currentItem is an Item, not an int.
David Faure [Fri, 13 Sep 2013 13:35:44 +0000 (15:35 +0200)]
Doc: PathView::currentItem is an Item, not an int.

Change-Id: If06c747b424ac8dd6b880aa296af5e5957bb9b51
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoqmlplugindump: fix prototypes identification for composite types
Caroline Chao [Mon, 16 Sep 2013 10:40:30 +0000 (12:40 +0200)]
qmlplugindump: fix prototypes identification for composite types

The prototype name for the composite type is the first "default"
prototype found in the reachable types. If none is found then
the default value is QObject.

Change-Id: I40b4fefaab40e4c9f83d24c89bd026579be63e7b
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
11 years agoImprove QML Date object documentation.
Mitch Curtis [Tue, 17 Sep 2013 09:38:40 +0000 (11:38 +0200)]
Improve QML Date object documentation.

Carrying on from https://codereview.qt-project.org/#change,61255, I've
added documentation for the from*String() functions, as they weren't
actually documented. I've also formatted some arguments and linked to
Locale documentation where the format enums are mentioned. Note that,
because of QTBUG-32505, I can't link to the format enum directly, so I
just link to the Locale page itself.

The import QtQuick 2.0 should also be removed from the documentation
when that bug is fixed.

Task-number: QTBUG-32492

Change-Id: I19c6c8450746ef2a68bc55fd3ef7db776f4acc35
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoQt Quick Dialogs: can see and control geometry of QML implementations
Shawn Rutledge [Mon, 5 Aug 2013 13:41:11 +0000 (15:41 +0200)]
Qt Quick Dialogs: can see and control geometry of QML implementations

QQuickAbstractDialog had x/y/width/height properties already but they
didn't do anything.  It's still not possible with the native dialogs
because neither QPlatformDialogHelper nor QFileDialogOptions etc.
have any geometric properties; but the application author can now
see and control the geometry of any QML dialog implementation.

Change-Id: Icdac9592c72e81175436436027f7fe3d75ff7f42
Reviewed-by: Liang Qi <liang.qi@digia.com>
11 years agoFix wrong return type
Alex Blasche [Fri, 13 Sep 2013 08:53:12 +0000 (10:53 +0200)]
Fix wrong return type

Android g++4.8 errors out with

jsapi/qjsvalueiterator.cpp: In member function 'QString QJSValueIterator::name() const':
jsapi/qjsvalueiterator.cpp:155:16: error: converting 'false' to pointer type for argument 1
of 'QString::QString(const char*)' [-Werror=conversion-null]
         return false;

Change-Id: I589418e34c7e1ae72f2bf547067ea8e5944119b8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoRemoved strange character from MacroAssemblerARM.cpp file.
Tomasz Olszak [Sun, 15 Sep 2013 20:53:15 +0000 (22:53 +0200)]
Removed strange character from MacroAssemblerARM.cpp file.

It caused:
error: stray ‘\302’ in program
error: stray ‘\304’ in program
when cross-compiling for ARM with gcc 4.5

Change-Id: Ibd80a21b436b65b355181b1e304ade22f9ff7404
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoDoc: Move properties of Locale QML type to correct module
Topi Reinio [Fri, 13 Sep 2013 07:23:48 +0000 (09:23 +0200)]
Doc: Move properties of Locale QML type to correct module

Moves property and method documentation for QML Locale type
from Qt Quick to Qt Qml module, and fix a number of broken
links in locale-related docs.

Change-Id: Id9e01314ea867987f5159ca3bffcc40abb27b289
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
11 years agoDon't depend on widgets plugin in QtQuick
Eskil Abrahamsen Blomfeldt [Tue, 10 Sep 2013 09:57:31 +0000 (11:57 +0200)]
Don't depend on widgets plugin in QtQuick

Since the accessible directory contains plugins for both the
widgets and quick plugins, we need to specify the precise
plugin, otherwise all QtQuick apps will depend on QtWidgets
on Android.

Change-Id: I8016afc64f8a75cc4ac0a3a69871df9cb2894f8a
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
11 years agoAdd currentColor property to ColorDialog.
Mitch Curtis [Fri, 23 Aug 2013 13:14:33 +0000 (15:14 +0200)]
Add currentColor property to ColorDialog.

QColorDialog has this property. This patch effectively means that
the color property will be set when the dialog closes, instead of
whenever the current color in the dialog changes, so pressing cancel
will revert the color to what it was before the dialog was opened.

[ChangeLog][QtDeclarative][ColorDialog] Added currentColor property.

Change-Id: I2ef6b32954342cd2469cf1552d53f9e2fbf3420b
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
11 years agofixed warnings in dialog module when PURE_QML_ONLY is defined
Shawn Rutledge [Mon, 16 Sep 2013 09:07:35 +0000 (11:07 +0200)]
fixed warnings in dialog module when PURE_QML_ONLY is defined

There are a couple of unused parameters in that case.

Change-Id: Ica81621e7d74474cbfa0b54c20501ecc72661c08
Reviewed-by: Liang Qi <liang.qi@digia.com>
11 years agoFix qmlClearTypeRegistrations tests
Alan Alpert [Fri, 28 Jun 2013 04:15:04 +0000 (21:15 -0700)]
Fix qmlClearTypeRegistrations tests

The manual test now tests that QtQuick can be loaded second try, and an
autotest has been added to ensure that the function does not affect
correctness.

Task-Number: QTBUG-32078
Change-Id: Ifd55e12c2c31e2e181054f897f10f02a2811c5d1
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
11 years agoMark tst_qquicktrailsemitter insignificant on windows
Alan Alpert [Tue, 10 Sep 2013 07:25:07 +0000 (00:25 -0700)]
Mark tst_qquicktrailsemitter insignificant on windows

Has been blocking CI intermittently, but not locally reproducable.

Task-number: QTBUG-33421
Change-Id: I0e876fe1f236a00a9ecad2231aa7ff50a4b8d590
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoAdd qml tool
Alan Alpert [Fri, 21 Dec 2012 23:42:47 +0000 (15:42 -0800)]
Add qml tool

This tool simply runs QML files using a QQmlApplicationEngine.

It is configurable so as to behave, by default, like qmlscene in
that it will automatically place non-Window QtQuick 2 Items inside
a QQuickWindow with the size of the root item. The configuration
is extensible so that other GUI scenes can also use it by altering
the configuration files in their installation.

On OS X, it is an app bundle, and handles the QFileOpenEvent so that
it can be the tool with which qml files are usually launched by
double-clicking.  (This does not break the ability to use it on the
command line too: the options still work, you just have to give the
path to the executable inside the bundle.)

Change-Id: I6bac813ce188be54842a78d7b532fcf2d54dc443
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoSkip failing tests
Alan Alpert [Mon, 16 Sep 2013 21:14:05 +0000 (14:14 -0700)]
Skip failing tests

Rendering seems to have changed for some reason. Unblocking CI while it
is investigated.

Task-number: QTBUG-33517
Change-Id: Ieb7fdf2bbe151fc46fbdee64a2b5786349f9fbe8
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
11 years agoSkip failing test for now
Alan Alpert [Mon, 16 Sep 2013 21:12:04 +0000 (14:12 -0700)]
Skip failing test for now

It's been difficult to reproduce locally and is blocking CI. Skipping
test while we look into the error.

Task-number: QTBUG-33516
Change-Id: I77f00a024143e12d19526d0b52593cc2d128cedf
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
11 years agoMerge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Sergio Ahumada [Fri, 13 Sep 2013 20:08:13 +0000 (22:08 +0200)]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev

11 years agoExpose drag threshold in MouseArea
Jens Bache-Wiig [Thu, 22 Aug 2013 15:20:52 +0000 (17:20 +0200)]
Expose drag threshold in MouseArea

In several cases such as for creating a Slider, it is useful to  have a
0 pixel threshold in order to initiate a drag operation. We have
previously hardcoded this to a platform dependent (usually 10 pixel)
value for MouseArea.

Note that we have no way of indicating the version/revision number
in a grouped property for documentation at the moment.

In addition we deliberately had to remove the REVISION from the
property because it is blocked by QTBUG-33179. However, since
this is not a user-creatable type it should not cause any
issues in practice.

This patch adds MouseArea.drag.threshold in order to improve on this.

Change-Id: Ia4871e64fab39e30c4494f00be99ad38cdd630df
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
11 years agoMerge remote-tracking branch 'origin/stable' into dev
Sergio Ahumada [Fri, 13 Sep 2013 14:42:55 +0000 (16:42 +0200)]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I6fc67bf30a901f8078a5b99a9e290190b3f64b81

11 years agosystemdialogs example bug fix: don't allow clicking through tabs
Shawn Rutledge [Wed, 11 Sep 2013 12:21:20 +0000 (14:21 +0200)]
systemdialogs example bug fix: don't allow clicking through tabs

For example on Font Dialogs tab of
examples/quick/dialogs/systemdialogs/systemdialogs.qml
it was possible to open the color dialog by clicking slightly below
the open button, because the color dialog tab was behind the
current one.

Change-Id: If9917e2baef7cfd49a0d01acd73ffa69dfcee088
Reviewed-by: Liang Qi <liang.qi@digia.com>
11 years agoV4: Fix SSA decomposition when no regalloc is used.
Erik Verbruggen [Sun, 1 Sep 2013 13:45:53 +0000 (15:45 +0200)]
V4: Fix SSA decomposition when no regalloc is used.

Add scheduling for moves generated by removing phi nodes by re-using the
MoveMapping class from the register allocator. This change applies to
both the JIT when no register allocator is used, and the interpreter.

Change-Id: I38eac5b13759c7790132d1ef07fa17fcb53187e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years ago[new compiler] Implement proper type resolution
Simon Hausmann [Thu, 12 Sep 2013 08:53:20 +0000 (10:53 +0200)]
[new compiler] Implement proper type resolution

Collect all references to unknown types after parsing, re-use the existing code
in QQmlTypeLoader to resolve them and finally use the resolved references map
in the QQmlObjectCreator instead of the type name cache directly.

Change-Id: I8b83af4f8852e79c33985457081c024358bb9622
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoqmlplugindump: Add support for composite types
Caroline Chao [Tue, 3 Sep 2013 12:03:21 +0000 (14:03 +0200)]
qmlplugindump: Add support for composite types

Task-number: QTBUG-33106

Change-Id: I80fc817eb59256e860f3fdd591104930688ef84c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
11 years agoRemove qStableSort usages from declarative
Giuseppe D'Angelo [Thu, 12 Sep 2013 09:06:59 +0000 (11:06 +0200)]
Remove qStableSort usages from declarative

QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I57912f2d1f36053055ea36b1699f704a675dc8b0
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoRemove qLowerBound usages from declarative
Giuseppe D'Angelo [Thu, 12 Sep 2013 09:06:59 +0000 (11:06 +0200)]
Remove qLowerBound usages from declarative

QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I85df32525af0c5706c631555a06b66ef3484d797
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoRemove qCopy usages from declarative
Giuseppe D'Angelo [Thu, 12 Sep 2013 09:06:59 +0000 (11:06 +0200)]
Remove qCopy usages from declarative

QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: Id410f20cba2abb4724351ebb29e20b7a8f784ede
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoRemove qSort usages from declarative
Giuseppe D'Angelo [Thu, 12 Sep 2013 09:06:59 +0000 (11:06 +0200)]
Remove qSort usages from declarative

QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I8fa7d0186cc8f0ba562695974829e37f1eb87f2f
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoImplement plain simple locking in the executable memory allocator
Simon Hausmann [Thu, 12 Sep 2013 06:44:09 +0000 (08:44 +0200)]
Implement plain simple locking in the executable memory allocator

Memory allocations may now also happen to come from a separate thread, the QML
loader thread where we also compile the JavaScript code and (likely) use the
JIT. Commonly that will be the only place where the allocator will be used. The
main thread uses the allocator only when an exception is thrown (to look up
platform unwind info) or when the garbage collector runs and decides to delete
objects that also hold the last reference to executable memory.

Change-Id: I8bb710184164cd8d32168449f48d09f7ee828e6e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years ago[new compiler] Implement name sanity checking for properties, signals and functions
Simon Hausmann [Wed, 11 Sep 2013 17:28:13 +0000 (19:28 +0200)]
[new compiler] Implement name sanity checking for properties, signals and functions

Change-Id: I58c442dc56075c449ebd2534ab6b9f90e7da8eae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years ago[new compiler] Improve error reporting
Simon Hausmann [Mon, 9 Sep 2013 11:51:31 +0000 (13:51 +0200)]
[new compiler] Improve error reporting

Re-enable COMPILE_EXCEPTION calls that were commented out due to missing
location information (that this patch also adds).

Change-Id: I0d584f474cc7e879350c8aae2869a9603ba415aa
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix error reporting timing
Simon Hausmann [Sun, 8 Sep 2013 09:05:20 +0000 (11:05 +0200)]
Fix error reporting timing

Errors for example in signal declarations are usually reported in the loader
thread, during property cache construction. This patch separates out the
property cache population into QQmlPropertyCacheCreator, runs it from the
loader thread and reduces the QQmlObjectCreator to merely set the properties/bindings/
functions on the object.

This also enables location tracking for signal declarations and their error reporting.

Change-Id: Ief1ffbb3113f8279a50d1a12dab8dbe096702a60
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix ReturnedValue support on ia32 and arm
Simon Hausmann [Wed, 11 Sep 2013 10:25:07 +0000 (12:25 +0200)]
Fix ReturnedValue support on ia32 and arm

The 64-bit value is passed in eax:edx and r0:r1

Change-Id: I9a8a7d8ae41f14780958351ecedea2d117f77d85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoConvert ReturnedValue into a primitive (typedef to quint64)
Lars Knoll [Wed, 11 Sep 2013 09:28:27 +0000 (11:28 +0200)]
Convert ReturnedValue into a primitive (typedef to quint64)

ReturnedValue is used to return values from runtime methods
The type has to be a primitive type (no struct or union), so that
the compiler will return it in a register on all platforms.

They will be returned in rax on x64, [eax,edx] on x86 and [r0,r1] on arm.

Change-Id: I38433e6fad252370dda5dc335d9c5be8f22e8c76
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix __qmljs_init_closure to use ReturnedValue
Lars Knoll [Mon, 9 Sep 2013 20:34:47 +0000 (22:34 +0200)]
Fix __qmljs_init_closure to use ReturnedValue

Change-Id: I777a63db32857a6a326839e3fcdb99657dc80e7f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoChange binops to use ReturnedValue
Lars Knoll [Mon, 9 Sep 2013 20:23:10 +0000 (22:23 +0200)]
Change binops to use ReturnedValue

Change-Id: I068b1af5c352fc84793079e5bccbe3482b04cafa
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert unary operations and some other runtime methods
Lars Knoll [Mon, 9 Sep 2013 19:35:37 +0000 (21:35 +0200)]
Convert unary operations and some other runtime methods

Change-Id: I985876ade37efd24e1d4f8360a6472282cf44f8b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse ReturnedValue for more runtime methods
Lars Knoll [Mon, 9 Sep 2013 19:17:01 +0000 (21:17 +0200)]
Use ReturnedValue for more runtime methods

Change-Id: I6e92dccf4c3c1a9e4c23128ced41b6e19da1e490
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove unused code to generate post increment and decrement expressions
Lars Knoll [Mon, 9 Sep 2013 18:34:30 +0000 (20:34 +0200)]
Remove unused code to generate post increment and decrement expressions

We generate lower level code in codegen and don't use these
runtime methods anymore.

Change-Id: If1023ce5295431305f4528839bcf2a3031fa7ad2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse ReturnedValue for some more runtime methods
Lars Knoll [Mon, 9 Sep 2013 18:32:01 +0000 (20:32 +0200)]
Use ReturnedValue for some more runtime methods

Change-Id: I68c7d321f8d17b32110ee050aa48fae5735e63ad
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse QV4::ReturnedValue in the runtime API
Lars Knoll [Mon, 9 Sep 2013 13:10:03 +0000 (15:10 +0200)]
Use QV4::ReturnedValue in the runtime API

This makes function calls from the JIT/Moth into the
runtime significantly nicer.

Change-Id: Ie7d7123984d65c0bee0525d3d28c643a76b394c4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse a ReturnedValue when converting to String or Object
Lars Knoll [Mon, 9 Sep 2013 12:33:28 +0000 (14:33 +0200)]
Use a ReturnedValue when converting to String or Object

Also rename Value::toQString() to Value::toQStringNoThrow(),
and add a throwing toQString() method for JS use.

Change-Id: I821b33fc61abb7d08839df965fd337685f61a545
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>