platform/upstream/qtdeclarative.git
9 years agoHandle context loss in the threaded render loop
Laszlo Agocs [Tue, 10 Mar 2015 15:59:08 +0000 (16:59 +0100)]
Handle context loss in the threaded render loop

Change-Id: I3f9219dd2fed15094c2f7d670a981406e601959b
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agotst_QQuickPathView::mouseDrag(): Skip on Windows if drag fails to start.
Friedemann Kleint [Thu, 26 Feb 2015 15:20:43 +0000 (16:20 +0100)]
tst_QQuickPathView::mouseDrag(): Skip on Windows if drag fails to start.

The test can be thrown off by external mouse move events which
influence the calculation of the drag distances. It is not clear where
they originate from on the CI.

FAIL!  : tst_QQuickPathView::mouseDrag() 'pathview->isMoving()' returned FALSE. ()
tst_qquickpathview.cpp(1506) : failure location

Change-Id: I398304b5597579033df81e1d0d32b2a3ab5516d6
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoDon't evaluate the expression in switch() multiple times
Lars Knoll [Mon, 9 Mar 2015 09:13:25 +0000 (10:13 +0100)]
Don't evaluate the expression in switch() multiple times

The old code would evaluate the expression in the switch
statement once for every case label. This is not only slower
than it should be, but can also lead to unexpected results in
case the expression doesn't always evaluate to the same value
or has side effects.

Task-number: QTBUG-41630
Change-Id: Id93baca7e3aa09ce884967ef6524d4c4f055bcd6
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix flickable stealing gestures when height >= contentHeight.
Andrew den Exter [Mon, 9 Mar 2015 06:47:16 +0000 (16:47 +1000)]
Fix flickable stealing gestures when height >= contentHeight.

Or width >= contentWidth.

If newY is equal to both maxY and minY then the second assignment to
rejectY can clobber the first.  Changing the second assignment to an
|= means rejectY is true if either is true.

Secondly maxY became positive when height was greater than contentHeight
instead of having a maximum of 0, which ensured rejectY evaluated to false
in the case newY <= maxY and the mouse was stolen.

Change-Id: I6416d0e23c3ef898887a7b3e3fcdc1dc12853548
Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
9 years agoqt quick particles: Fix const correctness in old style casts
Thiago Macieira [Sat, 7 Mar 2015 22:42:59 +0000 (14:42 -0800)]
qt quick particles: Fix const correctness in old style casts

Found with GCC's -Wcast-qual.

Change-Id: Ia0aac2f09e9245339951ffff13c958e1d7c929c0
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
9 years agoFix clang warning
Andrew Knight [Mon, 9 Mar 2015 20:55:23 +0000 (22:55 +0200)]
Fix clang warning

Removes "warning: first declaration of static data member specialization
of 'static_vtbl' outside namespace 'QV4' is a C++11 extension" by
placing the declarations inside the QV4 namespace.

Change-Id: I9a31874430900a200e83c42ff6c1afc36f0431e1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoQML Engine: ArrayBuffer XHR response type support
Valery Kotov [Wed, 4 Mar 2015 19:57:14 +0000 (21:57 +0200)]
QML Engine: ArrayBuffer XHR response type support

Support for "arraybuffer" response type for QQmlXMLHttpRequest was
added.

[ChangeLog][QtQml][QQmlXMLHttpRequest] QQmlXMLHttpRequest now
supports "arraybuffer" binary response type.

Change-Id: I866e543cc7bc6ab037ffff1ef6628057b73daf90
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agotestlib: Fix qml objects not deleted between data tests
Caroline Chao [Wed, 4 Mar 2015 09:51:28 +0000 (10:51 +0100)]
testlib: Fix qml objects not deleted between data tests

Call wait(0) after the cleanup() function and not only at
the end of the test run (wait(0) is used to call processEvents()).
Otherwise, eventual destroy() calls in test function are not executed
between data tests.

Task-number: QTBUG-30523
Task-number: QTBUG-42185
Change-Id: I1d588ee28c61cda835e25307bc1c565d68b741fe
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
9 years agoDoc: Removed the release notes for Qt Quick and Qt Qml
Venugopal Shivashankar [Fri, 6 Mar 2015 13:18:03 +0000 (14:18 +0100)]
Doc: Removed the release notes for Qt Quick and Qt Qml

These pages were not maintained and were duplicating
info. provided in the what's new page provided for
each release.

Change-Id: I2ee4010de22ef3fb394e3bcdb6adb15db59a2cc9
Task-number: QTBUG-43235
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoRe-enable readback test in tst_qquickwidget
Laszlo Agocs [Mon, 9 Mar 2015 10:46:25 +0000 (11:46 +0100)]
Re-enable readback test in tst_qquickwidget

This seems to work now.

Task-number: QTBUG-39917
Change-Id: I01bbc9b7ddfbb003265479eaa2282e39eebf35c5
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
9 years agoAdd missing flush for multisampled QQuickWidget
Laszlo Agocs [Mon, 9 Mar 2015 10:51:31 +0000 (11:51 +0100)]
Add missing flush for multisampled QQuickWidget

Otherwise we might be using a half-ready texture when performing compositing.
The issue was very visible on OS X at least.

Task-number: QTBUG-39917
Change-Id: I71326cb99567f458a6ca7a2cad322a315ee6674f
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
9 years agoReduce number of allocations when constructing text nodes
Eskil Abrahamsen Blomfeldt [Mon, 2 Mar 2015 08:51:44 +0000 (09:51 +0100)]
Reduce number of allocations when constructing text nodes

In cases where you have a huge number of text elements that
can be merged, we would do a lot of reallocations (one per
node that would be merged into another). As the number of
merges grew, this seemed to converge at about 50% of the time
spent in updatePaintNode() in the text classes.

We can almost eliminate this cost by only doing one realloc
per node that will actually end up in the scene graph.

This patch does a first pass where it simply bundles together
nodes that can be merged. Then it does a second pass where it
actually merges the nodes. In this second pass it can easily
precount the required size of the arrays and we can limit
it to a single realloc.

