Commit Graph

3851 Commits

Author SHA1 Message Date
Lars Knoll 0abdf6db0e Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev 2017-02-15 12:01:51 +00:00
Robin Burchell f64fb98a28 dynamic_cast -> qobject_cast for QObjectDerived*
We cannot use dynamic_cast in Qt.

Change-Id: Ia6aeeb2439ca8c24239dce7cff55a0c18860e43e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-02-14 18:10:22 +00:00
Lars Knoll 802bebd566 Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I372850330c1d92edc5b07596759f0db3a59082a8
2017-02-14 08:21:39 +01:00
Tor Arne Vestbø f145f33d52 Rename Window.targetScreen to screen, and pick up changes to the screen
The screen property can be used for both setting the initital screen, and
for reading out the current screen, so 'targetScreen' was not an ideal
name for this property.

Change-Id: I1b617085b1e8e0e437355740be5d3cee9379c47f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-02-11 12:12:38 +00:00
Laszlo Agocs 24d4e164ad Re-enable tst_qquickwindow::headless
With the ANGLE update in 5.7 the root cause may have been fixed.

Task-number: QTBUG-42967
Change-Id: Iec2faf5b7f5ed2c5f116a9c10ce35ed704c46d31
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-02-10 13:58:28 +00:00
Robin Burchell bdb20c74eb As crazy as it is, redefinition of global properties should work
Furthermore, some of the ES6 tests do check for this behavior (this
fixes at least 9 of the tests in /test/built-ins/Object/, maybe more
elsewhere).

createMutableBinding used hasProperty(String*) to determine whether or
not it needs to actually define a property, which checks the prototype
chain.

This would be fine, but when writing values to properties, we used find() on
the InternalClass (which is equivilent to Object::hasOwnProperty), which
would fail as the property doesn't "really" exist on the object, it's somewhere
in the prototype chain. Thus, we'd incorrectly throw an exception in strict mode.

I see no regressions in ES5 from this change.

Change-Id: I3b097306f220a891955ec11eea860264746bc0ee
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-09 14:53:18 +00:00
Robin Burchell 33f54d1109 Add String.prototype.repeat from ECMAScript 6
Change-Id: I0ec59436e2dd1cd2e20e14434bc9753b09882238
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-09 14:52:46 +00:00
Robin Burchell 411dd9531a ObjectPrototype: Improve ES6 compliance
* getPrototypeOf: Per 19.1.2.9, we should ToObject(O), and ReturnIfAbrupt
* getOwnPropertyDescriptor: Per 19.1.2.6, we should ToObject(O), and ReturnIfAbrupt
* getOwnPropertyNames: Per 19.1.2.8.1, we should ToObject(O) and ReturnIfAbrupt
* seal: Per 1.9.2.17, if Type(O) is not Object, return O
* freeze: Per 1.9.2.5, if Type(O) is not Object, return O
* preventExtensions: Per 19.1.2.15, if Type(O) is not Object, return O
* isSealed: Per 19.1.2.13, if Type(O) is not Object, return true
* isFrozen: Per 19.1.2.12, if Type(O) is not Object, return true
* isExtensible: Per 19.1.2.11, if Type(O) is not Object, return false
* keys: Per 19.1.2.14, we should ToObject(O), and ReturnIfAbrupt

This improves the ES6 passrate for test/built-ins/Object/ quite a bit, before:
    === Summary ===
     - Ran 6144 tests
     - Passed 5719 tests (93.1%)
     - Failed 425 tests (6.9%)

After:
    === Summary ===
     - Ran 6144 tests
     - Passed 5769 tests (93.9%)
     - Failed 375 tests (6.1%)

... and also fixes numerous tests in other areas. Most of the missing
failures seem to be down to missing Object.assign & Symbol. It does regress on
some ES5 tests that specifically check for the ES5 spec behavior.

Change-Id: I039a223060c79c5bf4f5b041ad1ec4dc1afd5932
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-07 10:14:37 +00:00
Robin Burchell d6280f7729 DatePrototype: In ES6, this is an Object, not a DateObject
Quoting 20.3.4:
    The Date prototype object is the intrinsic object %DatePrototype%. The Date
    prototype object is itself an ordinary object. It is not a Date instance
    and does not have a [[DateValue]] internal slot.

Aside from Symbol failures (which we expect, because we don't have a
Symbol implementation at this time), Date.prototype only has these two
failures left in ES6:

    setFullYear/new-value-time-clip in strict mode
    setFullYear/new-value-time-clip in non-strict mode
    setMonth/new-value-time-clip in strict mode
    setMonth/new-value-time-clip in non-strict mode

