Commit Graph

3807 Commits

Author SHA1 Message Date
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
Jan Arve Saether 342c72da64 Avoid needless notifications when destroying layouts
When deleting a layout with children, it ends up in ~QQuickItem(), which in
turn will call setParentItem(0).  setParentItem(0) will in turn call
setEffectiveVisibleRecur(), which will recurse down all its descendants.
Therefore, deleting a top level layout might trigger item change listeners
for *all* its descendants, not only its direct children.

This behavior might even cause crashes: The visibility changes will then
trigger an invalidation of the layout, which will propagate up the parent
hierarchy, and potentially call invalidate() on a partially-destroyed
layout, which then might crash.

Change-Id: I48e11d57f69e9011ced6c3a0b51e3d89b24ad5c1
Task-number: QTBUG-55103
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-01-12 09:56:40 +00:00
Liang Qi a16f2cc391 test: fix tst_QQuickGraphicsInfo::testProperties()
This also reverts commit 26051fd572.

Task-number: QTBUG-58039
Change-Id: I0b9146a64f1a112f5c059b2e29e874631c81d12c
Reviewed-by: David Faure <david.faure@kdab.com>
2017-01-12 06:49:49 +00:00
Robin Burchell 3294d1b291 tst_touchmouse: Have a go at some stabilisation & improvements
* Use QScopedPointer to own views, preventing leakage (was a problem in
  a few of these tests, e.g. pinchOnFlickable/flickableOnPinch/mouseOnFlickableOnPinch)
* Only qWaitForWindowActive, as the tests aren't doing anything
  graphical, they don't need an expose event, which means less waiting
* Use the test utilities to center the windows on screen to make sure
  they are not under desktop chrome & have a non-null position.
  If position is 0,0 that means window->position().isNull() is true,
  so qWaitForWindowActive will wait for its entire timeout: 5 seconds.
  This means no "manual" tweaking of geometry anymore: the position is now taken
  care of by the test utilities, and we let the root QML item size determine the
  window size.
* Move the mouse away from the window using the test utilities.

Done-with: Shawn Rutledge
Change-Id: I4ac6a0d56067c57ef51f186fe3cd118cab056ff2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-01-11 23:10:27 +00:00
Oleg Yadrov 0252d05d06 PathView: fix crash on path remove
There was no check if new path is a valid object

Task-number: QTBUG-53917
Change-Id: I2fd9534c1d34633243d16eda56a2b07e18dabe16
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-01-11 18:19:02 +00:00
Robin Burchell 5a5f140e60 QQmlInfo: Add qmlDebug & qmlWarning functions alongside qmlInfo
This way, we can correctly write to multiple levels of QDebug with QML context
information. A followup change will port all existing callers, and
subsequently change qmlInfo's message level to QtInfoMsg.

[ChangeLog][QtQml] Introduced qmlDebug & qmlWarning functions to qqmlinfo.h, in
addition to the pre-existing qmlInfo function. As a side effect, QQmlError has
also gained messageType() and setMessageType().

Change-Id: I04ced5952c5c3c58293a89a6767c7b545c03cc0a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-11 13:49:04 +00:00
Ulf Hermann 6746db54f2 QML tooling: Make sure we signal object creation also from QQmlIncubator
We have to call the QQmlEngineDebugService back from QQmlObjectCreator
rather than QQmlComponent, as there are more ways to create an object.

We also add the new instance to the global instance list if only the V4
debug service is active, as both QQmlEngineDebugService and
QV4DebugService use it.

Change-Id: I5dcc71b2e91049bc19ec70d7b87959a61c9b6b75
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-11 11:51:08 +00:00
Edward Welbourne 7277fdd603 tst_qqmllocale: avoid duplicating a QLocale::toString() call
Reuse the same const QString in both places, in each of the functions
that repeated this pattern.

Change-Id: Ic20281692d84b3ad5257af9837957e0893452b1a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-10 18:11:38 +00:00
Edward Welbourne 676340aef6 tst_qqmllocale: simplify creation of a QDateTime
Nine tests all used setDate and setTime on a default QDateTime, where
just initializing it right, in one line, is simple, terse and easy to
understand.  This also allows it to be const.