Task-number: QTBUG-37365
Change-Id: I4e44c01cd83df39304cbbce34f3b8f773763e091
Reviewed-by: Michael Brasser <michael.brasser@live.com>
9 years agoImplement cache property for QQuickAnimatedImage
Daiwei Li [Sat, 28 Feb 2015 07:56:12 +0000 (23:56 -0800)]
Implement cache property for QQuickAnimatedImage

Some longer and larger .gifs can consume a lot of memory
if every decoded frame is cached. Just as the backing QMovie
provides the ability to not cache frame, so should AnimatedImage.

This also allows a workaround for some animated image types
that can contain loops that aren't handled correctly (QTBUG-24869)
to not leak memory.

Change-Id: I0639461d75bb2c758917893e7a6ae5c215fffa9d
Task-number: QTBUG-44447
Task-number: QTBUG-24869
Task-number: QTBUG-28844
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoMerge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5
Frederik Gladhorn [Fri, 6 Mar 2015 12:54:39 +0000 (12:54 +0000)]
Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5

9 years agoQV4::Primitive: Help clang disambiguate symbols
Gabriel de Dietrich [Fri, 6 Mar 2015 12:48:10 +0000 (13:48 +0100)]
QV4::Primitive: Help clang disambiguate symbols

Change-Id: Ie20e6081b80e8f177991ac8aafda054c11b1620c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix build: QString needs to be fully-defined for QString()
Thiago Macieira [Mon, 16 Feb 2015 19:37:55 +0000 (11:37 -0800)]
Fix build: QString needs to be fully-defined for QString()

qqmldebug.h:46:71: error: invalid use of incomplete type ‘class QString’
qglobal.h:651:7: error: forward declaration of ‘class QString’

Change-Id: I1a800c709d3543699131ffff13c3797acbc19956
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
9 years agotst_qqmlitemmodels: Remove pointless QVariant::type() checks
Gabriel de Dietrich [Thu, 5 Mar 2015 20:32:43 +0000 (21:32 +0100)]
tst_qqmlitemmodels: Remove pointless QVariant::type() checks

Change-Id: If817b30aad08fa32697feab7ba4035d66309ed10
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
9 years agoTextEdit: Block's update should update paint node
Ruslan Nigmatullin [Thu, 26 Feb 2015 22:52:11 +0000 (14:52 -0800)]
TextEdit: Block's update should update paint node

QQuickTextEdit::invalidateBlock method marks nodes as dirty but doesn't
call QQuickItem::update(). Because of that it's impossible to
rehighlight text by QSyntaxHighlighter.

Task-number: QTBUG-44765
Change-Id: Ibfd973430cf00927dbec027d129c6d722634575e
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
9 years agoWinRT: Set alignment boundary to page size
Maurice Kalinowski [Thu, 5 Mar 2015 07:31:50 +0000 (08:31 +0100)]
WinRT: Set alignment boundary to page size

This is a hard requirement from the QQmlEngine internals since 5.5 and
otherwise causes crashes inside the engine.

Change-Id: Id25f465576a0095f5b34da469abe761d3f3bd866
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
9 years agoDoc: Changed title GridView example
Nico Vertriest [Fri, 27 Feb 2015 14:26:49 +0000 (15:26 +0100)]
Doc: Changed title GridView example

Changed title to avoid conflict
between GridView QML type and example

Task-number: QTBUG-44640
Change-Id: I59c83489e4029c1586ec462f6643fff0ef80155d
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoWork around QPersistentModelIndex being a built-in meta-type
Gabriel de Dietrich [Thu, 5 Mar 2015 11:30:58 +0000 (12:30 +0100)]
Work around QPersistentModelIndex being a built-in meta-type

This is a temporary work-around and will be removed once
I63d733d1eb66aa61691e7afce27fe7372a83ac00 is merged in qtbase.

Change-Id: I6cfcf1ddc2c9d408c26c171be865d40141de7fa0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
9 years agoFix invocations of static methods of QGuiApplication/QCoreApplication.
Friedemann Kleint [Wed, 4 Mar 2015 10:27:27 +0000 (11:27 +0100)]
Fix invocations of static methods of QGuiApplication/QCoreApplication.

Change-Id: I7bcc209b0c6e77cf6d974af85a19487345a48975
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoMerge remote-tracking branch 'origin/5.4' into 5.5
Frederik Gladhorn [Tue, 3 Mar 2015 17:21:56 +0000 (18:21 +0100)]
Merge remote-tracking branch 'origin/5.4' into 5.5

Conflicts:
src/qml/jsruntime/qv4numberobject.cpp

Change-Id: I4e66a03ef4d99cec192c9da30c028fd8c1f4ac0d

9 years agoUse of fullsize distance field textures should be font-dependent.
Michael Brasser [Mon, 2 Mar 2015 22:32:50 +0000 (16:32 -0600)]
Use of fullsize distance field textures should be font-dependent.

This shouldn't be a static decision as the glyph count depends on the
font.

Change-Id: I67ea98595505df4a3a30b16e867e76f89b28c1ef
Task-number: QTBUG-29264
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
9 years agoV4: fix ToFixed rounding for 0 fraction digits.
Erik Verbruggen [Wed, 28 Jan 2015 08:34:10 +0000 (09:34 +0100)]
V4: fix ToFixed rounding for 0 fraction digits.

(12.5).toFixed() should return 13, not 12.

Task-number: QTBUG-43885
Task-number: QTBUG-44039
Change-Id: Id2b19641e8c12dd5755d8447508b74567e4a2b9b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoV4: fix regalloc for loops with many life&changing vars.
Erik Verbruggen [Mon, 2 Mar 2015 13:35:28 +0000 (14:35 +0100)]
V4: fix regalloc for loops with many life&changing vars.

When all registers are in use, and one needs to be spilled, the register
whose use is the furthest in the future will be chosen. What needs to be
taken into account is that any use that can also work from the stack can
be skipped, because it does not require the value to be in a register.

Task-number: QTBUG-44687
Change-Id: Ide624b190603d9a22f992d4ae5daa3ce8d94472c
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
9 years agoV4: fix phi node use position calculation.
Erik Verbruggen [Mon, 2 Mar 2015 13:22:24 +0000 (14:22 +0100)]
V4: fix phi node use position calculation.