These seem to be related to handling of overflow conditions.

Change-Id: I0b7f65fbef3f709ff56ecfc8e5a5d5cf974b7515
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-07 10:14:30 +00:00
Robin Burchell 8779521704 Date.prototype: Fixes for ES6 compliance
* Don't return -0 from TimeClip (20.3.1.15, 1)
* Mark length configurable (19.2.4.1)
* toUTCString and toGMTString must be the the same object (B.2.4.3)

Brings us a bit closer to passing tests. Still some failures in other
areas.

Change-Id: I905216b8653ac0b33cb27e6b773616521fbb5daa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-07 10:14:22 +00:00
Robin Burchell fb787067ee ObjectPrototype: Object.freeze() no longer sets TypeError for a non-Object
This is a behavior change in ES6. Refer to:
    19.1.2.5 (Object.freeze)
    Annex E (Additions and Changes That Introduce Incompatibilities with
             Prior Editions)

ES6 tests test/built-ins/Object/freeze before:
    === Summary ===
     - Ran 92 tests
     - Passed 66 tests (71.7%)
     - Failed 26 tests (28.3%)

after:
    === Summary ===
     - Ran 92 tests
     - Passed 76 tests (82.6%)
     - Failed 16 tests (17.4%)

Change-Id: Ia28da790b510580248056e0df7b305a5edc470dd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-03 15:10:36 +00:00
Robin Burchell 6653fdb6bf FunctionObject: Mark name/length property configurable
In ES5, these were not configurable, but ES6 changed the behavior.

For length, refer to:
    9.2.4 (FunctionInitialize)
    17 (ECMAScript Standard Built-in Objects):
        Unless otherwise specified, the length property of a built-in Function
        object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
        [[Configurable]]: true }.
    19.2.2.1 Function.length
    19.2.3.2 (Function.prototype.bind)
    19.2.4.1 (Function instances, length)

For name, refer to:
    9.2.11 (SetFunctionName)

This does regress test262 for ES5 for me a little, but improves our es6 test
coverage a bit (~682 more tests pass, +1.5%).

Change-Id: Icda7c9068dc3e6e4e4aebbb0d359868a30343013
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-03 15:10:33 +00:00
Robin Burchell bc5cdd23f1 parser: Add "let" keyword (& T_LET)
We also tie this up to the existing skeletal "const" support so that they
are also checked for duplicate declarations.

While we do that, change from using a boolean to an enum so we make the scope of
a declaration a little more easily comprehensible.

Change-Id: I6a6e08aed4e16a53690d6f6bafb55632807b6024
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-03 15:10:25 +00:00
Robin Burchell 5f807a6276 Codegen: Disallow duplicate declarations of const properties
Spec 13.3.1.1 (Static Semantics: Early Errors) says:

    It is a Syntax Error if the BoundNames of BindingList contains any
    duplicate entries.

Only let/const are supposed to be treated in this way, so we ensure that
one of them has been marked read-only (since we don't support "let"
yet).

There's still no runtime check on assigning to a constant-declared variable.

[ChangeLog][QtQml] "const" variable declarations now throw a SyntaxError if
multiple attempts to declare the same variable name are found. Note that
"const" is still not fully spec-compliant (i.e. reassignment at runtime is
not disallowed).

Task-number: QTBUG-58493
Change-Id: I31fd5f2bf3e79d48734e8ecb714c4e7f47e31d2a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-03 15:10:18 +00:00
Robin Burchell b7090f1334 Fix a crash in setInternalClass
Revealed by the ES6 testsuite, ./test/built-ins/Object/freeze/15.2.3.9-2-1.js
and probably others. We cannot unconditionally dereference memberData,
it may not always exist.

ES6 tests test/built-ins/Object/freeze before:
    === Summary ===
     - Ran 92 tests
     - Passed 66 tests (71.7%)
     - Failed 26 tests (28.3%)

after:
    === Summary ===
     - Ran 92 tests
     - Passed 90 tests (97.8%)
     - Failed 2 tests (2.2%)

Change-Id: I22a6c9ca081394ba15edfde09f73769eb3ce47b3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-03 12:48:40 +00:00
Robin Burchell b63393c7aa Codegen: Disallow const declaration without an initializer expression
This seems to match up with the spec behavior. 13.3.1.1 (Static Semantics:
Early Errors) says:

    It is a Syntax Error if Initializer is not present and IsConstantDeclaration
    of the LexicalDeclaration containing this production is true.

