platform/upstream/qtdeclarative.git
9 years agoFix conversion between char and string.
Christian Strømme [Thu, 12 Mar 2015 14:33:50 +0000 (15:33 +0100)]
Fix conversion between char and string.

If a QChar (or char) was used to set a QString property, the
intermediate value used by the QML engine (int), would be
converted to a string representation of the integer and not the actual
character. To avoid this behavior, characters are now stored as string
objects and the string is then converted to the target char type if
possible.
A side effect of this solution is that it is makes it possible to
assign a string to a char property as well, but only if the string
contains exactly one character.

[ChangeLog][QtQml][Important Behavior Changes] Assigning a char to a
string will now create a string with the actual character instead of a
string representation of the character's code-point. A side effect of
this change is that a one-character string also can be assigned to a
character type.

Task-number: QTBUG-44934
Change-Id: Ifd15386933ee11354ee1bbb5598a5f0b00a08616
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoQQuickWindow touch event compression: retain previous positions
Shawn Rutledge [Fri, 13 Mar 2015 14:13:22 +0000 (15:13 +0100)]
QQuickWindow touch event compression: retain previous positions

The previous positions in the delayed touch event should be from
the first touchpoint which is being delayed, not updated based on
subsequent updates that are being merged into it.  Clarified
naming and comments in this section.

Task-number: QTBUG-40167
Change-Id: Ie419267e4a33277f9154bd80f5bce104e52d773e
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoDoc: Added info. about the singleton type declaration
Venugopal Shivashankar [Wed, 18 Mar 2015 13:25:11 +0000 (14:25 +0100)]
Doc: Added info. about the singleton type declaration

Task-number:QTBUG-37057
Change-Id: I458bc4fe3920b70c201da0a09b437965b651872e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoAllow Flickable's grab to be stolen if dragging over bounds.
Andrew den Exter [Tue, 10 Mar 2015 01:59:23 +0000 (11:59 +1000)]
Allow Flickable's grab to be stolen if dragging over bounds.

This allows a parent item to intercept a drag gesture in one direction
when the flickable has reached it's limit in that direction without
disabling the drag over bounds for drag gestures in the opposite
direction.

Change-Id: I6ac60113f150dbb8da42d9b5593325b04be166f5
Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
9 years agoRemove forward declaration of QScriptContext
Lars Knoll [Wed, 18 Mar 2015 13:39:20 +0000 (14:39 +0100)]
Remove forward declaration of QScriptContext

Change-Id: I2ab642b73bf7fdd5d82085b0dc0f61d32a5c1fb5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoqmltest: Make sure we inherit all of testlib's MODULE_CONFIG
Tor Arne Vestbø [Wed, 18 Mar 2015 12:18:43 +0000 (13:18 +0100)]
qmltest: Make sure we inherit all of testlib's MODULE_CONFIG

We don't know what's in testlib's MODULE_CONFIG, so we can't hard-code
the value. E.g., with the introduction of XCTest support in testlib [1],
we'll gain an additional member in testlib's module config set for taking
care of the XCTest framework include path, and this value also needs to
be propagated/inherited to the final target.

[1] https://codereview.qt-project.org/#/c/107477/

Change-Id: I28ee44ac41f148a873ab35adcae38e73bef3316f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
10 years agoMerge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5
Frederik Gladhorn [Tue, 17 Mar 2015 12:08:08 +0000 (12:08 +0000)]
Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5

10 years agoRepeater: Don't rely on the createFrom variable
Jørgen Lind [Wed, 11 Mar 2015 13:39:40 +0000 (14:39 +0100)]
Repeater: Don't rely on the createFrom variable

since this breaks for asynchronous models, because item creation order
is not guaranteed. We always have the index
for what item to create, so we do not need it either.

Change-Id: Ib8ce25ac342f5cce4784c56e6a91cf70136566b3
Task-number: QTBUG-38879
Task-number: QTBUG-39001
Task-number: QTBUG-44250
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
10 years agoMerge remote-tracking branch 'origin/5.4' into 5.5
Frederik Gladhorn [Tue, 17 Mar 2015 08:48:35 +0000 (09:48 +0100)]
Merge remote-tracking branch 'origin/5.4' into 5.5

Change-Id: I4c338a44c1d64c2d8e637971ab3ec6982c40a685

10 years agoFix warning
Aleix Pol [Fri, 27 Feb 2015 15:39:21 +0000 (16:39 +0100)]
Fix warning

If the arguments of console.timeEnd are wrong, say it's timeEnd instead of
time.

Change-Id: Ida8a76cd452cf3aecc03e5064bbf213333d93a03
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
10 years agoFix usage of QtQmlDevTools private headers on OSX with framework builds
Simon Hausmann [Mon, 9 Mar 2015 15:39:32 +0000 (16:39 +0100)]
Fix usage of QtQmlDevTools private headers on OSX with framework builds

Previously this module borrowed its private headers from QtQml, so that
when writing QT += qmldevtools-private, you'd get the private headers from
QtQml. This doesn't work when QtQml is built as a framework.