As phi-nodes get transformed into moves, and the moves end up right
before the terminator of the basic block of the incoming edge, the
use by that phi-node is the position of that terminator minus one.

However, when checking if uses need a register, this was not taken into
account, resulting in an invalid life-time interval split position
calculation.

Task-number: QTBUG-44687
Change-Id: I0edd416f7ee5c8ea16bf7133870be45d0e6efea9
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
9 years agobic: Add 5.{3,4}.0 bic data for QtQuickWidgets
Sergio Ahumada [Wed, 11 Feb 2015 18:44:35 +0000 (19:44 +0100)]
bic: Add 5.{3,4}.0 bic data for QtQuickWidgets

this is a new module since Qt 5.3

Change-Id: I9d33ba8f046190f649643302ddc343cbe6e649ed
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
9 years agoAvoid assert in rich text when img width is invalid
Eskil Abrahamsen Blomfeldt [Mon, 2 Mar 2015 12:17:04 +0000 (13:17 +0100)]
Avoid assert in rich text when img width is invalid

If you set the width or height of an <img> tag to something
invalid, this will be registered as -2 by the HTML parser.
We should treat this case the same as if there is no width/height
specified and use the implicit size instead.

[ChangeLog][Text] Fixed assert when setting an invalid width or
height on an <img> tag in a text element.

Change-Id: Iae8c33fa184316632f72318e71f26ab005645a21
Task-number: QTBUG-44743
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agotestlib: Introduce MouseDoubleClickSequence() method
Caroline Chao [Fri, 27 Feb 2015 11:11:58 +0000 (12:11 +0100)]
testlib: Introduce MouseDoubleClickSequence() method

The existing method MouseDoubleClick() emulates the mouse
double click event only.

The added method MouseDoubleClickSequence() emulates the full
sequence of mouse events a physical double-click would generate:
Press-Release-Press-DoubleClick-Release

Introducing a new method in order to provide convenience when a
test requires to simulate a complete double-click action without
changing the behavior of MouseDoubleClick() and risking to break
existing tests.

Add autotest.

Task-number: QTBUG-42185
Change-Id: I1cdddd9e21d3b1d8a818f6d4e3717b06b7d70e08
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoQQuickWindow: rename deliverGestureEvent to deliverNativeGestureEvent
Shawn Rutledge [Fri, 27 Feb 2015 07:14:49 +0000 (08:14 +0100)]
QQuickWindow: rename deliverGestureEvent to deliverNativeGestureEvent

Native gestures are distinct from QGestureEvent, and we might need
another deliver method for those eventually.

Change-Id: I969c9b830d1dc7a91ffbc6cae2bdb68552a58344
Reviewed-by: Andrew Knight <qt@panimo.net>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
9 years agoQQuickWindow: move deliverGestureEvent outside QT_NO_WHEELEVENT section
Shawn Rutledge [Fri, 27 Feb 2015 07:11:20 +0000 (08:11 +0100)]
QQuickWindow: move deliverGestureEvent outside QT_NO_WHEELEVENT section

Turning off support for wheel events does not affect gesture support.

Change-Id: I64a110327179d62a69864979396b92472c53285e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Andrew Knight <qt@panimo.net>
9 years agoQtQuick: Micro-optimize iterator loops.
Friedemann Kleint [Mon, 23 Feb 2015 12:45:44 +0000 (13:45 +0100)]
QtQuick: Micro-optimize iterator loops.

Avoid repeated instantiation of end() in loops, use variable instead.

Change-Id: I6ab1fe2b82406d5ee91710a0333587ffb82c04d4
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoQtQml: Micro-optimize iterator loops.
Friedemann Kleint [Mon, 23 Feb 2015 12:44:12 +0000 (13:44 +0100)]
QtQml: Micro-optimize iterator loops.

Avoid repeated instantiation of end() in loops, use variable instead.

Change-Id: I3bb1c6918cfd16a5dcefbcc03c442e99fe9bf76b
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
9 years agoOptimize distance field construction.
Michael Brasser [Fri, 20 Feb 2015 13:50:45 +0000 (07:50 -0600)]
Optimize distance field construction.

Reduce the number of times we construct a painter path from a glyph.

Change-Id: Ic1f32c78ab5dfd3b75d5442da163cda1dedab3ee
Task-number: QTBUG-42853
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoInclude <limits> in qqmlprofilerservice_p.h
Ulf Hermann [Fri, 20 Feb 2015 12:37:09 +0000 (13:37 +0100)]
Include <limits> in qqmlprofilerservice_p.h

As we use std::numeric_limits in that file we should do this.

Change-Id: Idd8da16ce062b2ef24f926bcf33de95559464bb9
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAllow glyph cache textures to be created at full size.
Michael Brasser [Tue, 24 Feb 2015 15:29:15 +0000 (09:29 -0600)]
Allow glyph cache textures to be created at full size.

On embedded hardware, texture resizes can be quite slow. The glyph
cache currently often needs to resize when new glyphs are added, and
glyph additions are very frequent when using a language with a large
set of glyphs (such as Chinese).

The current glyph cache design minimizes the amount of memory used.
When QSG_PREFER_FULLSIZE_GLYPHCACHE_TEXTURES is set, and we are using
a font with a large number of glyphs, we can instead allocate max-sized
textures. This leads to significantly less time when inserting glyphs
into the cache (often incurred over a span of time), at the cost of
higher initial memory and creation times (often incurred at
application startup).

Change-Id: Id1021b9d213e5f8635c4197b624474f28c6f44ff
Task-number: QTBUG-29264
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
9 years agoFix crash in overdraw and change visualizers
Daiwei Li [Tue, 3 Feb 2015 00:34:27 +0000 (16:34 -0800)]
Fix crash in overdraw and change visualizers

It appears to be possible for node->element()->batch to be NULL

Task-number: QTBUG-43129
Change-Id: If6e4e265a02ee305bf3aa9cad387b7a73648367a
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix memory leak of QSGContext object in QSGThreadedRenderLoop
jian liang [Sun, 22 Feb 2015 04:27:05 +0000 (12:27 +0800)]
Fix memory leak of QSGContext object in QSGThreadedRenderLoop