In addition, we also allow "const" to be used in JS mode too. We don't
yet fully support the semantics, but as it's there, why not let it work.

[ChangeLog][QtQml] "const" variable declarations are now available in JS
as well as QML mode.

[ChangeLog][QtQml] "const" variable declarations now require an
initializer, bringing them closer to the required spec behavior.

Task-number: QTBUG-58493
Change-Id: Ife5d5979b3e7a5d7340bf04f43605f847ee25ee2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-02 15:49:13 +00:00
Shawn Rutledge f96b77bf46 add QQmlEngine::offlineStorageDatabaseFilePath(db), use in LocalStorage
This is C++ API to get the actual storage path for a particular database.

[ChangeLog][QtQml] Added QQmlEngine::offlineStorageDatabaseFilePath(dbName)
to allow getting the actual storage path for a particular database.

Task-number: QTBUG-52013
Change-Id: I1cbd9454c537f08c97f4dafc06fd6b14e81c51af
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-02 13:19:57 +00:00
Oswald Buddenhagen 6ba26317d0 Merge dev into 5.9
Change-Id: I8436b1be632b80aae340cc692795ba86b4e3e79b
2017-02-01 20:43:30 +01:00
Shawn Rutledge cd39a62bbd fix test_mouseDrag on RHEL 7.2
mouseDrag(item, x, y, dx, dy, button, modifiers, delay)
in TestCase.qml adds intermediate mouseMove events if dx or dy
is too large (specifically if Math.round(dx/3) > dragThreshold)
and that is affecting the outcome of this test.  So we need to
stay under that threshold.  The original point of this test is from
f52227f66a / QTBUG-30188 :
when you drag past the dragThreshold, and the dragged Item "breaks loose"
and starts dragging, the initial distance that it jumps should be
equal to the dragThreshold, not greater.  To test it, we need
to move a distance which is greater than the dragThreshold in
one move event, not break it up into smaller movements.

This reverts commit 432eb3344b.

Task-number: QTBUG-58025
Change-Id: Ib6da69fb465b58fde1bf8ba56c4c3a1cb584f698
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-02-01 11:16:10 +00:00
Eskil Abrahamsen Blomfeldt 659d5202f9 Add fontInfo property to Text
This provides a way to determine which font will actually be
used to presenting the text, which can be especially useful when
not using a fixed size font (the font info will then expose the
actual font size used by the Text element.)

[ChangeLog][QtQuick][Text] Added fontInfo property to Text type,
providing a way to query properties of the actual font used
for presenting the text.

Task-number: QTBUG-51133
Change-Id: I5860fb1bd25ac5734713f49c8482428f2d531d22
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-01-31 08:22:14 +00:00
Liang Qi 6b1f857db5 Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: I312dcd7f8bbe6e15b157406e174c160e0eb7e225
2017-01-30 12:56:18 +01:00
Albert Astals Cid d0649a1b45 Make Item::grabToImage work in more cases, and improve test coverage
This fixes a regression caused by 9c50216c7b
when the Image specified fillMode: aspectRatioCrop/Fit.

[ChangeLog][QtQuick][Image] Item::grabToImage on an Image element will now work
regardless of the Image's sourceSize or cache properties.

Change-Id: I225854c48f0c35a3cb2ef0dd56bf51bd88c31779
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-01-27 18:11:30 +00:00
Robin Burchell e74a1d0b34 Enable resolution of composite types in QQmlTypeNameCache
We didn't have resolution of composite types previously, which is a
prerequisite to do more exciting things with QML types in JavaScript
(such as instanceof).

By deferring the resolution to QQmlImports, we can avoid the need to
fill the cache with types that may not be needed, while still finding
types which are requested.

In the future, we could consider removing the "special" handling for composite
singletons as they should be found through QQmlImports now. If we do
that, we may still want to cache the QUrl for the types, to avoid using
QQmlImports too often directly, as it is a little slow itself.

This change doesn't regress tst_compilation.

Task-number: QTBUG-24799
Change-Id: I9ba2e4829ca49008fd180fb488c586475cf90674
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-27 11:57:57 +00:00
Jake Petroules e0c119ccd4 Use qtConfig where appropriate
Change-Id: Ibe2a256ce5f208b3431c32a124aacf616641c965
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-26 16:59:44 +00:00
Oswald Buddenhagen 90d62f4c02 remove obsolete host build declarations from subdirs projects
follows up qtbase/4eb2feb2.

