platform/upstream/qtdeclarative.git
9 years agoRemove bogus dynamic and static casts.
Sérgio Martins [Tue, 26 May 2015 10:01:01 +0000 (11:01 +0100)]
Remove bogus dynamic and static casts.

QQuickItemPrivate::get() already returns the correct type.

Change-Id: I580d78e72f2ac20abb575dac7ffe468ab10b5c40
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoQQuickTextNodeEngine: Remove unused member.
Robin Burchell [Mon, 1 Jun 2015 15:39:51 +0000 (18:39 +0300)]
QQuickTextNodeEngine: Remove unused member.

Change-Id: I467d8e2c690592cdca84ef3c539afe6df908c9af
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoQSGBatchRenderer: Store the last known free page index.
Robin Burchell [Wed, 3 Jun 2015 11:48:31 +0000 (14:48 +0300)]
QSGBatchRenderer: Store the last known free page index.

Performing a full scan of the pages each time a new node is to be allocated is
wasteful. Instead, store the last known free page, and search from that position
forwards. When an item is freed, reset the last known free page to search
forward from that position. If no free page is found, don't fall back to a full
scan - just allocate a new page.

The  creation of lots of new items is a pretty common pattern (PageStack on
mobile and similar), thus it makes sense to optimize for it and avoid scanning
where possible.

This takes the time to instantiate 142k Rectangles in a single
component from 2433ms on the render thread to 495ms on the render thread (down
slightly from 511ms when using no paging at all, and down from 638ms on 5.3.1).

Separately to this, it may make sense to increase the size of pages, but
ideally, this will wait until there is a shared pool between renderers.

Change-Id: I2b335e230bc28fffcbb38b3fb43f3d441789c256
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix users of QTextLayout::additionalFormats to use the new API
Marc Mutz [Sun, 31 May 2015 15:09:44 +0000 (17:09 +0200)]
Fix users of QTextLayout::additionalFormats to use the new API

QTextLayout::additionalFormats setters and getters using QList<FormatRange> have
been deprecated; port to the QVector versions.

Change-Id: I6702430c09b30aa033fe4e34f39a9aa3350e471b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
9 years agoSome cleanups to QQmlRefCount
Lars Knoll [Mon, 20 Apr 2015 13:07:40 +0000 (15:07 +0200)]
Some cleanups to QQmlRefCount

Rename QQmlRefPointer::take to adopt, as it's a better fit with
the semantics. Get rid of the assignment operator from a raw pointer
and add a Adopt argument to the constructor.

Change-Id: Ia1ebe42b24570f32543e783f91eb3206602772a2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoReplace bindingType() method by a virtual getter
Lars Knoll [Mon, 20 Apr 2015 07:38:07 +0000 (09:38 +0200)]
Replace bindingType() method by a virtual getter

This removes the need to save some bits in the abstract binding
object, and should make it easier to move QQmlAbstractBinding
over to be reference counted.

Change-Id: Ib46cb3217f3dc462f1dcaa6153d90ea2f7401f48
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMove the writeBinding method into QQmlBinding
Lars Knoll [Fri, 17 Apr 2015 12:21:25 +0000 (14:21 +0200)]
Move the writeBinding method into QQmlBinding

It's only called from there; this simplifies the code and will allow
some further optimizations.

Change-Id: I1f0befe620beaa0bbf961fc829881ef7b5c2e435
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoBlacklist unstable test
Simon Hausmann [Fri, 5 Jun 2015 08:36:37 +0000 (10:36 +0200)]
Blacklist unstable test

Change-Id: I1631d38f8c94e8d663df057f2c417c7ef2045949
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAdd missing QVector::reserve() calls
Sérgio Martins [Wed, 3 Jun 2015 22:23:50 +0000 (23:23 +0100)]
Add missing QVector::reserve() calls

Change-Id: Iab7c9949941559b4773e5d4a0406dc58cfc70adb
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoDocument API bug for QQmlContext::nameForObject()
Mathias Hasselmann [Wed, 12 Mar 2014 13:05:22 +0000 (14:05 +0100)]
Document API bug for QQmlContext::nameForObject()

QQmlContext::nameForObject() doesn't need a mutable QObject, therefore
the QObject argument should be marked as const.

Change-Id: Ib3cfe197cb4a615850771ccc303796a6c205873e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix resolving of nested alias properties
Lars Knoll [Thu, 28 May 2015 13:26:10 +0000 (15:26 +0200)]
Fix resolving of nested alias properties

When looping to resolve nested aliases, make sure we use the
correct property index to determine the vme meta object that
contains the next level of alias data.

Change-Id: Id2077b164a4591c86ccb63e8ed3bb997d719731c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMove the target property index into the common base class
Lars Knoll [Thu, 16 Apr 2015 20:26:44 +0000 (22:26 +0200)]
Move the target property index into the common base class

This unifies some more code between the different binding
classes

Change-Id: I891dc9358cf9598a0c1e21df8a62d6f8a4193985
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMove the target object into the base class
Lars Knoll [Thu, 16 Apr 2015 20:15:27 +0000 (22:15 +0200)]
Move the target object into the base class

Change-Id: I912d7665b49c8e9b2d38e78bfcfc4b3d39ca7459
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRemove the QQmlPropertyData from the binding
Lars Knoll [Thu, 16 Apr 2015 13:40:33 +0000 (15:40 +0200)]
Remove the QQmlPropertyData from the binding

Simply store the encoded property index instead.

Change-Id: I235030c3d658df3e5df6efafc9c5b2c22200e0a8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoBlacklist unstable tests for now
Simon Hausmann [Thu, 4 Jun 2015 11:08:44 +0000 (13:08 +0200)]
Blacklist unstable tests for now