Add destructor for QSGThreadedRenderLoop to destory QSGContext object.

Change-Id: I479947eb35a5d7888d45655a9b8e2ece5e30bc33
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoMerge remote-tracking branch 'origin/5.4' into 5.5
Frederik Gladhorn [Tue, 24 Feb 2015 16:36:04 +0000 (17:36 +0100)]
Merge remote-tracking branch 'origin/5.4' into 5.5

Conflicts:
.qmake.conf
LICENSE.GPLv2
examples/qml/networkaccessmanagerfactory/view.qml
src/qml/jsruntime/qv4runtime.cpp
src/qml/jsruntime/qv4stringobject.cpp

Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32

9 years agoHandle TouchCancel events in QQuickPinchArea
Aaron McCarthy [Wed, 18 Feb 2015 05:53:09 +0000 (15:53 +1000)]
Handle TouchCancel events in QQuickPinchArea

QQuickPinchArea did not handle TouchCancel events and would recursively
call QQuickItem::event(). Cancel the pinch gesture by restoring the
pinch state to the start state. Don't recursively call
QQuickItem::event(), instead call QQuickItem::touchEvent() for
unhandled touch events.

[ChangeLog][QtQuick][PinchArea] Fix infinite recursion when TouchCancel
events are received.

Change-Id: Ifce4af91aec4285873cb701069e007bcee180851
Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
9 years agoFix deprecation warnings about constructing QString from const char*.
Friedemann Kleint [Mon, 16 Feb 2015 12:08:40 +0000 (13:08 +0100)]
Fix deprecation warnings about constructing QString from const char*.

types/qqmlmodelindexvaluetype.cpp: In static member function 'static QString QQmlModelIndexValueType::propertiesString(const QModelIndex&)':
types/qqmlmodelindexvaluetype.cpp:47:56: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations]
items/qquickimagebase.cpp: In member function 'virtual void QQuickImageBase::load()':
items/qquickimagebase.cpp:213:49: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations]
items/qquickimagebase.cpp:213:88: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations]

Change-Id: I03266aba589ade8228bc286cd3f3f237cd06a780
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
9 years agoFix MSVC 64 bit warnings about loss of data when converting from 'size_t' to 'int'.
Friedemann Kleint [Wed, 18 Feb 2015 09:08:24 +0000 (10:08 +0100)]
Fix MSVC 64 bit warnings about loss of data when converting from 'size_t' to 'int'.

jsruntime\qv4arraybuffer.cpp(94) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
jsruntime\qv4persistent.cpp(53) : warning C4267: 'initializing' : conversion from 'size_t' to 'const int', possible loss of data

Change-Id: I6ccef9a64ecfb53b18204b35e17421c0a5ac955b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix some qdoc-warnings.
Friedemann Kleint [Fri, 20 Feb 2015 13:48:46 +0000 (14:48 +0100)]
Fix some qdoc-warnings.

qtdeclarative/src/quick/scenegraph/coreapi/qsgmaterial.cpp:384: warning: Class RenderState has no \inmodule command; using project name by default: QtQuick
qtdeclarative/src/quick/scenegraph/util/qsgsimplerectnode.cpp:39: warning: Class QSGSimpleRectNode has no \inmodule command; using project name by default: QtQuick
qtdeclarative/src/quick/scenegraph/util/qsgtextureprovider.cpp:38: warning: Class QSGTextureProvider has no \inmodule command; using project name by default: QtQuick
qtdeclarative/src/quick/items/qquickwindow.cpp:3156: warning: Cannot find 'closing(...)' in '\fn' void QQuickWindow::closing()
qtdeclarative/src/quick/items/qquickwindow.h:160: warning: No documentation for 'QQuickWindow::closing()'
qtdeclarative/src/quick/items/qquickwindow.cpp:3134: warning: Can't link to 'Window.closing()'
qtdeclarative/src/qml/qml/qqmlfileselector.cpp:90: warning: Undocumented parameter 'parent' in QQmlFileSelector::QQmlFileSelector()

Change-Id: I42cf1e06c9e7a63327acc470bd33a726acc69bfc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
9 years agoAccount for leading when drawing text decoration
Eskil Abrahamsen Blomfeldt [Wed, 18 Feb 2015 09:35:00 +0000 (10:35 +0100)]
Account for leading when drawing text decoration

When the text line is offset by the leading distance, the
text decoration needs to be offset by the same value, otherwise
it will be drawn in the wrong location.

[ChangeLog][TextEdit] Fixed positioning of text decoration with some
fonts.

Change-Id: Ic15134326b878255a9b424c14762c3817dfd3123
Task-number: QTBUG-44492
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Andrew Knight <qt@panimo.net>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoremove unnecessary LICENSE.GPLv2
Jani Heikkinen [Tue, 7 Oct 2014 07:50:57 +0000 (10:50 +0300)]
remove unnecessary LICENSE.GPLv2

Change-Id: Iea5465791b2ac3b0303ffbae5378c43d8ae2f130
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
9 years agoCleanup math function includes and usage
Allan Sandfeld Jensen [Fri, 13 Feb 2015 11:02:19 +0000 (12:02 +0100)]
Cleanup math function includes and usage

Use std::math on floats and doubles, and qMath on qreals, and only
include the math headers actually needed.

Change-Id: I1d511d7b1bac0050eaa947c7baee760b736858bf
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
9 years agoAdd Qt.hsva() function
Sean Harmer [Sun, 15 Feb 2015 10:51:51 +0000 (10:51 +0000)]
Add Qt.hsva() function

This is more convenient than the alternative hsla() function in many
cases as color pickers in other applications default to the HSV color
space e.g. GIMP, kcolorchooser.

[ChangeLog][QtQml] Added Qt.hsva() function

Change-Id: Id5c1a78173757bf9842b164d90b31682e9a41749
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
9 years agoNamedNodeMap: Remove logically dead code
Holger Hans Peter Freyther [Sun, 8 Feb 2015 08:03:08 +0000 (09:03 +0100)]
NamedNodeMap: Remove logically dead code

The code has been changed by Lars in the git commit
47fbcb47771a36ab9fd0a4d5ede7b7504ab1410d. Now "r->engine()"
is called before the "if (!r)" check is being executed.