Change-Id: I77fd8b36b705cafc49f9020ae9280dfdcfece0d8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-10 18:11:32 +00:00
Edward Welbourne fb15a8c242 tst_qqmllocale: shuffle commentary on JS Date's month numbering
While it departs from common date numbering, as used by QDateTime, the
0=Jan numbering used by JS's Date was copied from Java's Date, which
(probably) copied it from ANSI C's struct tm; and C likes to count
from zero.  So don't call it weird; and let's comment on it where it's
actually relevant (in JS code with the offset, rather than against
uses of QDate, which uses 1=Jan numbering) and only once.

Change-Id: I926138e88583339bec8641e3b28a642794dc217d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-10 18:11:26 +00:00
Edward Welbourne e7bfab82b4 tst_qqmllocale: use unsetenv to clear environment variable
tst_qqmllocale::timeZoneUpdated() was recording the prior time zone,
frobbing it for the duration of its test, then restoring it.  However,
if TZ was previously unset, it got set to empty instead of being
unset.  This did not quite have the same effect; UTC ends up being
used instead of the system default, with potential for conflict
between system functions (that have attended to tzset) and third-party
libraries (e.g. ICU) with internal state saved from before the change.

Change-Id: I9f2147cd8858316e9ba5fd84d95dfc2c4538b0ab
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-10 18:11:19 +00:00
Edward Welbourne ba244f5400 tst_qqmllocale: use QVERIFY() rather than QCOMPARE(, true)
Use booleans as booleans, it's what they're for.

Change-Id: I68c0ba5efcfd3556eeef043b179769e91c77cf03
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-10 18:11:11 +00:00
Liang Qi 26051fd572 Blacklist tst_QQuickGraphicsInfo::testProperties() on linux
Task-number: QTBUG-58039
Change-Id: Ib7a371c6dec7748b9c5257b6cf4dfb61efc7aa88
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-10 14:07:00 +00:00
Shawn Rutledge 4038160a32 MultiPointTouchArea.TouchPoint: add rotation, uniqueId and ellipseDiameters
So far uniqueId and rotation are mainly applicable to TUIO.
Deprecate the area property in favor of ellipseDiameters.
Also improve the mpta-crosshairs manual test to show this information.

Change-Id: I16ea6618ae21ce66dac45638d6e2bb3c0a3b1818
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2017-01-04 12:02:33 +00:00
Shawn Rutledge 63a03f6772 mpta-crosshairs manual test: correct the velocity vector rotation
acos cannot return any possible angle, but atan2 can.

Change-Id: Ic277bc1d3616900775b6076dce6b05bdf3c35da3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2017-01-04 06:57:26 +00:00
Simon Hausmann f43dc181d7 Fix QML cache not being invalidated when source path changes
When somebody renames the directory name underneath a QML file and its
cache file, then we need to re-generate the cache as it contains the
fully path of the source path. That is sometimes used to resolve
relative URLs (such as images) and therefore needs updating (by
re-creating the cache).

Task-number: QTBUG-57644
Change-Id: I9766668859aad8e9d71f278c3f26c0585258c14e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-02 09:55:07 +00:00
Oleg Yadrov f70066e95e Make it possible to call grabToImage() on Window.contentItem
Window.contentItem was not associated with any QQmlContext and
QQmlEngine. A valid pointer to QQmlEngine is needed for callback
function execution.

Task-number: QTBUG-57175
Change-Id: Iab7730bfc8860521ff2e8c1631a11d0e1fe0cf94
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-01-02 07:01:15 +00:00
Shawn Rutledge bb123fa3a4 add text manual test
The initial goal is to verify the behavior of text, preeditText
and displayText properties and their associated signals
on various platforms.

Change-Id: Ie50c78a83930e05158a197f38087db9ae3cba534
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-12-31 14:55:59 +00:00
J-P Nurmi 3f6d82715d Add TextInput::textEdited()
[ChangeLog][QtQuick][TextInput] Added textEdited() signal to
distinguish user edits from programmatical text changes.

Change-Id: I1d78499e3e11f9f1cab80ce3b0a6d9f2713219f4
Task-number: QTBUG-57203
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2016-12-30 17:46:15 +00:00
J-P Nurmi bb594453f9 Flickable: add horizontal/verticalOvershoot properties
[ChangeLog][QtQuick][Flickable] Added horizontalOvershoot and
verticalOvershoot properties that can be used for implementing
boundary actions and effects.