Change-Id: Ia29b103c33afd9aafe9ee36ee4447fab17fe00c7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMake QQuickGridView test independent of mouse speed
Ulf Hermann [Thu, 4 Jun 2015 08:11:57 +0000 (10:11 +0200)]
Make QQuickGridView test independent of mouse speed

In order to prevent it from accidentally hitting the end of the grid
prematurely we insert another mouse click.

Change-Id: I3f1ecc65af4b60aebf383192cde9a3a6fdeb5c8a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoDecouple flickable stopAtBounds test from mouse event timing
Ulf Hermann [Wed, 3 Jun 2015 13:01:23 +0000 (15:01 +0200)]
Decouple flickable stopAtBounds test from mouse event timing

We don't really want to know if the flickable is still flicking at the
end of the flick() call, but rather if it has been flicking at some
point.

Change-Id: Ib6c89023042b2a45e66f1825a699bb47dc6e13ee
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoQQuickFlickable: Send synthetic release event through QCoreApplication
Ulf Hermann [Mon, 1 Jun 2015 09:00:55 +0000 (11:00 +0200)]
QQuickFlickable: Send synthetic release event through QCoreApplication

As we do this with the press event, we have to do the same with the
release event. The application tracks the state of mouse buttons and
will get confused if an additional press event without symmetric
release event shows up.

Change-Id: Ia27a96fa5b207ed8aaad913caf7575de112e8606
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix flickable autotest
Ulf Hermann [Thu, 28 May 2015 11:02:54 +0000 (13:02 +0200)]
Fix flickable autotest

* Make sure we always wait for window activation, not only exposal.
* When clicking or releasing, first move the mouse to the right place.
* In returnToBounds() show() the window before we rely on its event
  loop.
* In rebound() reduce the delays as mouse events get delivered
  earlier now and the movement might stop and restart if we wait for
  too long between subsequent mouse moves.

Most of these problems have been exposed by commit
66050f2ac875d451bec31e0d8ff507795b5b18d6 in qtbase.

Change-Id: I5a3bc1e4ba92362d69180c8fde33eca47b4b9375
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMove the mouse to the right place before simulating a click
Ulf Hermann [Wed, 27 May 2015 14:43:04 +0000 (16:43 +0200)]
Move the mouse to the right place before simulating a click

Otherwise the mouse event can be split in two and only a mouse move
will be immediately delivered. This problem was exposed by commit
66050f2ac875d451bec31e0d8ff507795b5b18d6 in qtbase.

Change-Id: I9d458bd446c754f566d1de412eb90a43f0686ab9
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoWait for window activation, not for exposal in key press test
Ulf Hermann [Wed, 27 May 2015 13:04:48 +0000 (15:04 +0200)]
Wait for window activation, not for exposal in key press test

The previous version only worked when simulated input events were
queued and thus incidentally delivered after the window activation
that follows the exposal.

66050f2ac875d451bec31e0d8ff507795b5b18d6 in qtbase made event delivery
synchronous for simulated input events.

Change-Id: Ieea3d1360b32f3466059a2ffe570d6dc633f81dc
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAllow for some delay on starting transitions in flickable test
Ulf Hermann [Thu, 28 May 2015 17:20:48 +0000 (19:20 +0200)]
Allow for some delay on starting transitions in flickable test

Change-Id: I218ea874def6060e147cb05eafeb857a9e66eb44
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMerge remote-tracking branch 'origin/5.5' into dev
Simon Hausmann [Thu, 4 Jun 2015 08:24:46 +0000 (10:24 +0200)]
Merge remote-tracking branch 'origin/5.5' into dev

Conflicts:
src/qml/jsruntime/qv4engine_p.h
src/quick/items/qquickitemsmodule.cpp
src/quick/items/qquicktext.cpp
src/quick/util/qquickpixmapcache.cpp
tests/auto/quick/qquickwindow/tst_qquickwindow.cpp

Change-Id: I90ecaad6a4bfaa4f36149a7463f4d7141f4a516a

9 years agotst_qquickwindow: Prospective fix for instability of cursor test.
Friedemann Kleint [Wed, 3 Jun 2015 12:27:27 +0000 (14:27 +0200)]
tst_qquickwindow: Prospective fix for instability of cursor test.

  FAIL!  : tst_qquickwindow::cursor() Compared values are not the same
     Loc: [tst_qquickwindow.cpp(1444)]

Check that no windows are leaked in slot cleanup and fix all
leaking tests.

Position the window and enlarge it to fix the warning:

WARNING: tst_qquickwindow::cursor() Mouse event occurs outside of target window.

Add window titles to tests.

Replace QVERIFY(a == b) by QCOMPARE(a, b).

Change-Id: Ida892e8a8d7d5f40d4f50787608940dbffc7a29d
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
9 years agoFix flickering when QQuickWidget becomes visible
Joni Poikelin [Fri, 29 May 2015 05:13:58 +0000 (08:13 +0300)]
Fix flickering when QQuickWidget becomes visible

QQuickWidget used short delay before rendering. This caused
black area to flash on the widget briefly. Instead of scheduling
redraw, render scene immediately.

Task-number: QTBUG-46387
Change-Id: I342d96a1aaef3244190221807b0d816815697623
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoDocument the render loops a bit more
Laszlo Agocs [Wed, 27 May 2015 13:39:18 +0000 (15:39 +0200)]
Document the render loops a bit more