We can assume that "m->as<NamedNodeMap>()" will always
return a non nullptr and this allows us to remove the
extra null check.

Fixes CID: 86703

Change-Id: Ib4f1103e38c7e1e8e5175d91e795d2621e3a79c4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agodocs: Add a link to Drag and DropArea in MouseArea's drag section
Sérgio Martins [Sun, 15 Feb 2015 12:13:03 +0000 (12:13 +0000)]
docs: Add a link to Drag and DropArea in MouseArea's drag section

They are related subjects so deserve a mention.

Change-Id: I52f338402c8568f54dfd4b91845f9fafa762ca4d
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoFixed license headers
Jani Heikkinen [Fri, 13 Feb 2015 11:35:35 +0000 (13:35 +0200)]
Fixed license headers

Change-Id: I4d5640ff95e1361ec7e65fb3e87d7726d8185ff5
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
9 years agoUpdate url location for missing Qt logo
Sergio Ahumada [Thu, 12 Feb 2015 13:17:03 +0000 (14:17 +0100)]
Update url location for missing Qt logo

Change-Id: I21084651044f1db0c7863f2121431dffec8526e3
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoFlickable: use wheel event pixel deltas when available
Shawn Rutledge [Tue, 27 Jan 2015 11:58:42 +0000 (12:58 +0100)]
Flickable: use wheel event pixel deltas when available

Flickable can now handle wheel events which come from touchpads,
providing pixel deltas instead of angle deltas.  It will interpret
them as distance to flick, rather than using an average-velocity
physics model as it does when handling events from a physical mouse
wheel. This enables much finer control and limits the tendency
to "zing" way out of bounds accidentally.  It is achieved by
refactoring the direct-drag code which is needed for mouse dragging
and for touchpad gesture dragging (and eventually touchscreen dragging)
into a new internal drag() method.

[ChangeLog][QtQuick][Flickable] Flickable handles pixel deltas from
trackpad gestures as drags, for a more native feel

Task-number: QTBUG-22407
Change-Id: Ia613ddb25f46d452603f7cb567b74e80c95a346c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
9 years agoDoc: fix example
Joerg Bornemann [Thu, 12 Feb 2015 16:39:34 +0000 (17:39 +0100)]
Doc: fix example

Change-Id: I818e0a3235060fa48c61d4f21f1202d976b15d5e
Task-number: QTBUG-38456
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoHigh-dpi SVG and QQuickImageProvider Images
Morten Johan Sørvig [Thu, 15 Jan 2015 12:38:40 +0000 (13:38 +0100)]
High-dpi SVG and QQuickImageProvider Images

Scale sourceSize by the target devicePixelRatio before
passing it to the providers.

Task-number: QTBUG-38127
Task-number: QTBUG-38991
Change-Id: I1746e0859b4e63eb0d28d1a1c8aac610b68a9eb9
Reviewed-by: Jocelyn Turcotte <jturcotte@woboq.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
9 years agoPinchArea: handle smart zoom gesture
Shawn Rutledge [Tue, 9 Dec 2014 09:28:25 +0000 (10:28 +0100)]
PinchArea: handle smart zoom gesture

This is the double-finger double-tap trackpad gesture on OS X.

Change-Id: Ie79dc533adf382170867318bc9b61b367f819e9b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
9 years agoFix 590 inconsistent override warnings [-Winconsistent-missing-override]
Sérgio Martins [Wed, 4 Feb 2015 23:10:21 +0000 (23:10 +0000)]
Fix 590 inconsistent override warnings [-Winconsistent-missing-override]

Classes should either use or not use override, otherwise it hurts
code readability.

Change-Id: Ieb899a3475b0c36ab20285740b2cec2cd1677a54
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix width/height property assignment during animations.
Aaron McCarthy [Thu, 12 Feb 2015 05:36:44 +0000 (15:36 +1000)]
Fix width/height property assignment during animations.

During animations the behavior of

anchors.fill: parent

and

width: parent.width
height: parent.height

can be different resulting in subtle UI bugs where the final value of a
property is not applied because it is within epsilon of the previous
value. Fixed by directly comparing the width and height instead of
using operator==(QSize, QSize) which does a fuzzy comparison.

Change-Id: I4288b93db2b7baacd9f71ae1932ae743a428313a
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoDoc: Bump QtQuick import version to 2.5
Shawn Rutledge [Thu, 12 Feb 2015 13:18:59 +0000 (14:18 +0100)]
Doc: Bump QtQuick import version to 2.5

Change-Id: I9b41d6c755f804aeb47564f10d7131df528ba61d
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
9 years agoUse TabFocusBehavior in QStyleHints in QtQuick
Liang Qi [Wed, 4 Feb 2015 09:10:12 +0000 (10:10 +0100)]
Use TabFocusBehavior in QStyleHints in QtQuick

* QQuickItemPrivate::qt_tab_all_widgets was removed.
* qt_tab_all_widgets in test was updated.

Change-Id: I418d7a3edae0a4782a91289f6c0494ff5874d071
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
9 years agoQQuickText: Move baseUrl to ExtraData.
Robin Burchell [Sat, 7 Feb 2015 21:44:19 +0000 (22:44 +0100)]
QQuickText: Move baseUrl to ExtraData.

It's only used for external resource loading, which is not the common case.

Note that the case of an unset baseUrl may become a little more pessimised now,
as it has to be looked up from the context which involves a loop to find the
outermost parent context, but again, this is not a common case, so I'd consider
that acceptable.

QQuickTextPrivate now goes from 496 bytes to 488 bytes. ExtraData increases from
72 bytes to 80 on x86_64.

Change-Id: I7e346eeb3b3cefe81912aac2b115e106ec519d1e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoQQuickText: Decrease the size of QQuickTextPrivate by moving image tags to ExtraData.
Robin Burchell [Sat, 7 Feb 2015 20:19:15 +0000 (21:19 +0100)]
QQuickText: Decrease the size of QQuickTextPrivate by moving image tags to ExtraData.

Given that other data about images is already stored there (e.g.
nbActiveDownloads), it seems curious to not store it all there.