Change-Id: I13ba74fb25dfd059782b369350fa14e44b70bf79
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-26 16:59:10 +00:00
Liang Qi 0076c44d39 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	src/quick/util/qquickutilmodule.cpp
	tools/qmllint/main.cpp

Change-Id: Ic2283f88c293ca7fc776de3e83eb4c7812309d8a
2017-01-26 00:34:21 +01:00
Robin Burchell ff1a728e95 tst_compilation: Add a test for compilation of a large number of types
As I'll be touching QQmlImport, it would be good to ensure it doesn't
regress. This may also be useful for future such changes (e.g. I want to
try play around with how the implicit import is handled).

Results for me on a recent dev snapshot, 2013 rmbp:

********* Start testing of tst_compilation *********
Config: Using QtTest library 5.9.0, Qt 5.9.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 8.0.0 (clang-800.0.42.1) (Apple))
PASS   : tst_compilation::initTestCase()
PASS   : tst_compilation::bigimport(10, qmldir)
RESULT : tst_compilation::bigimport():"10, qmldir":
     3.6 msecs per iteration (total: 59, iterations: 16)
PASS   : tst_compilation::bigimport(100, qmldir)
RESULT : tst_compilation::bigimport():"100, qmldir":
     54 msecs per iteration (total: 54, iterations: 1)
PASS   : tst_compilation::bigimport(1000, qmldir)
RESULT : tst_compilation::bigimport():"1000, qmldir":
     558 msecs per iteration (total: 558, iterations: 1)
PASS   : tst_compilation::bigimport(10, noqmldir)
RESULT : tst_compilation::bigimport():"10, noqmldir":
     5.0 msecs per iteration (total: 80, iterations: 16)
PASS   : tst_compilation::bigimport(100, noqmldir)
RESULT : tst_compilation::bigimport():"100, noqmldir":
     58 msecs per iteration (total: 58, iterations: 1)
PASS   : tst_compilation::bigimport(1000, noqmldir)
RESULT : tst_compilation::bigimport():"1000, noqmldir":
     558 msecs per iteration (total: 558, iterations: 1)
PASS   : tst_compilation::cleanupTestCase()
Totals: 8 passed, 0 failed, 0 skipped, 0 blacklisted, 22400ms
********* Finished testing of tst_compilation *********

Change-Id: I7159e561fb13a3c48e966d5b963dc0ef1ca783e3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-24 17:37:40 +00:00
Robin Burchell b9fe2c2bfd Teach QQmlDirParser to ignore the classname keyword
This saves QQmlImport from some unnecessary bad lookups when finding
types (due to classname being misinterpreted as belonging as a
component).

Change-Id: I36e622e357e55e98a5af46911709640c5d8fa291
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-24 17:37:34 +00:00
Jan Arve Saether 941fb369eb Stabilize test
Obviously, if the animation still hasn't stopped, we cannot expect it to
fail on the next QTRY_COMPARE, since that might wait until it then passes,
thus CI will log that as an XPASS.

This failed during CI run for MSVC 2015:
XPASS  : tst_QPauseAnimationJob::multipleSequentialGroups() QCOMPARE(((group.state())), QAbstractAnimationJob::Stopped) returned TRUE unexpectedly.
 tst_qpauseanimationjob.cpp(396) : failure location

Change-Id: I25151123b8fc2617f2a4d3690215e6a1ed2856ff
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-01-24 10:37:14 +00:00
Liang Qi 432eb3344b Blacklist qmltest::mouserelease::test_mouseDrag() on RHEL 7.2
Task-number: QTBUG-58025
Change-Id: I0768ea834d5666f2831f24c3b2c71b7a4260d5d9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-24 09:02:42 +00:00
Jan Arve Saether c4067b42f7 Do not leak the item, and use a QScopedPointer to guarantee cleanup
Change-Id: Ib4160f418686cef6d85dfd64657d25836f66778e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-01-23 09:02:58 +00:00
Robin Burchell b3629b4c27 tst_qqmlecmascript: Add some simple coverage for instanceof
Since I'm working on this, it is nice to have some simple verification
that things are working. I don't expect this to provide full coverage,
but it should at least make sure that the basics are ok, and nicely
provides a place to put further tests if it ever somehow breaks.

Change-Id: If91154dee836cc514515bde122e48b271de22676
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-20 13:28:54 +00:00
Liang Qi 0b1d4983ff qmltest: added layout/tst_layout.qml and related files
They are moved from qtquickcontrols:tests/auto/controls in 3437fd56.