Task-number: QTBUG-42699
Change-Id: Ib8a1690bfe38bd0686799fac390207c26e5a6812
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
9 years agoPurge use of VisualDataModel from docs where DelegateModel is required
Alex Blasche [Thu, 28 May 2015 09:07:19 +0000 (11:07 +0200)]
Purge use of VisualDataModel from docs where DelegateModel is required

They are the same types except that VisualDataModel is deprecated
and uses a different import statement. Now, references to VisualDataModel
are only used where we explicitly refer to the replacement/deprecation.

Change-Id: I1e68eb5784235a00233b3882c3d91e21e32af7d1
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoCalqlatr Demo: Adjust ListView delegate height based on font size
Topi Reinio [Fri, 17 Apr 2015 09:11:48 +0000 (11:11 +0200)]
Calqlatr Demo: Adjust ListView delegate height based on font size

To prevent the list tem text overflowing the delegate boundary.

Task-number: QTBUG-45621
Change-Id: I46f35508ea49a2b435286de76dc9ab49620619a6
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoMakes it possible to extract all data from a QML DropArea
Aleix Pol [Sat, 23 May 2015 12:10:36 +0000 (14:10 +0200)]
Makes it possible to extract all data from a QML DropArea

There's many types that aren't being covered by DropArea API, such as
images. getDataAsString is not acceptable, since fromUtf8 chokes on
reading non-utf8.
This patch introduces getDataAsArrayBuffer method that won't try to convert
the data into a QString and simply pass a QV4::ArrayBuffer, that internally
keeps a QByteArray.

Change-Id: I65411b3d365ee6c5e13effd9167156771ee08a05
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix the implicitSize of SVG Images on retina display
Jocelyn Turcotte [Wed, 20 May 2015 14:29:45 +0000 (16:29 +0200)]
Fix the implicitSize of SVG Images on retina display

If the user relies on the Image implicitSize to do the layout
but still sets sourceSize to the image, the sourceSize might
be (0, 0) instead of (-1, -1).

readImage checks that the size is > 0 to use the requestedSize
and this would cause us not to use the requestedSize, but still
divide by the devicePixelRatio in QQuickImageBase::pixmapChange,
which would give a different implicitSize on retina display.

Make sure that we get the same implicitSize on both by only
keeping the targetDevicePixelRatio if sourceSize is > (0, 0)
like readImage does.

Task-number: QTBUG-38991
Change-Id: Ib93f57efa47d096f88883845985b44f62db4ad74
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
9 years agoDon't MOTH_END_INSTR(Debug) after beginning a Line
Ulf Hermann [Fri, 22 May 2015 10:31:44 +0000 (12:31 +0200)]
Don't MOTH_END_INSTR(Debug) after beginning a Line

This probably works because Debug and Line have the same internal
structure, but obviously it's fragile.

Change-Id: Ia27a769fa560726cec1ab73dee96f7c1e6812db0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoqquickwindow: ensure we delete the correct delayed touch event after delivery
Richard Moe Gustavsen [Tue, 19 May 2015 09:20:12 +0000 (11:20 +0200)]
qquickwindow: ensure we delete the correct delayed touch event after delivery

Delivering a delayed touch event from QQuickWindow can cause the event loop
to recurse (e.g if it starts a drag'n'drop). This again can cause new touch
events to be delivered to QQuickWindow, and new delayed touch events to be
stored.

This results in the following:
    (1) Receive new touch press event in QQuickWindow, and set
        delayedTouch to be a copy of it
    (2) Deliver delayedTouch to items. This can cause an event loop
        recursion.
    (3) While inside the recursion, QQuickWindow receives another new
        touch press event. We then redeliver and delete the current
        delayedTouch event created in (1), and set delayedTouch to be
        a copy of the new event.
    (4) Later we return back from (2), and try to access
        delayedTouch (or actually a reference to the touchpoints inside
        it, qquickwindow.cpp:1958). Since the event was deleted in (3), we
        have a crash.

This patch will ensure that we set delayedTouch to 0 before delivering
it (so it cannot be redelivered), and that we safely delete it afterwards
when it goes out of scope. By converting delayedTouch to a QScopedPointer
we also ensure that the event is not leaked upon destruction.

Task-number: QTBUG-45877
Change-Id: Ic372a39a0eb127abfd12cec2d51b3743ad83194d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMake it possible to grab() a window after it has been hidden.
Gunnar Sletta [Fri, 22 May 2015 06:47:34 +0000 (08:47 +0200)]
Make it possible to grab() a window after it has been hidden.

Windows render loop already had this capability.

Change-Id: I9391e218568cb6951f9f25d74e732aa5ddf9b5bc
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoDon't doneCurrent() on hide().
Gunnar Sletta [Fri, 22 May 2015 06:34:42 +0000 (08:34 +0200)]
Don't doneCurrent() on hide().

This hurts interoperability with OpenCL on windows and the other
renderloops don't do it either, so to be consistent, lets not.

Change-Id: Ie06842957561c8933690633469b8b3a026ff399b
Task-number: QTBUG-46273
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
9 years agoFix basic and windows render loops to use the correct screen
Laszlo Agocs [Thu, 7 May 2015 17:14:23 +0000 (19:14 +0200)]
Fix basic and windows render loops to use the correct screen

GLX, and potentially other platforms too, require that compatible
contexts and surfaces are created with the same screen.

This makes Quick functional on X.org configurations where each
physical screen represents a separate X screen on the same X display.

Change-Id: I03c87819e1aee148c880a3caca13d4a0c5409056
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoKeep cursor visible during keyboard interaction
Kai Uwe Broulik [Sun, 17 May 2015 17:00:50 +0000 (19:00 +0200)]
Keep cursor visible during keyboard interaction