A cleaner solution is to give this module its headers proper by letting
syncqt create the forwarding headers correctly (and consequently also
include them in make install). In order for this to work, the included
headers themselves cannot include any headers from QtQml, which this
patch also takes care of, through a centralized inclusion of qv4global_p.h.

Change-Id: I9bb8337956a2774cfaca6b338369face6c6ee785
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
10 years agoRemove QQmlDirParser from QtQmlDevTools
Simon Hausmann [Fri, 13 Mar 2015 11:47:16 +0000 (12:47 +0100)]
Remove QQmlDirParser from QtQmlDevTools

This class is not needed in the library.

Change-Id: Ie880086a849b62a2856d1f388a64d363b040cb56
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
10 years agoPathView: use qt.quick.itemview.lifecycle logging category
Shawn Rutledge [Wed, 11 Mar 2015 15:02:33 +0000 (16:02 +0100)]
PathView: use qt.quick.itemview.lifecycle logging category

It is the same for debugging delegate cycling in ListView.

Task-number: QTBUG-42716
Change-Id: I54b83a25a5d8473c643cd326fe114317103bb24e
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
10 years agoAcknowledge QPersistentModelIndex is a built-in meta-type
Gabriel de Dietrich [Thu, 12 Mar 2015 17:45:54 +0000 (18:45 +0100)]
Acknowledge QPersistentModelIndex is a built-in meta-type

We remove the now unnecessary meta-type registration and
conversions for QPersistenModelIndex.

This reverts and amends commit 7b29a983fa794291ff8ec.

Change-Id: I4e8346bb7ab03766e1dd5c2c23bb6cf47ab1f455
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
10 years agoRemove bogus autotests for invalid ports
Kai Koehne [Thu, 12 Mar 2015 08:41:08 +0000 (09:41 +0100)]
Remove bogus autotests for invalid ports

Qt itself doesn't prevent opening a socket in the reserved port range.
So what these tests actually check is the system configuration, not Qt.

Task-number: QTBUG-44952
Change-Id: Iee6d6d1a5a7a0f4d2039300ccbbbe8bf55a519b9
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
10 years agoFix qqmldebuggingenabler autotest
Kai Koehne [Thu, 12 Mar 2015 09:45:33 +0000 (10:45 +0100)]
Fix qqmldebuggingenabler autotest

The test calls itself as a qml debug server. This requires
the debugging functionality to be enabled.

Task-number: QTBUG-44952
Change-Id: I462d035ff7ed722008f3710c6db90e5640546be2
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 years agoAdd test data for tst_GuiAppLauncher
Sergio Ahumada [Thu, 12 Feb 2015 10:47:53 +0000 (11:47 +0100)]
Add test data for tst_GuiAppLauncher

Change-Id: I6a93f19850325379598eb57f2a9ea304cebe558f
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
10 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>
10 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

10 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>
10 years agoMake sure we deref an item from its window.
Gunnar Sletta [Fri, 6 Mar 2015 10:39:49 +0000 (11:39 +0100)]
Make sure we deref an item from its window.

We should compare against our own window, not our parent's.

The ref/deref logic for items is there to aid us with having "property
var foo: Image { }" in ShaderEffects, where the property is a
parentless member of a given window. The shader effect would ref
all member properties which are used as samplers, giving these items
the same d->window as itself.

As a consequence, it is wrong to check the old parent's window when it
is the item itself that knows which window it is attached to.

Change-Id: Ic34354fd86b52a7334f9757bf408bef0e25ecfd5
Task-number: QTBUG-43376
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 years agoDoc: Replace qt-project.org/doc with doc.qt.io
Sergio Ahumada [Wed, 4 Mar 2015 22:00:59 +0000 (23:00 +0100)]
Doc: Replace qt-project.org/doc with doc.qt.io

Change-Id: Ib693ac8d48ab943a3c26a49ab4fca91f0c5f0b0e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
10 years agoFix thread-safety: _POSIX_THREAD_SAFE_FUNCTIONS is in <unistd.h>
Thiago Macieira [Tue, 17 Feb 2015 00:17:21 +0000 (16:17 -0800)]
Fix thread-safety: _POSIX_THREAD_SAFE_FUNCTIONS is in <unistd.h>

If you don't include it, it isn't defined...

Change-Id: I1a800c709d3543699131ffff13c388ba652761fc
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
10 years agoDisable JIT on x32 ABI
Dmitry Shachnev [Sat, 28 Feb 2015 11:29:52 +0000 (14:29 +0300)]
Disable JIT on x32 ABI

Linux x32 interface has a different ABI, and our JIT does not work there,
so it should be disabled.

See <http://en.wikipedia.org/wiki/X32_ABI>.

Done-with: Adam Borowski <kilobyte@angband.pl>
Change-Id: I0771e48a51f999a97b49abc01ee72621a5aaa6c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
10 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

10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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

10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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

10 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>
10 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

10 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>
10 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>