Task-number: QTBUG-38515
Change-Id: I06379348a67d03507b56788d6fc7020bbb2d375f
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-12-29 11:43:59 +00:00
Liang Qi 9a272ad185 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	tools/qmlimportscanner/main.cpp

Change-Id: I01e17581f6691a03f83788773364d0cf96319514
2016-12-25 18:35:38 +01:00
Mitch Curtis 42c52e6f2d TestCase: make parent argument to createTemporaryObject optional
This matches the behavior seen from Component's createObject()
function.

Change-Id: I83fe73a588d04c5efd30c49059bb19e7584bef48
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-12-21 17:34:33 +00:00
Mitch Curtis fd0c4fb24a TestCase: don't try to access destroyed temporary objects
Objects created with createTemporaryObject() and
createTemporaryQmlObject() can be destroyed manually before the test
ends. Before this patch, there would be a type error when trying to
check if the object still exists in qtest_destroyTemporaryObjects().

The error seems to stem from the fact that objects that are stored in
an array and later destroy()'d are not nullified, but rather left in
a corrupt state. See the linked bug for more information about this.

We work around this issue by checking for the existence of the
destroy() function on the object before attempting to call it.

Task-number: QTBUG-57749
Change-Id: I0f6ddd47d86af6fb87392c2992f9f6143af6aab8
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-12-21 14:09:32 +00:00
Mitch Curtis 7b7322c497 ListView, GridView: fix missing keyNavigationEnabled property
Before this patch, this code:

import QtQuick 2.7

ListView {
    keyNavigationEnabled: true
}

Would cause this error:

"ListView.keyNavigationEnabled" is not available in QtQuick 2.7.

This is because ItemView was missing a revision:

qmlRegisterUncreatableType<QQuickItemView, 7>(
    uri, 2, 7, "ItemView", QQuickItemView::tr("ItemView is an abstract base class"));

Task-number: QTBUG-57621
Change-Id: Ia00cb7446a0d83278760f3aa361db5a864661bc6
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-12-20 11:51:24 +00:00
Mitch Curtis c4eefa4a8d Keys: add shortcutOverride signal
This allows an item to accept the shortcutOverride event, preventing
e.g. Shortcut from stealing key events.

The original use case that prompted the creation of this patch was
using a Popup from Controls 2 to create a keyboard shortcut editor.
When the user wanted to cancel the shortcut that they were editing,
they could press escape, but Popup would grab the shortcut and close
itself. As the test case demonstrates, the same problem occurs with
the Shortcut type in Qt Quick.

[ChangeLog][QtQuick][Keys] Added shortcutOverride signal to Keys
attached object to allow prevention of e.g. Shortcut from stealing
key events.

Task-number: QTBUG-57098
Change-Id: I594e4ea17ec417d8c7d93c6cf347c1a1a2e62b93
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-12-18 14:57:54 +00:00
Olivier JG 17a1c12a45 Add pressAndHoldInterval to MouseArea
Introduce pressAndHoldInterval to allow setting the pressAndHold delay
per-MouseArea.

[ChangeLog][QtQml][MouseArea] Introduce pressAndHoldInterval property,
which controls the elapsed time before pressAndHold is emitted.

Task-Id: QTBUG-47662
Change-Id: Ic2173335033a6ed0d4b652333020f030de63a8e7
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2016-12-16 18:28:44 +00:00
Liang Qi 0e80d28aa5 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp
	src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp
	src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
	src/qml/qml/qqmlimport.cpp
	src/quick/items/context2d/qquickcontext2dtexture_p.h
	tools/qmleasing/splineeditor.h

Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
2016-12-14 19:01:23 +01:00
Liang Qi ed32558d62 Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/dev 2016-12-14 08:39:44 +00:00
Liang Qi 172260ebef Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: I905dcd29377bf1b2e0ee086823b54277d18e78dd
2016-12-14 08:54:57 +01:00
Mitch Curtis 7aaebe5574 TestCase: add createTemporaryObject(), createTemporaryQmlObject()
A typical pattern with QML tests is to dynamically create
an item and then destroy it at the end of the test function:

TestCase {
    id: testCase
    name: "MyTest"
    when: windowShown

    function test_click() {
        var item = Qt.createQmlObject("import QtQuick 2.0; Item {}", testCase);
        verify(item);

        // Test item...

        item.destroy();
    }
}

The problem with this pattern is that any failures in the test function
will cause the call to item.destroy() to be skipped, leaving the item
hanging around in the scene until the test case has finished. This can
result in interference with future tests; for example, by blocking input
events or producing unrelated debug output that makes it difficult to
follow the code's execution.

By calling e.g. createTemporaryQmlObject() instead, the object is
guaranteed to be destroyed at the end of the test function:

TestCase {
    id: testCase
    name: "MyTest"
    when: windowShown

    function test_click() {
        var item = createTemporaryObject("import QtQuick 2.0; Item {}", testCase);
        verify(item);

        // Test item...

        // Don't need to worry about destroying "item" here.
    }
}

[ChangeLog][TestCase] Added createTemporaryObject() and
createTemporaryQmlObject() functions that can be used to ensure that
dynamically created objects are destroyed at the end of each test
function.

Change-Id: I483342052462aa86464c86bf2082892712dceb58
Task-number: QTBUG-56361
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2016-12-14 07:20:30 +00:00
Lars Knoll 82ee8341fb Get rid of FunctionObject::createQmlFunction
Instead, simply create a QmlContext, and setup the bindings with
the QV4::Function itself.

Change-Id: I9db93b15112e43a6d5e275d126fb20f9c8833e8f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-12-09 14:01:57 +00:00
Lars Knoll 9de7d0e9f1 Change signature of QQmlBinding::create to take a FunctionObject *
This is what's in the Value in all cases anyway.

Change-Id: I212c4c4076050e8d0ea4cf6f72a1683e132cd51b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-12-09 14:01:26 +00:00
Ulf Hermann bff7302fc2 V4 Debugger: Add an option to pass additional context for evaluate
Interpret the "context" option as an ID for a QObject whose QML context
is then injected when evaluating the expression. The QObject needs to
be tracked by some other debug service for this to work, e.g. the QML
debugger or the inspector.

Task-number: QTCREATORBUG-17177
Change-Id: I6a9e8b9ae23e8bb67ed1905a2ef73f7c4faeb990
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-12-09 12:51:51 +00:00
Friedemann Kleint 260f45d539 tst_QQuickPathView, tst_QQuickListView: Fix compiler warnings
Fix warnings about assignment used as truth value in Q[TRY_]VERIFY
by generally pulling out the assignment in case of QVERIFY and adding
parentheses in case of QTRY_VERIFY. Also fix 2 cases in which apparently
QTRY_VERIFY(find()) was intended.

Fixes warnings:
tst_qquickpathview.cpp: In member function 'void tst_QQuickPathView::creationContext()':
tst_qquickpathview.cpp:1637:100: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquickpathview.cpp: In member function 'void tst_QQuickPathView::currentOffsetOnInsertion()':
tst_qquickpathview.cpp:1688:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquickpathview.cpp:1700:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquickpathview.cpp:1712:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp: In member function 'void tst_QQuickListView::sectionsPositioning()':
tst_qquicklistview.cpp:2392:97: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp: In member function 'void tst_QQuickListView::itemListFlicker()':
tst_qquicklistview.cpp:2979:97: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:2981:97: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:2983:97: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:2988:97: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:2990:97: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:2992:97: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:2997:97: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:2999:97: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:3001:97: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp: In member function 'void tst_QQuickListView::creationContext()':
tst_qquicklistview.cpp:5339:97: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5341:98: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5343:98: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5345:99: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp: In member function 'void tst_QQuickListView::unrequestedVisibility()':
tst_qquicklistview.cpp:5626:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5628:103: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5631:103: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5633:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5636:103: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5638:103: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5640:103: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5642:103: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5650:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5652:103: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5663:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5665:103: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5668:103: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5670:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5673:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5675:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5677:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5679:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5687:103: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5690:103: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5692:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5695:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5697:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5699:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5701:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5707:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5709:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5711:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5713:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5719:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5721:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5723:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5725:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5731:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5733:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5735:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5737:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5743:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5745:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5747:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:5749:104: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp: In member function 'void tst_QQuickListView::displayMargin()':
tst_qquicklistview.cpp:7255:100: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:7259:102: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp: In member function 'void tst_QQuickListView::negativeDisplayMargin()':
tst_qquicklistview.cpp:7292:99: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:7295:99: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:7298:99: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
tst_qquicklistview.cpp:7303:99: warning: suggest parentheses around assignment used as truth value [-Wparentheses]