This makes it consistent with widgets cursor behavior.

Change-Id: I1be958e0c8afb7c7c8b5ebad5d06b06013e83699
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoqmlprofiler: Allow aggregation of multiple traces into one file.
Ulf Hermann [Wed, 20 May 2015 09:35:04 +0000 (11:35 +0200)]
qmlprofiler: Allow aggregation of multiple traces into one file.

Change-Id: Ifc9f9adafa3178e68212fb97914a6f4cae9a4c83
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
9 years agoqmlprofiler: In interactive mode, don't quit if application quits
Ulf Hermann [Wed, 20 May 2015 11:12:33 +0000 (13:12 +0200)]
qmlprofiler: In interactive mode, don't quit if application quits

We might want to inspect or save the pending data in some special way.

Change-Id: I235b1f948ad4a9ddd100332991243231119bcf08
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
9 years agoqmlprofiler: Remove useless 'maximumTime' member.
Ulf Hermann [Thu, 21 May 2015 08:29:02 +0000 (10:29 +0200)]
qmlprofiler: Remove useless 'maximumTime' member.

Change-Id: Icdb35e0763694312cfb4166df0f537e1845116e8
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
9 years agoqmlprofiler: Add non-interactive mode and make it the default.
Ulf Hermann [Tue, 19 May 2015 13:54:16 +0000 (15:54 +0200)]
qmlprofiler: Add non-interactive mode and make it the default.

If you just run a test application through the profiler without any
further parameters, you want it to record the data the application
generates and then terminate itself.

[ChangeLog][QtQml][Behavior Change] Make qmlprofiler command line
interface better suited for scripting.

Task-number: QTBUG-43066
Change-Id: I831e714b9c7b4b984b6450ad5c78ba4fdae6b8f6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
9 years agoqmlprofiler: Clean up recording state mess
Ulf Hermann [Tue, 19 May 2015 12:50:06 +0000 (14:50 +0200)]
qmlprofiler: Clean up recording state mess

The recording state is a global property of the profiler client, it has
to match the application's recording status as well as possible, and
the user can set an initial target value with a command line parameter.

This way we don't get strange error messages when the application quits
by itself and properly sends all the data before.

Task-number: QTBUG-43066
Change-Id: Id93aa7fb940f870c8f16cea8427c38aab450f864
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
9 years agoqmlprofiler: Add some sanity to command line parsing.
Ulf Hermann [Mon, 18 May 2015 15:43:25 +0000 (17:43 +0200)]
qmlprofiler: Add some sanity to command line parsing.

Use QCommandLineParser to allow for double-dash options and improve the
help text.

Task-number: QTBUG-43066
Change-Id: Iac772cbbf750016a9058658c9b4b275faf8fb62f
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
9 years agoFix null pointer dereference in QQmlImportNamespace
Vishesh Handa [Thu, 12 Mar 2015 13:26:00 +0000 (14:26 +0100)]
Fix null pointer dereference in QQmlImportNamespace

Change-Id: Iaf61f38790b0dfddb924043e0a25eb8a882571c8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoOptionally apply orientation on images
Allan Sandfeld Jensen [Mon, 18 May 2015 08:13:48 +0000 (10:13 +0200)]
Optionally apply orientation on images

Adds the option to follow EXIF orientation. This was previuosly
automatically applied to TIFF images, but not JPEGs except in
Qt 5.4.1.

[ChangeLog][Image] An autoTransform property has been added to
control whether metadata image transforms such as EXIF orientation
are automatically applied. By default it enabled for TIFF images
and disabled for JPEG.

Change-Id: I8a4cf204985b2a7d158a0e046e52db7cda970d20
Task-number: QTBUG-37946
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoWinRT: fix warnings
Maurice Kalinowski [Tue, 19 May 2015 09:35:12 +0000 (11:35 +0200)]
WinRT: fix warnings

Change-Id: If11db499d743cbe79959145ecfcbcfec896a6845
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
9 years agoFix render loop warning about invalid geometry of exposed windows.
Friedemann Kleint [Mon, 18 May 2015 10:05:19 +0000 (12:05 +0200)]
Fix render loop warning about invalid geometry of exposed windows.

Do the screen check only for toplevel windows and make warning
more verbose.

Change-Id: Ie25271fe34c72c1410022afe8a1a9bdccdf7a12f
Task-number: QTCREATORBUG-10814
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix MSVC warning about unused variable
Simon Hausmann [Tue, 19 May 2015 09:07:43 +0000 (11:07 +0200)]
Fix MSVC warning about unused variable

Change-Id: I9b2f21dd7cfc82a9da9aa3e4c60d47fa07fdceaf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoMSVC: Fix compiler warning
Kai Koehne [Tue, 19 May 2015 07:16:44 +0000 (09:16 +0200)]
MSVC: Fix compiler warning

Fix compiler warning introduced in commit  d76921e3082cd31:

jsruntime\qv4engine.cpp(1626) : warning C4100: 'v' : unreferenced formal parameter

Change-Id: I1f2b74f8e3fb14019f6e28b407d0336b0812c573
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
9 years agoRemove ordered list assumptions in PathView
Alan Alpert [Thu, 7 May 2015 05:56:03 +0000 (22:56 -0700)]
Remove ordered list assumptions in PathView

When flicking fast or jumping around on paths with some items not seen,
the current algorithm makes assumptions about list ordering which are
hard to maintain. Specifically that it has the index of the first item
in the list cached and that all changed will be to either prepend or
append an item to the current ordered set.

This patch removes that assumption, leading to a little more work each
time to identify where new elements will go. There is still a slightly
faster path for the common case of adding elements to the beginning or
end of the path.