On x86_64, this drops the size of QQuickTextPrivate by 16 bytes (512 -> 496),
and increases the size of ExtraData from 56 bytes to 72 bytes.

Change-Id: Ib0a98199a74f757cf439d4ba276c7704504055b2
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoQQuickParticleData: Reorganise fields to drop size from 208 to 200 bytes on x86_64.
Robin Burchell [Sat, 17 Jan 2015 01:00:26 +0000 (02:00 +0100)]
QQuickParticleData: Reorganise fields to drop size from 208 to 200 bytes on x86_64.

Change-Id: Ide7a70baecf6d1ff3ec8160a2cb47f0bd9955e45
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoQML Models: Register ItemSelectionModel
Gabriel de Dietrich [Fri, 6 Feb 2015 14:58:33 +0000 (15:58 +0100)]
QML Models: Register ItemSelectionModel

Change-Id: I7f5c9e05c2e779d33e1bc92d698c75d97d397339
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
9 years agoQuickTestResult: Try a bit harder when stringifying a value
Gabriel de Dietrich [Thu, 5 Feb 2015 15:10:03 +0000 (16:10 +0100)]
QuickTestResult: Try a bit harder when stringifying a value

Q_GADGETs are not always QVariant::toString()-convertible
but they probably have their own toString() function that
we always try to call. This may still lead to false posi-
tives, but in a much smaller proportion.

Change-Id: I80547a9e773e97410fe5d4723efcac6b010046f9
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
9 years agoAdd Q_GADGET wrappers for QModelIndex & Co.
Gabriel de Dietrich [Thu, 15 Jan 2015 18:46:56 +0000 (19:46 +0100)]
Add Q_GADGET wrappers for QModelIndex & Co.

The complete list of types is,
  * QModelIndex
  * QModelIndexList
  * QPersistentModelIndex
  * QItemSelection
  * QItemSelectionRange

These wrapper types follow the QQmlValueType conventions and
allow us to expose the wrapped types without introducing
meta-type changes. They also allow to customize the string
type representation.

We also extend QQmlValueTypeFactory to return the meta-object
for those types.

Finally, we add two-way meta-type conversion between QModelIndex
and QPersistentModelIndex to get the same interoperability as
in C++ when passing an object of one type to a function requir-
ing an object of the other type.

Change-Id: Iaa7089ea576c901f12715ffa21e4d94603d53755
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
9 years agoUpdate copyright headers
Jani Heikkinen [Wed, 28 Jan 2015 11:55:39 +0000 (13:55 +0200)]
Update copyright headers

Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
9 years agoAdd offset test for QV4::Heap::String::text
hjk [Thu, 5 Feb 2015 09:45:42 +0000 (10:45 +0100)]
Add offset test for QV4::Heap::String::text

This is used in Qt Creator's "native mixed" access to runtimeStrings.

Change-Id: I5c94ec8bff0734e5dc032aa739bfbb51af9b9820
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
9 years agoPhotosurface example: flickable surface
Shawn Rutledge [Thu, 4 Dec 2014 14:35:40 +0000 (15:35 +0100)]
Photosurface example: flickable surface

The Flickable provides a way of testing interaction with 2-finger
trackpad gestures: if the cursor is over the background, you can flick
the surface via wheel events (which come from native flick gestures
if you are using a trackpad on OS X); inside the bounds of a photo,
the same 2-finger gesture is for zooming and rotating.

Also, random position and rotation are applied more correctly,
and only at startup.  Position and rotation changes are animated.

Change-Id: Iab49b7f2e99a9686424368fd94f0b7f89807da22
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
9 years agoFix QML Timer running not being updated together with triggered signal
Troels Nilsson [Wed, 21 Jan 2015 13:18:35 +0000 (14:18 +0100)]
Fix QML Timer running not being updated together with triggered signal

The running property of the QML Timer should be updated at the same
time as the triggered signal is emitted, otherwise code like e.g. the following:
    if (qmlTimer.running)
    {
        qmlTimer.stop()
    }
doesn't work as expected. In addition if the timer is stopped or restarted
between posting the QEvent_Triggered event and receiving it, the triggered
event should not be emitted. This avoids the issue of stopped timers still
emitting the triggered signal which can potentially cause problems in
existing code.

Task-number: QTBUG-44026
Change-Id: Ia14d80d152967d09adc1586467715b2e1c6662cc
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoRemove unnecessary calls to initializeOpenGLFunctions
Laszlo Agocs [Mon, 9 Feb 2015 07:33:28 +0000 (08:33 +0100)]
Remove unnecessary calls to initializeOpenGLFunctions

We now have a change in QtGui that guarantees that the returned versionfunctions
object is initialized as long as the context is current.

Change-Id: I2e76e91bb4265a95fae657f6cacd92a789d56782
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
9 years agoImplement dnd support in QQuickWidget differently
Laszlo Agocs [Fri, 16 Jan 2015 14:05:19 +0000 (15:05 +0100)]
Implement dnd support in QQuickWidget differently

This way subclasses can reimplement functions like dragEnterEvent().

Task-number: QTBUG-43821
Change-Id: I24bd14de8aab5ab741bc36330b4dcf7c83dedbf6
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agobic: Add/Replace 5.{0,1,2,3,4}.0 bic data for linux-gcc-amd64
Sergio Ahumada [Tue, 3 Feb 2015 17:14:41 +0000 (18:14 +0100)]
bic: Add/Replace 5.{0,1,2,3,4}.0 bic data for linux-gcc-amd64

Remove the ia32 data since there are no linux x86 machines in
the CI system (which makes the data useless from an automated
testing point of view) and most people use x64 these days anyway.

Change-Id: I6aa1106bf6406c8338e2ffcf89436338c19b1ee5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoExposed TypedArray private APIs for Canvas3D use.
Pasi Keranen [Tue, 10 Feb 2015 11:52:04 +0000 (13:52 +0200)]
Exposed TypedArray private APIs for Canvas3D use.

Exported QV4::TypedArray, QV4::ArrayBuffer and QV4::Heap::ArrayBuffer
in to the private API set.
Changed ArrayBuffer length in the constructor to size_t instead of int.
Added accessor methods to TypedArray array type and byte length.