Task-number: QTBUG-58294
Change-Id: I281d4e505b2f699154dd4efb7a4601bdf3856295
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-01-20 09:32:18 +00:00
Oleg Yadrov 7ee15ecdd9 PathAnimation: fix bug when PathSvg or PathLine is the last item in Path
Both QQuickPathLine and QQuickPathSvg inherit QQuickCurve class which
has “x” and “y” properties that return qreal type, but internally they
are stored as QQmlNullableValue<qreal>. At the same time, if any of them
is not specified explicitly, its getter returns 0.

QQuickPath processes QQuickPath%Type% objects and produces a
QPainterPath which later used by QQuickPathAnimation.
QQuickPathAnimation only created a QAbstractAnimationJob if
QQuickPath::hasEnd returned true, and hasEnd returned true only if both
“x” and “y” were specified explicitly.

All that in conjunction led to the situation when if you had either
- a PathLine with unspecified “x” or “y”; or
- a PathSvg
which was the last (or the only) path element in your Path,
PathAnimation would not start.
This patch removes hasEnd check, it should be safe to do because
QPainterPath is always valid anyway due to the fact QQuickCurve::x()
and QQuickCurve::y() return 0 if they have not been not explicitly set.

Task-number: QTBUG-57666
Change-Id: Id320aaeb5aff0964d6493b7b80d5d9a7d36acce8
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-01-20 00:13:24 +00:00
Oleg Yadrov 03505d6eb7 StackLayout: propagate rearrange() call to child layouts
Task-number: QTBUG-57867
Change-Id: I0190b892e2bc2966b82a0dbd99e53fd9d6848957
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2017-01-19 23:02:54 +00:00
Robin Burchell edffdcf9b4 test262: Allow specifying a custom V4CMD
Useful for running a test tree against different qmljs or if qmljs is
outside PATH.

Change-Id: Ibaa24a15d32b21f9293db2c042fe3f1de3bb75eb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-19 19:44:22 +00:00
Albert Astals Cid 7a8842460d Q_ENUMS -> Q_ENUM and Q_FLAGS -> Q_FLAG
Change-Id: Ibedd0d0c23cf194ea02a229ab643450dbefd40aa
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-01-19 11:54:27 +00:00
Ulf Hermann d7cd210bb4 Make inspector animation speed test more robust
We don't exactly know when the animation speed is actually set and the
system clock may play tricks on us. Consider the test failed when the
wrong animation speed is witnessed 3 times in a row and successful if
the correct one is witnessed 3 times in a row. Also, make sure we don't
confuse lines from different hits of the timer.

Task-number: QTBUG-58186
Change-Id: Iaa2c35f723a92f32131e36084399b3d32accb7d0
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-01-18 12:43:49 +00:00
Simon Hausmann 89c6bee139 Fix support for QJSValue as C++ signal parameter type, part 2
After commit 0e3380f9c6 we wouldn't crash
anymore, if QJSValue::UndefinedValue was provided as value for a
QJSValue C++ signal parameter. However that was not a complete fix for
the regression of commit aa869cbb06, as
other primitive values stored in QJSValue as QVariant were not
converted, so for example QJSValue(42). So let's fix this once and for
all by using QJSValuePrivate::valueForData, that handles all types of
QJSValuePrivate encodings.

Task-number: QTBUG-58133
Change-Id: Ib7c0461b18df6260ccd4bce729ae2348281eb7f3
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-18 05:51:05 +00:00
Robin Burchell 0412de08fd qmlInfo: Switch message level to QtInfoMsg, matching the function name
qmlInfo predated info-level messages in QtCore, and as such previously sent
warning-level messages despite the unfortunate naming. Now that we have
an actual qmlWarning function, and we have switched our code to use it,
we can change qmlInfo's behavior to better match the function naming.

This does have the impact that existing qmlInfo callers will
basically need a s/qmlInfo/qmlWarning/g to retain the same QDebug level in
user code, but I feel that this behavior change makes sense given the better
consistency with C++-side QDebug we attain.

[ChangeLog][QtQml][Important Behavior Changes] qmlInfo now reports messages with
a QtMsgType of QtInfoMsg instead of QtWarningMsg. To continue to send warnings,
callers should migrate to the newly-introduced qmlWarning function.