Task-number: QTBUG-42716
Change-Id: Ief76c93967d254d405e6656ef27d06b4ecc470c8
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
9 years agoColumn, Row, Grid, Flow: add support for padding
Liang Qi [Mon, 11 May 2015 09:56:38 +0000 (11:56 +0200)]
Column, Row, Grid, Flow: add support for padding

[ChangeLog][QtQuick] Added padding, leftPadding, topPadding,
rightPadding and bottomPadding properties in Positioners,
including Column, Row, Grid and Flow.

Task-number: QTBUG-41559
Change-Id: If3be7b2243a79c01dad0a5600e22d30eeea43c8a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
9 years agoFix build with QT_STRICT_ITERATORS
Sérgio Martins [Thu, 14 May 2015 12:31:52 +0000 (13:31 +0100)]
Fix build with QT_STRICT_ITERATORS

Change-Id: I3df6ac107cb46b3a1b15b80f39d7c6015adcd9ac
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoPotentially stabilize tst_qquickwindow::touchEvent_cancel
Frederik Gladhorn [Wed, 13 May 2015 15:28:44 +0000 (17:28 +0200)]
Potentially stabilize tst_qquickwindow::touchEvent_cancel

By moving them well into the item, (50 instead of 10 pixels) there is
less risk of them not being delivered due to bad timing with window
activated.
Since we know that even qWaitForWindowActive sometimes returns before
the final positioning of the window, this is a sensible work-around
until testlib is fixed. In this test we care about the
process of cancelling a touch event, not where.

Change-Id: I74ad29535038995b38c913ddd09f462aa96a034c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoQtQuick: Fix const correctness in old style casts
Thiago Macieira [Sat, 7 Mar 2015 22:42:59 +0000 (14:42 -0800)]
QtQuick: Fix const correctness in old style casts

Found with GCC's -Wcast-qual.

Change-Id: Ia0aac2f09e9245339951ffff13c9589afabc7ade
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoEnable mipmap test on all platforms, except early Mesa.
Gunnar Sletta [Fri, 27 Mar 2015 10:32:27 +0000 (11:32 +0100)]
Enable mipmap test on all platforms, except early Mesa.

Change-Id: Ib6e17755cdb281de164c9eb79c3b0eeca391c291
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoCreate contexts and pbuffers with the correct screen in QQuickWidget
Laszlo Agocs [Thu, 7 May 2015 17:09:39 +0000 (19:09 +0200)]
Create contexts and pbuffers with the correct screen in QQuickWidget

Change-Id: I8e9db998eee0af5f62c1384f2dcb2028254cc642
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoQML: fix mixed debug/release build on OSX.
Erik Verbruggen [Mon, 11 May 2015 08:16:37 +0000 (10:16 +0200)]
QML: fix mixed debug/release build on OSX.

Dyld will take the debug library and link it against the release
versions of the frameworks. (Using the debug versions is an option to
dyld when starting an application.) This requires all symbols in both
debug and release libraries in frameworks to be the same.

Change-Id: I6d96bcdf8577f1dffc63c508cb7adc0db2acc486
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoHide cursor when text fields becomes read only
Santtu Lakkala [Thu, 16 Apr 2015 13:51:45 +0000 (16:51 +0300)]
Hide cursor when text fields becomes read only

Clear the cursor node in TextEdit if field is read only. Otherwise the
cursor stays visible indefinitely, if it were at the moment the flag
was set.

Task-number: QTBUG-44735
Change-Id: Ib39138260ad8a4d7e5ed2185b8a04c577ee1eff0
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoAdd QtQuick::Text::font.weight enum values
Shawn Rutledge [Mon, 11 May 2015 09:34:08 +0000 (11:34 +0200)]
Add QtQuick::Text::font.weight enum values

Followup to 517da68893be9e6d97c7993922c573de9560604d in qtbase:
make all possible font weights available in QML.

Task-number: QTBUG-38482
Change-Id: I4f821d2fadbcd42fbb237903be474d67a0a5a7c9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
9 years agoqmllint: Fix parsing js files with .import directives
Sérgio Martins [Fri, 8 May 2015 19:10:06 +0000 (20:10 +0100)]
qmllint: Fix parsing js files with .import directives

For .pragmas we removed them explicitly but the correct fix is to
not use "qmlMode" when setting code in the lexer.

Change-Id: I6ffc0ca9e7ebab09fbf91e647d292ff0a3a1fd7d
Task-number: QTBUG-45916
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoAdd protection against "wrong" marking in debug builds
Simon Hausmann [Fri, 8 May 2015 10:34:53 +0000 (12:34 +0200)]
Add protection against "wrong" marking in debug builds

To protect against situations where we accidentally mark an object that belongs
to a different engine - there are many possible entry points - this patch adds
an assertion in debug builds for this situation. When it happens, it will point
more or less directly to the code that tries to push an object to the wrong JS
stack for marking. This helped in the investigation of QTBUG-44895

Change-Id: I311b9ff6d282d52e725044b03a62cd77085536be
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoFix memory corruption when sharing QObjects between different QML engines
Simon Hausmann [Thu, 7 May 2015 14:22:24 +0000 (16:22 +0200)]
Fix memory corruption when sharing QObjects between different QML engines

When marking the JS wrappers for QObject manually, we cannot use
ddata->jsWrapper directly but we must respect the case where the same
object is exposed to different engines and then we must mark the wrapper
that belongs to the engine that is currently collecting garbage.