Change-Id: I3f89b8e263012bc90cc665aed5744cbc66379204
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMerge "Merge remote-tracking branch 'origin/5.4.1' into 5.4" into refs/staging/5.4
Frederik Gladhorn [Tue, 10 Feb 2015 21:27:43 +0000 (21:27 +0000)]
Merge "Merge remote-tracking branch 'origin/5.4.1' into 5.4" into refs/staging/5.4

9 years agoUpdate C++11 warning logic from QtWebKit
Allan Sandfeld Jensen [Fri, 30 Jan 2015 10:54:44 +0000 (11:54 +0100)]
Update C++11 warning logic from QtWebKit

Fixes compatibility with gcc 5.0.

Change-Id: I017c6d690c1f64359c3bac6c8b6b0f5e089861eb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9 years agoMerge remote-tracking branch 'origin/5.4.1' into 5.4
Frederik Gladhorn [Tue, 10 Feb 2015 09:34:35 +0000 (10:34 +0100)]
Merge remote-tracking branch 'origin/5.4.1' into 5.4

Change-Id: I127c746c4131fc907ea4b6713d307f12a4760666

9 years agoFix crash when invalidating qqmltypeloader
Daiwei Li [Fri, 23 Jan 2015 22:33:35 +0000 (14:33 -0800)]
Fix crash when invalidating qqmltypeloader

Change-Id: I16db2ea9a6c25d26e2b803b9bb8d9ef7156e254d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoReplace blog.qt.digia.com with blog.qt.io
Sergio Ahumada [Fri, 6 Feb 2015 12:58:48 +0000 (13:58 +0100)]
Replace blog.qt.digia.com with blog.qt.io

Change-Id: I2518576bbe2ca9f68928973ea83b9e58084b91e3
Reviewed-by: Tero Kojo <tero.kojo@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoDoc: fix a file name of an image
Liang Qi [Fri, 6 Feb 2015 10:09:40 +0000 (11:09 +0100)]
Doc: fix a file name of an image

Change-Id: I6c93fd9d97649eee819a48863b92bde533dabe63
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
9 years agoFix regression where QQuickScreenAttached overwrites QScreen values
Albert Astals Cid [Fri, 6 Feb 2015 09:40:03 +0000 (10:40 +0100)]
Fix regression where QQuickScreenAttached overwrites QScreen values

Up to Qt 5.3 it was fine setting the orientationUpdateMask in
QScreen in C++, with 5.4 that value is always discarded and overwrote
with 0, this change makes it possible to still set the orientationUpdateMask
value in C++ and not have it overwritten unless specifically changed from QML

Change-Id: I134290ce91be8b91df4e9e8e71120753813f48d7
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
9 years agoFix crash when QQuickWindow::updatePolish() deletes QQuickItems.
Gunnar Sletta [Thu, 5 Feb 2015 11:00:00 +0000 (12:00 +0100)]
Fix crash when QQuickWindow::updatePolish() deletes QQuickItems.

When an item is deleted as a result of an updatePolish() call, it will
be removed from the itemsToPolish set. However, updatePolish()
internally works on a copy of the itemsToPolish set because changes to
the set would invalidate its iterator. Because it is a copy will still
contain the deleted item.

Fix this by simplifying the algorithm to instead pick items one by
one from the itemsToPolish set until it is empty. The recursion guard
has been increased because we're not decrementing it for every single
QQuickItem::updatePolish() call.

Task-number: QTBUG-42913
Change-Id: If7ab7f7616b01daf4d3ed843f927c163dfb03843
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
9 years agoRespect the text's background-color when it is set in the style in HTML
Andy Shaw [Mon, 2 Feb 2015 12:11:09 +0000 (13:11 +0100)]
Respect the text's background-color when it is set in the style in HTML

Task-number: QTBUG-36837
Change-Id: Iea85f4bc7c66124178a318f0ebd776726cf72c96
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
9 years agotst_qquickview: Prepare test to handle multiple pieces of data.
Robin Burchell [Mon, 2 Feb 2015 20:41:19 +0000 (21:41 +0100)]
tst_qquickview: Prepare test to handle multiple pieces of data.

Additionally, stack allocate the view. It's shorter, and saves an almost totally
pointless QVERIFY.

Change-Id: Ic90602d24659e1455dd50b706f96ef5ccac14f3a
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoQQuickItemParticle: Only delete owned particles
Alan Alpert [Mon, 26 Jan 2015 19:50:11 +0000 (11:50 -0800)]
QQuickItemParticle: Only delete owned particles

A common pattern for ItemParticle (as shown in the particleview.qml
example) is to use it to manage movement of a model's delegates. In such
a case item management is handled by the user code (which bridges the
needs of the Model and the View) and deleting the items in ItemParticle
quickly leads to crashes.

This change maintains (and improves, due to handling resets) the
deletion of delegates created by the ItemParticles, as shown in
delegates.qml. This example was expanded with a click to reset feature
so as to more clearly see the impact of resets.

Task-number: QTBUG-37486
Change-Id: I9de935034c11a7dd2abdd60e7b3bd42867dede9c
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
9 years agoInitial shot at native Qml-and-C++ debugging
hjk [Thu, 11 Dec 2014 18:14:30 +0000 (19:14 +0100)]
Initial shot at native Qml-and-C++ debugging

This supports a Qt Creator debugging mode that allows to
extract combined C++/JS stacktraces and JS variable values
by examinining only the stack of the "native" debugger
backend.

Currently, only simple breakpoints and stepping with GDB
is supported, and the setup requires a debug build of
Qt(Declarative).

Change-Id: I9d73041ee541fa45ed4a977f4deef8ebb0493ff9
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoUse correct QOpenGLFunctions object
Berthold Krevert [Wed, 4 Feb 2015 09:18:36 +0000 (10:18 +0100)]
Use correct QOpenGLFunctions object

If core profile is used, QOpenGLContext::versionFunctions returns 0
if a legacy or a non-core profile version is requested.

That means, when using core profile we have to request a
QOpenGLFunctions_3_2_Core object (which is the lowest OpenGL
version that comes with profiles). Otherwise the application would
run into a segfault.