Change-Id: I16c88d94377b5956eb6921b64af7c84d1ca024f6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-17 14:06:39 +00:00
Robin Burchell 373cdc297f Remove remnants of blackberry platform support
The last remnants were removed from qtbase in 5.7 making this all dead code,
so match here too.

Change-Id: I10f3f1c614562f2a97ade7cdf5002065d6f79e07
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-16 17:10:14 +00:00
J-P Nurmi 8eada7ae7d ListView: allow flicking to both directions
Previously flicking was restricted to the orientation of the ListView.

[ChangeLog][QtQuick][ListView] Made it possible to enable horizontal
flicking in a vertical ListView, and vice versa. The only thing apps
must do is to specify the desired flick direction and the content
width (vertical ListView) or content height (horizontal ListView),
which is not calculated by ListView.

Change-Id: Ic370e57f5d18679940d48e7a2c20c200b2ef36d1
Task-number: QTBUG-52553
Task-number: QTBUG-56501
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-01-16 15:46:28 +00:00
Robin Burchell 2c826af7c3 tests: Remove some vestigial references
qtdeclarative hasn't relied on qtwebkit for a long time (since
fbfb27a44a &
56d34a653a as early as 2011!).

Change-Id: If02572617034bf2c3eecbf081b96b1ed0ad65b45
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-16 15:13:54 +00:00
Robin Burchell 01f7a9dbe2 QQmlApplicationEngine: Yet another fix after QUrl behavior changes in QtBase
Picture the following application:
    QQmlApplication qAppEngine("main.qml");

With main.qml:
    ...
    AComponentInTheSameDirectory {
    }
    ...

This was failing, with the error:
    file:main.qml:13 AComponentInTheSameDirectory is not a type

Which is wrong, but also reveals the root cause in that the
original filename was not a fully resolved path.

Change-Id: Ifc5557cc43f4bb92fd121ea9f7a37f09b3b38a9b
Reviewed-by: David Faure <david.faure@kdab.com>
2017-01-16 15:13:49 +00:00
Robin Burchell ed024294c5 Fix imageSource and svg tests after change to how QtSvg interprets image size
These tests were blacklisted after QtSvg/4bd5d6ced07d2d0e643a13e7cebb228c521d2046.
in order to integrate qt5.git. Now, fix the tests to match the new
behavior, and remove the blacklisting.

Task-number: QTBUG-58082
Change-Id: I77abe995095ee52978c5957e49e1547b3af7708b
Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-01-15 08:35:58 +00:00
Liang Qi 60300fda46 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	.qmake.conf

Change-Id: I9d87ed86e95b5901a86cc3aa65d7ac39b0b708c2
2017-01-14 22:17:32 +01:00
J-P Nurmi efa2250738 Deprecate Text::doLayout() in favor of forceLayout()
Item views and positioners all have now forceLayout(), so make the
Text element API consistent with them. The old doLayout(), which
sounds more like an internal helper method, is deprecated and marked
for removal in Qt 6.

[ChangeLog][QtQuick][Text] Deprecated doLayout() in favor of
forceLayout().

Change-Id: I051988fca13c4cd84904f7b268d51f6a96f28af3
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-01-14 05:02:57 +00:00
Robin Burchell e85ebe01b6 Blacklist imageSource and svg tests
QtSvg changed how the dimensions of an SVG are determined in
4bd5d6ced07d2d0e643a13e7cebb228c521d2046. These tests assume the old
behavior at present, so blacklist the tests so qt5 integration can
proceed.

Task-number: QTBUG-58082
Change-Id: Ia579fbe6736932c081f9873d84bea4c01a975bad
Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-01-13 22:28:49 +00:00
Simon Hausmann 0e3380f9c6 Fix crash when C++ QJSValue parameterized signal interacts with JS
When converting the parameters of a C++ signal to JS values to provide
to a signal handler written in JS, the conversion of a QJSValue to a
QV4::Value* may yield a null pointer in case of a default constructed
QJSValue for example. This is a regression from commit
aa869cbb06 and we must check for this.

Task-number: QTBUG-58133
Change-Id: I528b606b2851dfb3072e54902bd8843d31571a55
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-13 12:41:33 +00:00
Michael Brasser 0820efecb4 Improve visibility into Positioner positioning from QML
Add a forceLayout function, similar to the views, as well
as a signal that indicates when positioning has completed.

Change-Id: Ice01ea0840c707e403fdd4ea59d92a89e2ed8e4b
Task-number: QTBUG-44762
Task-number: QTBUG-32114
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-01-13 03:02:09 +00:00