Change-Id: If82883c762ccaf3431e7074243ff2ff703234d66
Task-number: QTBUG-44895
Reviewed-by: Marco Martin <mart@kde.org>
Reviewed-by: Jan Kundrát <jkt@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
9 years agoAvoid namespacing QTEST_MAIN
Rainer Keller [Fri, 8 May 2015 07:18:03 +0000 (09:18 +0200)]
Avoid namespacing QTEST_MAIN

The test tries to be smart but it won't work once GPU blacklists are
supported because QTEST_MAIN will contain some imports that cannot be
namespaced.

Change-Id: Id0538cf1ba3885736d8b177e64064bd06f8fef2e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
9 years agoAvoid uninitialized bytes in QV4::CompiledData
Simon Hausmann [Tue, 5 May 2015 11:14:36 +0000 (13:14 +0200)]
Avoid uninitialized bytes in QV4::CompiledData

When populating the QV4::CompiledData for a JS unit, we memset the malloc'ed
data to zero. We should do the same when creating a unit for QML files. We do
write all the fields that we use, but due to padding we may end up with bytes
that are neither used nor written but still uninitialized. Consequently they
should be zero'ed, otherwise serialization will write garbage.

Change-Id: I0b093e4dde6789d7236247507221f4f3476ba89d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoFix memory corruption in array handling
Simon Hausmann [Tue, 5 May 2015 08:52:34 +0000 (10:52 +0200)]
Fix memory corruption in array handling

SimpleArrayData's markObjects() implementation did not mark the entries
correctly. When the dequeue offset was non-zero, we would end up marking values
that may have been garbage collected earlier.

Task-number: QTBUG-45888
Change-Id: Iacec350ccc76399ad4d16138af50acf22b2809db
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoFix memory corruption when multiple QML engines have JavaScript wrappers for the...
Simon Hausmann [Tue, 28 Apr 2015 13:38:09 +0000 (15:38 +0200)]
Fix memory corruption when multiple QML engines have JavaScript wrappers for the same QObject

It's possible that the same QObject is exposed to multiple JavaScript
environments, for which we have this "extra" hack in the form of a QMap.  The
common case is that QQmlData has a QV4::WeakValue that points to the JS wrapper
for the object. However in the rare case of multiple exposure, a map in the
other engines stores those references. That map was erroneously storing
pointers to temporary values on the JS stack instead of heap pointers.

Change-Id: I8587f9921a9b4f9efd288326d00cebc25ad0bc12
Task-number: QTBUG-45051
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoBorderImage support for @2x assets
Andy Nichols [Thu, 6 Nov 2014 19:30:45 +0000 (11:30 -0800)]
BorderImage support for @2x assets

Despite being a subclass of QQuickImageBase, BorderImage components did
not support using @2x assets like Image components.  The 9 patch image
logic now accounts for device pixel ratio when needed.

Manual tests added for stretch, repeat and round tiling modes.

[ChangeLog][BorderImage] Add support for @2x HiDPI border images.
This means, no more need to multiply the border sizes by the device
pixel ratio.

Change-Id: I79958739929964c816ba5dacedd9eaf93a60a183
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
9 years agoEnhance QQuickFramebufferObject docs regarding the state
Laszlo Agocs [Tue, 5 May 2015 09:45:31 +0000 (11:45 +0200)]
Enhance QQuickFramebufferObject docs regarding the state

Add a note about resetOpenGLState() and the initial state to render().
This tries to tackle the common issue of forgetting to set or reset the
state the custom OpenGL code relies on.

Change-Id: I706b2b1eac76468a9b35cfb7cd99bd5483f2912c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoQQuickWindow: Replace assert() on unreleased touch points by warning.
Friedemann Kleint [Tue, 5 May 2015 07:36:31 +0000 (09:36 +0200)]
QQuickWindow: Replace assert() on unreleased touch points by warning.

Output a warning message and clear
QQuickWindowPrivate::itemForTouchPointId should unreleased touch points
exist when QEvent::TouchEnd is received.

Task-number: QTBUG-45856
Change-Id: I8a05220e4258c0ca401f79a2c32ec4f1d43fa444
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoQMLEngine: Update XHR tests with checking status code
Valery Kotov [Wed, 22 Apr 2015 15:18:16 +0000 (18:18 +0300)]
QMLEngine: Update XHR tests with checking status code

Update QQmlXMLHttpRequest unit tests with checking status code in
resopnse message.

Task-number: QTBUG-45581
Change-Id: Ia9fdb4463582bdb098be5d0cab022993904a3d51
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoFix qml-i18n example
Simon Hausmann [Mon, 4 May 2015 11:49:52 +0000 (13:49 +0200)]
Fix qml-i18n example

Commit f0e285381800c0809e5bfd3a4871a2283ea10fb9 renamed the example, but
it did not adjust the context in the translations. From that point on the
context didn't match anymore and the entire example stopped working.

Change-Id: I491d518235aea07768b69c52d13b2bbf5060f61f
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoFix implicitHeight for Text items bindings dependent on implicitWidth.
Andrew den Exter [Thu, 23 Apr 2015 11:29:47 +0000 (21:29 +1000)]
Fix implicitHeight for Text items bindings dependent on implicitWidth.

Recalculate the implicitHeight on the second layout if the width
changes after setting the implicitWidth, and potentially do another
layout if the updating the implicitHeight changes the height.

Change-Id: Ib6a637452013b56dba7ae8a6862cd92156386578
Task-number: QTBUG-45546
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
9 years agoMerge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5
Simon Hausmann [Mon, 4 May 2015 08:21:10 +0000 (08:21 +0000)]
Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5