Change-Id: Ic069c8336cf15db75860c6f79dfd215a5592ca79
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-12-08 16:27:12 +00:00
Lars Knoll 48591ce7dc Merge remote-tracking branch 'origin/5.8.0' into 5.8
Change-Id: I19804e880005c66880eeabfaebf0b1093de80e6b
2016-12-07 15:21:15 +01:00
Jeremy Katz 485e9fdf48 Add touch event support to qmltest
[ChangeLog][QuickTest] Add support for simulating touch events
from TestCase.

Task-number: QTBUG-23083
Change-Id: Ic045e00a91b8270b6f08d398323e06b576615e79
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2016-12-06 15:41:55 +00:00
Lars Knoll e31e72925f Cleanup and reduce the number of overloads for QQmlBinding::create()
Change-Id: Ibcd277bc434638e5c6e8e9ccea634aa25cde1643
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-12-06 13:01:30 +00:00
Lars Knoll f2a9579375 Inline the qmlScope and urlScope methods
They are only a couple of lines and used only in one place.

Change-Id: Iee9139e78d5d7fd385cae39d6dd5fad7e5d461b5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-12-04 08:31:56 +00:00
Lars Knoll 8a6383775a Start cleaning up the QmlContextWrapper
The class should get merged with the QV4::QmlContext class.
Simplify the cleanup by moving both classes into a common
file.

Change-Id: I0074da79701d5f41eb51681b70fcde85bfd45fc1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-12-04 08:31:49 +00:00
Friedemann Kleint aabeeda52c Build benchmarks only in release mode
Otherwise, a debug build will fail due to not find the release mode libraries:
LINK : fatal error LNK1181: cannot open input file 'D:\dev\5-vs15-58-static\qt-58s\qtbase\lib\Qt5Gui.lib'

Change-Id: I1b942db5ad0cf5fb3a949f9d39b8cf55a2dbd69a
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-12-02 08:58:06 +00:00
Friedemann Kleint 92ba955a84 Remove reference to trusted-benchmarks.pri
It appears to be legacy that is no longer found.

Change-Id: Id7fa8555e32d917da617100fb8720a18eab69ae1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-12-01 15:01:53 +00:00
Albert Astals Cid b19ebe1d23 Fix SignalSpy with QQmlPropertyMap signals
2e7d4ecdc5 caused the regression.
To fix the regression I try accessing the signal name first
and if it is not a function try accessing the handler name.

Comes with a unit test to test both cases.

Change-Id: I3897f344df9c6219636c70259eed503d9b76f09e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-30 15:01:01 +00:00
Simon Hausmann 6ed23b91b9 Fix support for namespaced types in property/signal declarations
Declarations such as

    property Namespace.Item foo

or

    property list<Namespace.Item> foo

would get rejected by the grammar due to the lack of productions. This
is now encapsulated in the UiPropertyType, which used to be merely an
identifier but is now changed to produce a UiQualifiedId - the same type
that's also used for MyNamespace.Item { ... } object declarations for
example.

Task-number: QTBUG-10822
Change-Id: Ic3ac1adbe17c83b24b67950c2f089e267b73b99b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-30 13:50:43 +00:00
Lars Knoll e579076bb3 Get rid of most QT_NO_FOO usages
Instead use QT_CONFIG(foo). This change actually detected a few
mis-spelled macros and invalid usages.

Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-29 10:10:27 +00:00
Liang Qi 9044800083 Merge remote-tracking branch 'origin/5.7' into 5.8
The renderers added in 5.8 had to be adapted to the changed profiling
macros from 5.6.

Conflicts:
	src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp
	src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp
	src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
	src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp
	src/quick/util/qquickprofiler_p.h
	tests/auto/qml/qjsengine/tst_qjsengine.cpp
	tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp

Change-Id: Icb370b7c95aab12589ad73881ac6d178759a5c6b
2016-11-28 12:24:13 +01:00