Change-Id: I8119e5fbeafccf14d59680617172c71e60e188ce
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoMove VAO binding to Renderer::render()
Berthold Krevert [Thu, 29 Jan 2015 16:18:49 +0000 (17:18 +0100)]
Move VAO binding to Renderer::render()

Amongst other things, QSGRenderer::preprocess() triggers the rendering of
QQuickShaderEffectSource items into framebuffer objects. The renderers
responsible for these QQuickShaderEffectSource items bind and unbind
their own VAOs, which messes up the VAO state set in QSGRenderer::preprocess().

Scenegraph nodes must not depend on the vao state set by the renderer anyway as
the binding has to be considered as an implementation detail.

Change-Id: Idec34c65397394e12e7f8419a1c9633d5f70a22e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoAdd list of changes for 5.4.1 relative to 5.4.0 v5.4.1
Simon Hausmann [Fri, 30 Jan 2015 08:54:53 +0000 (09:54 +0100)]
Add list of changes for 5.4.1 relative to 5.4.0

Change-Id: I2ea7f237ffb4af6445e62178f824421104be1f1d
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
9 years agoQQmlEngineDebugService: Avoid assert when debugging QModelIndex
Gabriel de Dietrich [Mon, 19 Jan 2015 13:14:50 +0000 (14:14 +0100)]
QQmlEngineDebugService: Avoid assert when debugging QModelIndex

QModelIndex is not streamable, so returning the input QVariant in
valueContents() will result in an assert.

We try to detect whether the input QVariant is a know value type
and then call the toString() meta-method on it. Otherwise, we fall
back to thge old behavior. This works since QModelIndex is exposed
to QML wrapped in an internal value type class (at least for the
time being).

Change-Id: I1a4c61b2bd441f823469dd73b31e86a1192f02e6
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
9 years agoDoc: link issues qtdeclarative
Nico Vertriest [Mon, 2 Feb 2015 11:43:49 +0000 (12:43 +0100)]
Doc: link issues qtdeclarative

Task-number: QTBUG-43810
Change-Id: I154ffa83512435c3e455937a3f81931a45d9e368
Reviewed-by: Martin Smith <martin.smith@digia.com>
9 years agoRe-enable ListView auto-test
Gabriel de Dietrich [Mon, 2 Feb 2015 17:27:45 +0000 (18:27 +0100)]
Re-enable ListView auto-test

Change-Id: Ie0117dddc1da95b9463ca67e15fce8b5ac65e1dd
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
9 years agoTextInput: update the baseline offset when vertical alignment changes
J-P Nurmi [Tue, 3 Feb 2015 16:26:08 +0000 (17:26 +0100)]
TextInput: update the baseline offset when vertical alignment changes

Change-Id: I2153e879c7ad8b770d5ca47dac68f994bb171b2d
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoRemove meta-type declaration for QPersistentModelIndex
Gabriel de Dietrich [Mon, 2 Feb 2015 15:10:45 +0000 (16:10 +0100)]
Remove meta-type declaration for QPersistentModelIndex

The auto-test will be re-enabled once
https://codereview.qt-project.org/103726 is merged
in qtbase.

Change-Id: I52ff538c3ca09b3e686483c2d0c3c66089acc13c
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
9 years agoFix Text wrapping when growing from 0 width.
Michael Brasser [Mon, 2 Feb 2015 17:23:31 +0000 (11:23 -0600)]
Fix Text wrapping when growing from 0 width.

The fix for QTBUG-30896 caused a regression in the test case. Now check
both width and implicit width validity before resetting widthExceeded.

Change-Id: I4aba2aad299746906cfe20e288fa60cfe2acc64f
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
9 years agoFix autotest not to rely on broken operator<<(QDebug, QUrl) behavior
Kai Koehne [Thu, 29 Jan 2015 11:05:28 +0000 (12:05 +0100)]
Fix autotest not to rely on broken operator<<(QDebug, QUrl) behavior

QmlInfo does call nospace() in the constructor. However, the current
streaming operator for QDebug permanently resets this to space(),
which the autotest relies on ...

Move QUrl to the end of the chain so that the broken behavior of
QUrl isn't checked anymore. This allows us to fix it in qtbase ...

Change-Id: I365df3479a2724f69e768c23c0844f10c34b71be
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
9 years agoHandle context lost in the Windows render loop
Laszlo Agocs [Mon, 12 Jan 2015 16:34:42 +0000 (17:34 +0100)]
Handle context lost in the Windows render loop

With ANGLE (which always uses this loop) EGL_CONTEXT_LOST
may happen quite often, depending on various factors.

It is therefore good to handle this by tearing down and
reinitializing the scenegraph.

Task-number: QTBUG-43263
Change-Id: I8e985e001f46865ccd814255f39add58fe2a737a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoIntroduce QSG_TRANSIENT_IMAGES.
Gunnar Sletta [Thu, 29 Jan 2015 18:09:39 +0000 (19:09 +0100)]
Introduce QSG_TRANSIENT_IMAGES.

This feature enables the same feature that we already have in the
'nonpreservedtexture' in the scene graph playground.

This change also cleans up some leftover logic from the early Qt 5.2
days when we had to manually extract the image from the default
texture factory rather than going through
QQuickWindow::createTexture(). This cleanup is required for the logic
to work.

Change-Id: I7cdf15d981ba8af94f8d51781fc01e2b834b77c6
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
9 years agoRelease atlas texture's image instance once uploaded
Gunnar Sletta [Thu, 29 Jan 2015 12:26:31 +0000 (12:26 +0000)]
Release atlas texture's image instance once uploaded

Sitting on the instance makes it impossible for custom texture
factories to release images to keep down memory.

Also, ditch the extra QRect used to store the nonpadded atlas rect as
this is easily reachable from the padded one.

Change-Id: I4914753cc43a6f3173cfc9b210e02b2770ef33fd
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoqquicktest: Wait for the view to finish loading
Daiwei Li [Fri, 23 Jan 2015 22:42:33 +0000 (14:42 -0800)]
qquicktest: Wait for the view to finish loading

Tests can be skipped if the view is still loading by the time we get
to the end of the loop. There is a case where the window is active
but the QML hasn't been loaded.

Change-Id: I4e8346ee547653810458d042925d673748c1fec8
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>