9 years agoMerge remote-tracking branch 'origin/5.4' into 5.5
Simon Hausmann [Mon, 4 May 2015 08:20:20 +0000 (10:20 +0200)]
Merge remote-tracking branch 'origin/5.4' into 5.5

Change-Id: Ie8ea118ed0a1a9a1c3d81e1e34d85c03c695c9a4

9 years agoAvoid QQuickItem in materials's compare() on the render thread
Gunnar Sletta [Tue, 28 Apr 2015 05:45:28 +0000 (07:45 +0200)]
Avoid QQuickItem in materials's compare() on the render thread

Task-number: QTBUG-44664
Change-Id: I4438e666b75fdf2e8d4353e64454d4c665a24350
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoFix default value for XMLHttpRequest.response property
Simon Hausmann [Tue, 28 Apr 2015 14:03:07 +0000 (16:03 +0200)]
Fix default value for XMLHttpRequest.response property

The default value for responseType is the empty string, for which
the expected data type for the response property is a string - same
as when the response type is set to "text". In other words: By default
the response property should contain the string representation of the
data.

Task-number: QTBUG-45862
Change-Id: I563160e5cdfbf93aca7e283e455d77a6b9deceb4
Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
Reviewed-by: Valery Kotov <kotov.valery@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoCreate QOpenGLContext with the correct screen
Jan Arne Petersen [Tue, 13 Jan 2015 10:23:10 +0000 (11:23 +0100)]
Create QOpenGLContext with the correct screen

Change-Id: I91169e719ac97b8e32805e08d6a1f43caa897f73
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoFix passing of locals as function arguments with side-effects
Simon Hausmann [Thu, 30 Apr 2015 11:20:43 +0000 (13:20 +0200)]
Fix passing of locals as function arguments with side-effects

Commit 75c22465cf8fe262edfe6178bb9ca19661fb710e regressed in allowing
locals and arguments to be passed directly as further arguments to function
calls, but that's incorrect when considering

    var i = 2;
    testFunction(i, i += 2)

where it is instrumental to place the first argument into a temp (making a
copy) instead of passing it directly.

Change-Id: Iffcf6c6eda92a8fb665982cda1db0b96359cd092
Task-number: QTBUG-45879
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoFix uninitialized variables/data
Simon Hausmann [Tue, 28 Apr 2015 14:53:37 +0000 (16:53 +0200)]
Fix uninitialized variables/data

* Initialize the indexOfRootObject member
* When creating the QV4::CompiledData::String objects,
  don't include the one ushort _beyond_ the QString, which
  is random data.

Change-Id: I8fe8a465e2713a385504f217b367a62b70ee5fdf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoDoc: Fix linking issues in Item QML type documentation
Topi Reinio [Mon, 27 Apr 2015 11:23:05 +0000 (13:23 +0200)]
Doc: Fix linking issues in Item QML type documentation

Use explicit link commands as QDoc cannot create links to single-word
QML type names automatically.

Task-number: QTBUG-45827
Change-Id: I048300728356d3ae9901c5c57febc683137ce090
Reviewed-by: Martin Smith <martin.smith@digia.com>
9 years agoFix rendercontrol example for screens with different dpr
Laszlo Agocs [Thu, 16 Apr 2015 13:56:33 +0000 (15:56 +0200)]
Fix rendercontrol example for screens with different dpr

renderWindow() was not reimplemented in the example. This is pretty
bad since renderWindowFor() fails to find a window and thus falls
back to using the default device pixel ratio (which is the highest
dpr present in the system). The result is broken content from Quick
because it operates with a dpr of 2 any time a retina screen is connected,
even when the example's own QWindow is placed on a normal screen.

Add also a note to the QQuickRenderControl docs because it is easy to
overlook.

Task-number: QTBUG-45613
Change-Id: I31bf92ec285f3d9867a5604a4b4e3bea73791932
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoRecreate the FBO on dpr change in rendercontrol example
Laszlo Agocs [Thu, 16 Apr 2015 13:41:26 +0000 (15:41 +0200)]
Recreate the FBO on dpr change in rendercontrol example

Even when the window size is not changing. This provides a useful
example of connecting to the screenChanged() signal.

Task-number: QTBUG-45613
Change-Id: I0652838d9c0cfec8b64b3422997159f385445b20
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoAvoid showing garbage when resizing the rendercontrol example
Laszlo Agocs [Thu, 16 Apr 2015 10:47:42 +0000 (12:47 +0200)]
Avoid showing garbage when resizing the rendercontrol example

The threaded variant was working well since that triggers a render
when resizing. The single threaded version lacked this and this
resulted in showing garbage on OS X at least since the new FBO had
undefined contents. Avoid this.

Task-number: QTBUG-45613
Change-Id: Ibb3d3f7640bab5da913df1c0c63cc3a3aaafb140
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
9 years agoMerge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev
Simon Hausmann [Tue, 28 Apr 2015 12:27:02 +0000 (12:27 +0000)]
Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev

9 years agoMerge remote-tracking branch 'origin/5.5' into dev
Simon Hausmann [Tue, 28 Apr 2015 08:57:34 +0000 (10:57 +0200)]
Merge remote-tracking branch 'origin/5.5' into dev

Conflicts:
tests/auto/quick/qquicktext/tst_qquicktext.cpp

Change-Id: I075e742da8396a268d97d3ab34bcd9e0c0cf001f

9 years agoMake Repeater emit items with right stacking order
Jan Arve Saether [Wed, 22 Apr 2015 08:49:45 +0000 (10:49 +0200)]
Make Repeater emit items with right stacking order

When listening for Component.onCompleted on the items emitted by the
Repeater, the items' stacking order was not properly set up.
The stacking order was corrected after Component.onCompleted was emitted,
which was undesirable in some cases.

Task-number: QTBUG-45423
Change-Id: Ib96b3de81db556b09fb5fc8bd27ce19223014f7e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoAdd some timing breakdown to QSG_RENDERER_DEBUG=render
Gunnar Sletta [Thu, 23 Apr 2015 12:00:04 +0000 (14:00 +0200)]
Add some timing breakdown to QSG_RENDERER_DEBUG=render

Change-Id: Ic7ffb48c1a148036bdb14a912d3407e9a1b3b4fd
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
9 years agoAvoid calling potentially pure virtual method
David Edmundson [Thu, 23 Apr 2015 13:01:24 +0000 (15:01 +0200)]
Avoid calling potentially pure virtual method

In Qt 5.4 screenChanged is called indirectly from the destructor of
QPlatformScreen. By comparing new values against the oldScreen we call
call virtual methods of QPlatformScreen from it's own destructor which
results in a crash.

This patch simply emits change signals whenever a screen change regardless
of whether the value differs from the previous screen. Arguably less
efficient, but better than crashing.

This fix is not needed in Qt 5.5 where the QPA architecture has changed.

Task-number: QTBUG-45753
Change-Id: Ic155906928855a377add9b21bff9e72b31f4667e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoV4: add JIT support for mips platforms (32-bit) and enable it
Julien Brianceau [Wed, 15 Apr 2015 07:40:37 +0000 (09:40 +0200)]
V4: add JIT support for mips platforms (32-bit) and enable it

[ChangeLog][QtQml] Enabled Just-In-Time compilation for JavaScript on MIPS

Change-Id: Idce070f29645760d6376767ef67e4592828c104d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMerge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5
Simon Hausmann [Mon, 27 Apr 2015 13:18:05 +0000 (13:18 +0000)]
Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5

9 years agoMerge remote-tracking branch 'origin/5.4' into 5.5
Simon Hausmann [Mon, 27 Apr 2015 07:52:51 +0000 (09:52 +0200)]
Merge remote-tracking branch 'origin/5.4' into 5.5

Conflicts:
.qmake.conf
tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp

Change-Id: I715b8a78b74cbe0dcaf599367fd6e08af4858e11

9 years agoOnly heap allocate binding bits storage if needed.
Aaron Kennedy [Thu, 29 Jan 2015 13:56:00 +0000 (14:56 +0100)]
Only heap allocate binding bits storage if needed.

For samegame, this has the following change on the total bytes allocated:

Startup (main page):
    Before: 1636
     After: 1072
Difference: 564 bytes (-34%)

Actual game (single player):
    Before: 14120
     After: 10432
Difference: 3688 bytes (-26%)

Done-with: Robin Burchell <robin.burchell@viroteck.net>
Change-Id: I10fd1e9f1440dcff93aed06e2c77c2912bc7dd39
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
(cherry picked from commit 54a19db8d00b67044861c8ffd1d5b1e646658609)
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoSmaller cleanups
Lars Knoll [Thu, 16 Apr 2015 12:30:17 +0000 (14:30 +0200)]
Smaller cleanups

Change-Id: Ib8a222c26316ad31699d3becaa945ac4035e437b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoSave one more pointer for every binding
Lars Knoll [Thu, 16 Apr 2015 12:09:35 +0000 (14:09 +0200)]
Save one more pointer for every binding

Change-Id: I434fda86b8e06484548be416f92a3cde9df6b906
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMinor cleanup
Lars Knoll [Thu, 16 Apr 2015 12:01:07 +0000 (14:01 +0200)]
Minor cleanup

Change-Id: I10abb08d80abc210986b2a7f820b8118b38485dc
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoGet rid of QQmlBinding::property()
Lars Knoll [Thu, 16 Apr 2015 09:56:07 +0000 (11:56 +0200)]
Get rid of QQmlBinding::property()

The method is slow and not required anymore

Change-Id: I8c2bc6eeedbd15b901b60aa08408fe8c32a81707
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMove m_function into the base class
Lars Knoll [Thu, 16 Apr 2015 08:29:29 +0000 (10:29 +0200)]
Move m_function into the base class

Change-Id: I2ebc0ac8f5085157f5d1ec71a1b75559c6a46f8b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoRename the v4function member variables
Lars Knoll [Thu, 16 Apr 2015 08:22:04 +0000 (10:22 +0200)]
Rename the v4function member variables

Name the functions consistently between all classes inheriting from
QQmlJavascriptExpression to prepare the move of the member into the
base class.

Change-Id: I161e829e3921816e675b73b6c1f3ca06315b328f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoMake update() non virtual
Lars Knoll [Wed, 15 Apr 2015 20:23:28 +0000 (22:23 +0200)]
Make update() non virtual

It's only ever called on QQmlBinding objects.

Change-Id: I50dd2996db9644e0df14ec930de17a7e621a0f47
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoSimplify binding setup code further
Lars Knoll [Wed, 15 Apr 2015 12:26:50 +0000 (14:26 +0200)]
Simplify binding setup code further

Reduce the number of setBinding/removeBinding overloads and
simplify their internal handling.

Change-Id: I87174a3b2dc0ecb8380e8fc28f8969fbf475c728
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
9 years agoDirectly resolve property aliases in QQmlBinding::setTarget
Lars Knoll [Wed, 15 Apr 2015 10:43:24 +0000 (12:43 +0200)]
Directly resolve property aliases in QQmlBinding::setTarget

Like this the target properties of the binding will always point
to the correct resolved object and property.

Change-Id: I400a265a17bc55de041c3df17f357e4b40f31c4d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>