Caroline Chao [Wed, 5 Nov 2014 09:57:45 +0000 (10:57 +0100)]
Documentation: Update QtQuick import value to 2.4
There are new APIs in Qt 5.4, the import version needed is 2.4.
Change-Id: I1c52c6a50362f539670d9ad00e03e57208234a17
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Eskil Abrahamsen Blomfeldt [Thu, 30 Oct 2014 08:08:00 +0000 (09:08 +0100)]
Fix disappearing nodes when adding in two levels of batch root
When having e.g. a clip node inside another clip node and adding
children to the innermost, we would get into the situation where
we did a partial rebuild for the outermost root, but its available
render order count would not be updated to reflect the change
deeper down in the tree. Since the z range would be based on the
outermost batch root's knowledge of the maximum render order in
the tree, what would happen is that the z of the rendered nodes
would increase steadily until they went outside of the viewing
volume and disappeared.
When decreasing the available order count of a batch root, we need
to also decrease the available order count of its parents. If any
of them drop below zero, we need to rebuild the render lists.
[ChangeLog][QtQuick] Fixed nodes sometimes disappearing when
adding many new nodes to the tree.
Change-Id: I39c34acf0e1e0e87601f0fcd983f8da38cee029f
Task-number: QTBUG-42096
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Liang Jian [Tue, 4 Nov 2014 00:32:28 +0000 (08:32 +0800)]
Fix memory leak in QV4::QQmlSequence
Use the correct destructor in QV4::QQmlSequence::destroy() to prevent
memory leak
Change-Id: If9531f731abe5cd9aecfb9642ebf4f5108978f99
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Leena Miettinen [Tue, 28 Oct 2014 13:41:13 +0000 (14:41 +0100)]
Doc: Qt Quick Designer UI forms
Since Qt Creator 3.3 and Qt 5.4, Qt Quick Designer
handles .ui.qml files that are similar to the .ui
files of Qt Designer.
Change-Id: I147e82a111ca7d3b806c4c6c94cc73b35a67785b
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Jian Liang [Sun, 2 Nov 2014 11:01:23 +0000 (19:01 +0800)]
Fix memory leak caused by QV4::ErrorObject
We should destruct QV4::ErrorObject::Data instead of QV4::ErrorObject in
QV4::ErrorObject::destroy() since all the members is stored in
QV4::ErrorObject::Data.
Task-number: QTBUG-42340
Change-Id: Ifff6413c0726591c335a421a5f289c1886f80980
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Thiago Macieira [Tue, 2 Sep 2014 19:21:04 +0000 (12:21 -0700)]
Don't use qDebug and qWarning for formatted output
They are not meant to be used like that. If you want formatted output to
the console, use stdio.h functions or std::cout. Otherwise, you get
something like:
$ qmlscene -h
[233103.196] (126848)(usage|?qmlscene?|__libc_start_main|?qmlscene?): Usage: qmlscene [options] <filename>
[233103.197] (126848)(usage|?qmlscene?|__libc_start_main|?qmlscene?):
[233103.197] (126848)(usage|?qmlscene?|__libc_start_main|?qmlscene?): Options:
[233103.198] (126848)(usage|?qmlscene?|__libc_start_main|?qmlscene?): --maximized ............................... Run maximized
[...]
I've replaced all qDebug with puts/printf and most qWarning with fprintf
to stderr. In my opinion, some of the qWarnings aren't errors, so I
replaced those with puts/printf too.
Change-Id: I3e493950bc4a588059fec6c7441b010c2780dffd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 30 Oct 2014 21:30:01 +0000 (22:30 +0100)]
Get rid of !this and similar constructs
The C++ standard doesn't allow calling member functions
on a mull object. Fix all such places, by moving the checks
to the caller where required.
Change-Id: I10fb22acaf0324d8ffd3a6d8e19152e5d32f56bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 31 Oct 2014 09:40:14 +0000 (10:40 +0100)]
Don't allocate less memory than required
When switching from a simple to a sparse array,
keep the previously allocated size, to not corrupt
memory.
Change-Id: I33f0fb049a2ad6f24ee3703f2c333855830fe9d2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Eskil Abrahamsen Blomfeldt [Mon, 27 Oct 2014 11:55:54 +0000 (12:55 +0100)]
BorderImage: Fix white area when size changes after first paint
When e.g. growing the size of the border image in an animation,
we would not get updates of the paint nodes when the size was
so small that the bounded target rect and source rect did not
change (when the size was smaller than the sum of the borders).
Since this can happen, we also need to detect when the size
changes and update the node for this case.
Task-number: QTBUG-42022
Change-Id: I0849d740f363e66a3a4fd6de23fc9d7399ab0779
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Thiago Macieira [Thu, 30 Oct 2014 21:10:34 +0000 (14:10 -0700)]
Fix ICC-on-Mac warning about unknown #pragma
qqml.h(506): warning #161: unrecognized #pragma
Change-Id: I089007db4c4d0701eff32ce0b1c2fff1f65d5c48
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Mitch Curtis [Tue, 28 Oct 2014 09:04:08 +0000 (10:04 +0100)]
Fix Canvas documentation.
getContext documentation wasn't showing up due to a syntax error:
"any ..."
Also fixed some small issues here and there.
Change-Id: I3c0444d25bd0fea72fb4fcbf07b3e00794ff1414
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Richard Moe Gustavsen [Tue, 14 Oct 2014 08:44:47 +0000 (10:44 +0200)]
text input: always let cursor rect have a width == 1
Instead of using a cursor width of null when a cursor
delegate is set, we should to use a value of 1.
Otherwise the rect we e.g return from cursorRect() will
be invalid. An alternative would be to use the width of
the delegate, but that was found to be controversial.
On iOS we saw a bug with this when telling iOS to position
text spelling popups underneath the cursor. Since the
cursor rect we got was invalid (zero-width), no popup
would show.
Change-Id: Ice51b9a1bd33f331183e3acec61b7d9c0f5163cd
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
J-P Nurmi [Wed, 29 Oct 2014 12:59:46 +0000 (13:59 +0100)]
Repeater & itemviews: fix setModel() JS array handling
QVariant comparison in setModel() started failing because
JS arrays are now passed as a QJSValue. Re-assigning the
same array content should not trigger a model change.
This change restores the old behavior it had before, when
JS arrays were passed as QVariantLists.
Change-Id: I1882b3531f2893b116dbd817edeecab1ae812ce8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Daniel d'Andrada [Fri, 10 Oct 2014 19:54:39 +0000 (16:54 -0300)]
Remove mouse grabber if touch used for mouse emulation has been grabbed
If an item grabs a touch that is currently being used for mouse pointer
emulation, the current mouse grabber should lose the mouse as mouse
events will no longer be generated from that touch point.
Example of what happens without this patch:
-User touches a MouseArea. It gets pressed.
-Some other item grabs that touch.
-This touch eventually ends.
-The MouseArea would still be pressed.
And what will happens instead after this patch:
-User touches a MouseArea. It gets pressed.
-Some other item grabs that touch.
-The MouseArea gets canceled and released
-This touch eventually ends.
Change-Id: I24114f18be564553a4a768243bb20379affe7a8f
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Shawn Rutledge [Thu, 16 Oct 2014 08:10:04 +0000 (10:10 +0200)]
Revert: use the new form of QTranslator::load() for more flexibility
This reverts commit
427646b8d7c52e5b84240e07ffd391217ce3bfa8.
It seems that it should have been more correct, but we are still not
shipping English translations, and static QString find_translation()
in qtranslator.cpp will return any language which is in
QLocale::uiLanguages() for which the translation file is found.
That is a long list on OSX.
Reverting the patch means find_translation() is not called in
such cases. This change can be re-done whenever we are more sure
that the attempt to find a translation will succeed in finding a
sensible one, or fall back to not translating, rather than choosing
a language that the user didn't intend.
Task-number: QTBUG-41977
Change-Id: I425946cc71cec96b4f38629eb2b7e80220c5236d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Jan Arve Saether [Tue, 28 Oct 2014 08:59:23 +0000 (09:59 +0100)]
Do not crash QML apps on startup
This started crashing because of
8f6436f125faae91eb472ddddbbae06dba5da671
Task-number: QTBUG-42227
Change-Id: I9e4862f6008c6ad6ec54469f2b39dd6be583e422
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Mitch Curtis [Wed, 22 Oct 2014 10:43:42 +0000 (12:43 +0200)]
Don't document Context2D's TextMetrics as its own QML type.
It can't be instantiated like a QML type, so it's actually better to
just document measureText() (which is the only way to construct objects
of this type) as returning an object containing some metrics for the
current font. This should have no effect on user code.
This solves the issue of the new TextMetrics type's documentation not
showing up. TextMetrics is a type that *can* be instantiated and is
more feature complete. It provides a declarative API for the functions
that take arguments in QFontMetrics.
Change-Id: I46251e6f3aa7179ab569f5131307181f71043df4
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Simon Hausmann [Mon, 27 Oct 2014 12:51:27 +0000 (13:51 +0100)]
Reduce memory pressure on system malloc when allocating large items on the GC heap
Try to free our large items for every 8 megabytes of additional large item
memory we allocate. This helps in particular on 32-bit builds and was noticable
in tst_qqmlecmascript::push_and_shift().
Change-Id: I4cc0b188e58ccaf32026e38c7aaf1cfadc83148b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Mon, 27 Oct 2014 07:54:26 +0000 (08:54 +0100)]
Don't check the this pointer for 0 in member functions
This actually violates the C++ standard that defines that
you aren't allowed to call member functions on an invalid
object.
Instead insert the 0 pointer checks on the caller side where
required.
Change-Id: I8be3c3831594bb6482e9ef6de6e590ec437ac0f8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Wed, 22 Oct 2014 14:00:35 +0000 (16:00 +0200)]
Reduce size of ArrayData by one pointer
The pointer to the real data is not required anymore, as
it always follows the class itself. Like this we save one
pointer of overhead, and one indirection when doing reads
and writes of array data.
Change-Id: If6afdac8e97b57420b50e7b7eb8979f77e8dbbcf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 21 Oct 2014 12:54:45 +0000 (14:54 +0200)]
Rework our simple array implementation
Implement the simple array as a circular buffer instead
of an array with head room. This fixes a couple of severe
issues with performance and memory management if the array
is being used as a queue.
Task-number: QTBUG-41421
Change-Id: I146ad8a874407c108aa8fe1eae68e9957e154847
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Jian Liang [Sat, 25 Oct 2014 09:15:49 +0000 (17:15 +0800)]
Fix QQmlTypeData object leak
Drop the refcount added in QQmlTypeLoader::getType() to prevent object
leakage in resolveQmlType.
Change-Id: I8bd9c486294912cc00ce5feb350c3ff79c6aac09
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Jan Arve Saether [Wed, 15 Oct 2014 11:58:34 +0000 (13:58 +0200)]
Move action handlers to the Accessible attached object
With this change, instead of writing:
function accessiblePressAction() { submit() }
You should write:
Accessible.onPressAction: { submit() }
For the moment, only 4 actions are added:
press, toggle, increase and decrease.
The old style action handlers are deprecated, and removed from the
documentation. New style action handlers will be preferred in case an
item declares both styles.
Change-Id: I11919e631d8476d55540f94252757b911c44ade4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Jocelyn Turcotte [Thu, 23 Oct 2014 14:01:57 +0000 (16:01 +0200)]
Fix leaks in QQuickImageParticle
Make sure that ImageData instances, m_shadowData as well as the
QSGGeometry of particle nodes are destroyed together with their
QQuickImageParticle.
Also implement the assignment operator for QQuickParticleData to
avoid its v8Datum pointer to be copied over to the shadow datum
in getShadowDatum. This would cause a double delete of the
QQuickV4ParticleData when trying to call clearShadows() in the
destructor.
Task-number: QTBUG-36782
Change-Id: Ie03f2be0415daeb7f4f6e5f92295a3ab26a62155
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Shawn Rutledge [Fri, 17 Oct 2014 06:46:30 +0000 (08:46 +0200)]
QML State Machine plugin: correct URL in Q_PLUGIN_METADATA
org.qt-project.org is redundant
Change-Id: Id6a6794e1fc1e4403b3bfcdebbe06a487f904041
Reviewed-by: Sebastian Sauer <sebastian.sauer@kdab.com>
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Frederik Gladhorn [Thu, 16 Oct 2014 12:18:19 +0000 (14:18 +0200)]
Remove logic that some accessible objects cannot have children
There are many places where this doesn't make sense (a button in a
search field, a line in a list represented as button with a child button
to remove the list item...).
Change-Id: Iab1d411adda696a01b1dcfdebb0a250066d6a7c2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Frederik Gladhorn [Thu, 16 Oct 2014 16:01:22 +0000 (18:01 +0200)]
Expose searchEdit accessible property to Qt Quick
Change-Id: I9230deaa75d1e9a9614f364d4adf92349c8a1901
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Ulf Hermann [Fri, 24 Oct 2014 13:06:22 +0000 (15:06 +0200)]
Properly handle negative years when printing JS Dates to strings.
JavaScript knows a year 0. That is correctly translated into QDateTime
terms when creating a Date object, but it's not correctly translated
back when converting the JavaScript date to a string.
Task-number: QTBUG-29491
Change-Id: I46b200a144434187656d08e87f422f97523acd0e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Thu, 23 Oct 2014 10:05:44 +0000 (12:05 +0200)]
Fix syntax error when trying to declare read-only object properties
The grammar did not allow for the declaration of
readonly property QtObject foo: QtObject { ... }
and it required a workaround through an alias:
readonly property alias foo: _foo
property QtObject _foo: QtObject { ... }
This was merely a glitch in the grammar, I see no reason not to support this.
The semantics are like a const pointer in C++, the property itself is read-only
but the object pointed to has per-property defined read/write semantics.
Task-number: QTBUG-41971
Change-Id: I99e2e7ed58731e387a38e46ec39922d280a21ceb
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 23 Oct 2014 07:50:12 +0000 (09:50 +0200)]
Fix license headers in Qml grammar specification
The grammar file itself wasn't updated accordignly and the license headers that
are embedded in the grammar that will be copied into the generated files were
also oudated. Re-generating the parser would produce files with the wrong
license headers.
Change-Id: I1db83df8a9c4bddfb58901f41a4d40f6b1396507
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Alex Blasche [Mon, 20 Oct 2014 11:07:21 +0000 (13:07 +0200)]
Fix crash in SpriteSequence
When QML declares sprites and goalSprite in wrong order the goalsprite
attempts to set it on null spriteEngine. This patch ensures that the
order doesn't matter anymore.
Task-number: QTBUG-40595
Change-Id: I57f1c8754b2e2af91e0c7f72d1d67fec3ad4ede5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Venu [Thu, 23 Oct 2014 14:32:47 +0000 (16:32 +0200)]
Doc: Updated the code snippets for the toLocalexxx functions
Using Date() as a regular function without the new operator
returns a string and not a date object.
Change-Id: I083bb62c0cb3041a053d43e3085c3d0d10423db6
Task-number: QTBUG-41712
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Samuel Nevala [Wed, 22 Oct 2014 12:03:51 +0000 (15:03 +0300)]
Android: Keyboard doesn't hide from done button
QLineEdit closes input method on enter key press, TextInput
should also do the same. Commit and hide input method on enter
key. When Qt::ImhMultiLine input method hint set only commit.
Task-number: QTBUG-37850
Change-Id: I5a06e3eb777d7f794dd1493b307f0b05a2caf281
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Ulf Hermann [Thu, 23 Oct 2014 14:01:06 +0000 (16:01 +0200)]
Stop waiting in QTcpServerConnection if waitForBytesWritten fails
There is no point in waiting any further for the remaining bytes to be
written as it will never succeed. We might get luckier by creating a
local event loop and repeatedly calling processEvents(), but as that is
considerably worse style and because you shouldn't rely on the
connection to send on exit anyway we don't do that.
Task-number: QTBUG-42158, see also QTBUG-24451
Change-Id: I79ffd5f5a4a7c41ff8dc0c4f6f1ca7e091844c9d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Samuel Gaist [Wed, 22 Oct 2014 22:34:09 +0000 (00:34 +0200)]
Fix build with QT_NO_DEBUG_OUTPUT defined
The use of the qDebug() macro to construct a QDebug object fails when
QT_NO_DEBUG_OUTPUT is defined when building Qt.
This patch aims to fix this.
[ChangeLog][General][Build] Can now build with QT_NO_DEBUG_OUTPUT
defined
Change-Id: If807ee3439db2a98b4d146f75860a98f40c247ec
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Kai Koehne [Thu, 23 Oct 2014 14:51:41 +0000 (16:51 +0200)]
QmlEngine: Use separate mutex for network access manager
Creating the network access manager can involve blocking calls to DBus,
which apparently can take quite long in pathological cases. Using the
same mutex in this case like for instance registering objects can
therefore result in a freezing UI.
Mitigate this by introducing a separate mutex.
Task-number: QTBUG-41183
Change-Id: I55bd8453d8e4bbc0bda1591eb3fd48b50ca921c1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Thu, 23 Oct 2014 09:28:22 +0000 (11:28 +0200)]
Fix pixelgrid snapping of native text on retina displays.
Change
63e6c9ada82dc8f16e705cef5f89292784b7ace4 introduced snapping to
the pixel grid in the vertex shader for native text, but this code was
broken on retina displays because it assumed integer only positions.
Fix it by including the retina scale factor into the rounding.
Task-number: QTBUG-38702
Change-Id: I84492b02d64f263c9fe030790e04cf79b0dc4e2f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Eskil Abrahamsen Blomfeldt [Wed, 22 Oct 2014 14:16:56 +0000 (16:16 +0200)]
Relayout rich text when width increases
In updateSize() we were trying to force relayouts for RichText
when the width changes by always setting widthExceeded to true.
But further down in the same function, we overwrote this
with textWidth() < idealWidth(), which doesn't work, because
both properties are the wrapped width of the document and
should only differ if the text cannot be wrapped properly.
The result was that when increasing the width of a Text element,
we would hit the optimization and skip the relayout.
[ChangeLog][Text] Fixed Text with the RichText format to
correctly update wrapping when the width of the element grows.
Change-Id: I5fd87052a5ba7e8ee2549be0cfac4adc8ddf8290
Task-number: QTBUG-33020
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Laszlo Agocs [Mon, 20 Oct 2014 11:54:26 +0000 (13:54 +0200)]
Remove unnecessary doneCurrent in QQuickWidget
Excessive makeCurrent - doneCurrent pairs should be avoided. We already
do this in QOpenGLWidget and the QPlatformBackingStore composition code.
Remove the doneCurrent from QQuickWidget too.
Change-Id: I6f998d381c33880c470f34d7c8462b6ed8cd8ae9
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Venu [Tue, 7 Oct 2014 14:16:13 +0000 (16:16 +0200)]
Doc: Fixed an error in the QML snippet
Also updated the C++ snippet to look like a
gui app that shows the QML example, instead of
a console app that just provides the context data
to the QML example.
Change-Id: I17aca9f03521cfcadba1a965a4924e87cbf14c62
Task-number: QTBUG-41699
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Simon Hausmann [Wed, 22 Oct 2014 14:47:01 +0000 (16:47 +0200)]
Fix assignment to QObject pointer properties
This commit ammends
59ed8c355b99df0b949003a438ab850274261aa0 to always query
the Qt meta-type registry to retrieve the QMetaObject for a QObject pointer
type.
Change-Id: I70d876a5acfa23967fd1a57c96fcd5ac853eaf49
Task-number: QTBUG-39614
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Shawn Rutledge [Fri, 17 Oct 2014 12:24:07 +0000 (14:24 +0200)]
Screen attached property: expose devicePixelRatio property
Change-Id: I08b22766b3e389b7d27ca4c56729f550b0647a08
Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Alex Blasche [Mon, 20 Oct 2014 13:46:58 +0000 (15:46 +0200)]
Fix non-compiling QtQml code snippet
Task-number: QTBUG-42006
Change-Id: I3c59b0ba27518750cba667f414f58edaa136d250
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Laszlo Agocs [Wed, 22 Oct 2014 09:59:02 +0000 (11:59 +0200)]
Add high dpi support to QQuickFramebufferObject
Change-Id: I58aa163bd17fae7190161641d94f51887d8f88a6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Simon Hausmann [Tue, 21 Oct 2014 09:05:00 +0000 (11:05 +0200)]
Reduce memory pressure on the JS stack during garbage collection
As the example in QTBUG-42051 demonstrates, QML may produce a lot of binding
objects and each of them produce a QV4::Persistent. During the mark phase we
may run out of JS stack space. One fix (for the future) is to reduce the number
of QV4::Persistent objects, but in the meantime we can also reduce the pressure
on the stack by draining it earlier.
Task-number: QTBUG-42051
Change-Id: Iea73f8a869048ea0bf3f4a64dbd24b6fb8c68f6b
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Kai Koehne [Wed, 22 Oct 2014 12:57:51 +0000 (14:57 +0200)]
Fix line ending for test file
Task-number: QTBUG-40574
Change-Id: If1fcc4cb00c8e477b3afff92eb4a3099424fcfa6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Mitch Curtis [Thu, 16 Oct 2014 09:06:32 +0000 (11:06 +0200)]
Add note to QQuickItem docs about directly setting properties in C++.
It's not obvious that calling setPosition() directly, for example,
won't trigger animations defined in behaviors that react to that
item's x and y properties changing, because a quick glance at the
code shows that they have almost identical code paths and both
emit geometryChanged().
Change-Id: Ic7f7019b1bbba24732569c0de777ee02d79c1d3b
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Jocelyn Turcotte [Tue, 21 Oct 2014 15:12:30 +0000 (17:12 +0200)]
Fix a PIDLIST_ABSOLUTE leak in QQmlEngine on Windows
The documentation of SHParseDisplayName doesn't mention that you need
to free the ppidl parameter, but the documentation of the ITEMIDLIST
does mention that you need to ILFree any ITEMIDLIST passed as
PIDLIST_ABSOLUTE.
Reproduced the leak by repeatedly showing and closing the window on
the task's example.
Task-number: QTBUG-41588
Change-Id: I91d08728fc907c59e56ae344a2d12f0865031120
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Laszlo Agocs [Wed, 22 Oct 2014 08:27:46 +0000 (10:27 +0200)]
Fix disfunctional QQuickRenderControl with multiple screens
Having a retina and non-retina screen connected resulted in getting
no output from QQuickRenderControl and QQuickWidget on the
non-retina screen.
This is caused by the fact that Quick is blindly calling
QWindow::devicePixelRatio(). This approach is wrong when using
QQuickRenderControl since the QQuickWindow does not have an actual
native window and so devicePixelRatio() merely returns some default value
which will definitely be wrong for one of the screens.
The patch fixes the problem by introducing
QQuickWindow::effectiveDevicePixelRatio(), which, via
QQuickRenderControl::renderWindowFor, supports the redirected case too.
Task-number: QTBUG-42114
Change-Id: I057e01f0a00758dde438fc9b10af3a435b06bb0b
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Mitch Curtis [Tue, 21 Oct 2014 17:50:54 +0000 (19:50 +0200)]
Add \since 5.4 to FontMetrics and TextMetrics.
Change-Id: I5fa93d559cdfde5e6b84ab0f3f35fd600e6bec4f
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Jan Arve Saether [Thu, 25 Sep 2014 09:41:44 +0000 (11:41 +0200)]
Support Accessible.ignored on non-leaf items
Ignoring items with children will make the children appear as children of
the parent of the ignored item.
Since setAccessibleFlagAndListener now only sets the flag we also rename
the function to just setAccessible
Change-Id: I79fc311509a3e454b4698274c63ad0e879fb93e3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Ulf Hermann [Tue, 21 Oct 2014 11:53:43 +0000 (13:53 +0200)]
Check list property before component when validating bindings
There are lists that won't accept a component as element. For example
QQuickItem's children will only accept QQuickItems.
Task-number: QTBUG-41848
Change-Id: I0fc7b0d1a4770d596caf681be92dff216f48d32b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Jan Arve Saether [Fri, 22 Aug 2014 11:12:46 +0000 (13:12 +0200)]
Fix a bug in implementation of Accessible.ignored
m_ignored is not really used.
(cherry-picked from dev branch:
2c42d6af19f57ae013da0a4c45b6e1de8fb99e99)
Change-Id: Ic2926fbdf22a6a5bc82fe9f4475b7b8058eacae5
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Andy Nichols [Tue, 14 Oct 2014 13:31:05 +0000 (15:31 +0200)]
QQuickCustomParticle: Check for current OpenGL Context before use
QQuickCustomParticle::buildCustomNodes() assumes there is a valid OpenGL
context, but when there is not it will simply crash. Instead we check
for a valid current OpenGL context first, and return 0 if it is not
availalbe. This needed for the Qt Quick 2d Renderer.
Change-Id: I6bfcfc8fa9581bfd27015f719fc527c36492eade
Reviewed-by: aavit <eirik.aavitsland@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Andy Nichols [Tue, 14 Oct 2014 13:14:13 +0000 (15:14 +0200)]
QQuickSpriteEngine do not use OpenGL without checking for GLContext
In the case that QQuickSpriteEngine::assembledImage() is called when
there is no current OpenGL context, return a null QImage instead of
crashing. This is needed for the Qt Quick 2d Renderer case.
Change-Id: I75b9b1f31f05cc0800293435d660e498fecc4d20
Reviewed-by: aavit <eirik.aavitsland@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Jan Arve Saether [Thu, 25 Sep 2014 09:40:21 +0000 (11:40 +0200)]
Don't assume there is only one toplevel item.
With the upcoming introduction of unignoredChildren, there can
exist many top level items (if the root item is ignored).
Change-Id: If7aaea08fdd4d1f5a0a5109e1239c53e0af9b61e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Jan Arve Saether [Wed, 10 Sep 2014 11:10:19 +0000 (13:10 +0200)]
Improve hit testing so that it works better with ignored items
The hit testing won't work very well with the upcoming patch that
changes which items that can be ignored.
(basically it doesn't consider the isAccessible flag,
so childAt_helper might return a node that was supposed to be ignored)
Earlier this was a sensible optimization in order to avoid too many heap
allocations and deallocations of interfaces, but these are cheap now, so
we can do it the do it the 'proper way' (i.e. before this patch we
didn't respect the a11y hierarchy as given by QAccessibleInterface
child() and parent(). This also uses the QAccessibleInterface::rect()
directly now instead of using the itemScreenRect() function, which
was shared between QAccessibleQuickWindow and QAccessibleQuickItem.
Since this changes the order of child interfaces to paint order (i.e.
second child interface is on top of first child interface), we need to
ensure that we hit test child interfaces in the correct order.
They should now always be processed with the last interface first, and
then return as soon as something is hit.
Change-Id: Ie951fc3b48b7affd9f7e98687a1cbbe008857d2a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Laszlo Agocs [Mon, 20 Oct 2014 11:46:13 +0000 (13:46 +0200)]
Fix failing makeCurrent in basic renderloop when closing windows
The makeCurrent() call can fail if there is no underlying platform
window present anymore (due to close()).
Just continuing with the cleanup is wrong: There may be another context
current (from the application or from some other component of Qt) and
there are GL calls issued which would mess up the state in that context.
Therefore we ensure there's a context/surface by using a temporary
QOffscreenSurface.
Task-number: QTBUG-41942
Change-Id: I79f35a1f5bbe7a8a14943e8603764575ed119f93
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Kevin Funk [Thu, 9 Oct 2014 14:05:33 +0000 (16:05 +0200)]
qmlstatemachine: Rename StateBase to State
As discussed with Brett Stottlmyer and Alan Alpert.
Add a section about the implications when importing both
QtQml.StateMachine
and QtQuick in one single QML file.
Change-Id: I8755f4b578e2a6ff4c2377c7a8a0b996ba9b7129
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Mon, 20 Oct 2014 11:58:33 +0000 (13:58 +0200)]
Tweak new animation driver.
We're removing the bad/reallyBad concept for the benefit of an
accumulated lag. When the lag passes over a certain threshold, we
switch to time based. The logic for switching back remains unchanged.
We also fixed the switching so that elapsed() does not jump from the
predicted time to the animation system's wall time, but rather
continues from the predicted time with a walltime offset (this is how
it was always intended to be).
Task-number: QTBUG-42020
Change-Id: I7ee9181aca46cbc18a74fae5e8d513365906c017
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Jan Arve Saether [Tue, 23 Sep 2014 09:24:58 +0000 (11:24 +0200)]
Make test more robust against ignored children.
With the upcoming change that changes the semantics of
Accessible.ignored, some assumptions in the test does not hold anymore.
Change-Id: I9b34f1ecc61fc0d4e8abe5a5505a5bcff44501d4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Frederik Gladhorn [Mon, 20 Oct 2014 13:00:39 +0000 (15:00 +0200)]
Fix tst_qquickpositioners on OS X
Done-with: Jan Arve Sæther
Change-Id: Iff66f62167a5977354319aac311d2cb81d9f3842
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Simon Hausmann [Tue, 14 Oct 2014 16:29:13 +0000 (18:29 +0200)]
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Frederik Gladhorn [Tue, 14 Oct 2014 12:04:48 +0000 (14:04 +0200)]
Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts:
src/qml/jsruntime/qv4objectiterator.cpp
src/qml/jsruntime/qv4objectiterator_p.h
src/quick/scenegraph/qsgthreadedrenderloop.cpp
Change-Id: Ia54a9acd96530aa6683c228597af0ca25eadec4f
Kari Hautamäki [Wed, 24 Sep 2014 07:05:02 +0000 (10:05 +0300)]
examples/quick/positioners: Colors changed and layout obeys screen resolution
Change-Id: I61b6358d6d5dff4cc9a14f8774b1c3597e83b550
Reviewed-by: Martin Smith <martin.smith@digia.com>
Mitch Curtis [Sun, 12 Oct 2014 09:59:13 +0000 (11:59 +0200)]
Correct KeyEvent::key documentation.
"text" is a property, not a function.
Change-Id: I02158d550ff174076396810dca007df1d734bda5
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Gunnar Sletta [Tue, 7 Oct 2014 10:22:26 +0000 (12:22 +0200)]
Improve performance of animators.
The use of one QCoreApp::postEvent() per completed animation added up
to a very large overhead when 1000+ animators were used at the same
time. This is very relevant for sprite games and similar and deserves
to work at least as good as normal animations.
Instead, store the animations to stop and stop then on the gui thread
later as a result of frameSwapped. For the benchmark in question this
allows for roughly double the amount of animators being started and
stopped.
Change-Id: Iae3d1ec1502ee1908fdbba708fa9f976aa230064
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Mitch Curtis [Wed, 1 Oct 2014 10:40:47 +0000 (12:40 +0200)]
Fix issues with Keyboard Focus documentation.
Change-Id: I0dcc364456404a761a555da065452a59d1249a2f
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Gunnar Sletta [Wed, 8 Oct 2014 16:14:43 +0000 (18:14 +0200)]
Stabilize and fix comparisons in animator tests.
compare() will compare properties of objects and neither Qt.rgba nor
image.pixel created objects has enumeratable properties so compare
is pretty much useless. Use verify + == which will rely on toString()
which is ok.
A few of the tests relied on execution order of signals emitted on
animation.running being changed and would occasionally fail.
Change-Id: I531c7f21b58a922a6be9ca2b6de120a68209a6d6
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Sérgio Martins [Tue, 30 Sep 2014 12:23:56 +0000 (13:23 +0100)]
PathView: Fix QML engine thinking currentItem is null when it's not
QML didn't re-evaluate any bindings using currentItem because a
notification was missing.
Change-Id: Icdaa3022e0b01644a060e577d87f011b4ea9fabb
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Simon Hausmann [Sat, 4 Oct 2014 15:18:15 +0000 (17:18 +0200)]
Fix QQmlExpression/QQmlScriptString/QQmlBinding crashes
In the QQmlScriptString we store the binding id and it is an index into the
runtimeFunctions array of the compilation unit. However we don't store the
compilation unit and instead in QQmlBinding and QQmlExpression try to retrieve
it from the cache via the context url (we have the context after all). That
turns out to be not a reliable way, as sometimes the URL might slightly differ
from the originally compiled cache (qrc:/// turning to qrc:/ maybe).
Consequently the type is (unnecessarily) compiled again and unfortunately not
_linked_, therefore the runtime functions array is empty. Another option is
that when the component was created from a QByteArray, then no entry exists in
the cache in the first place.
This patch addresses the problem by storing a reference to the compilation unit
in the QQmlContextData. That we can safely retrieve and it'll make sure the
compilation unit also stays alive.
In the process of that the manual reference counting was switched over to
QQmlRefCount and QQmlRefPointer for QV4::CompilationUnit.
Task-number: QTBUG-41193
Change-Id: I9111f9a3b65618e453954abcd789c039e65a94f7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Giulio Camuffo [Tue, 9 Sep 2014 12:06:36 +0000 (15:06 +0300)]
Return the content position rounded on the right side
QQuickFlickable::contentX/Y() returns the negative of the value
stored in the QQuickTimeLineValue used by QQuickFlickable.
So we must be careful when using things like qRound, and call it
with the negative of the value ine the QQuickTimeLineValue, else
code like this would fail:
QQuickFlickable *f = ...
f->setPixelAligned(true)
f->setContentY(-10.5)
assert(f->contentY() == qRound(-10.5)) // fail
The assert expression indeed turns into -11 == -10, which is false
but which is not what the user would expect.
Change-Id: Ib92ee2fa613b751462237349d9e4e2f2b4652f82
Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
Oleg Shparber [Fri, 3 Oct 2014 06:10:53 +0000 (23:10 -0700)]
Export QQuickKeyNavigationAttached as a part of the private API
This change fixes linking problems when QQuickKeyNavigationAttached
is used through private headers.
Change-Id: I176a9551718d9ba25c160a3b1caa8872c88d39f3
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Oleg Shparber [Sat, 4 Oct 2014 21:28:22 +0000 (14:28 -0700)]
Make QQuickKeyNavigationAttached respect user set values
Before this change, when user tried to set KeyNavigation property
to the value which was previously automatically assigned, user set
flag wasn't raised. Such behavior led to situations, when explicitly
set values later were not respected by automatic mutual changes.
Change-Id: Id5ba5061c03a61f4d7835a638dc746b1485b9a56
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Venu [Wed, 24 Sep 2014 15:11:11 +0000 (17:11 +0200)]
Doc: Updated the QML State Machine docs
- Excluded the src/imports/statemachine directory from
qtquick.qdocconf to avoid unnecessary qdoc warnings.
- corrected a broken link to an external source
- changed the group name to avoid collision
- added a \qmlmodule page for QtQml.StateMachine
- Reduced the amount of duplication between the
C++ and QML state machine overviews.
Task-number: QTBUG-41561
Change-Id: I87c815fada7006f0609331e315bb338f062bb4db
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Venu [Tue, 7 Oct 2014 15:39:30 +0000 (17:39 +0200)]
Doc: Updated the \brief and detailed description
Just to give a hint to the reader about what the
example does.
Task-number: QTBUG-37203
Change-Id: Ibb377e4adfb25ed4e4da0a41280e4157fae638ba
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Gunnar Sletta [Mon, 6 Oct 2014 19:13:18 +0000 (21:13 +0200)]
Fix memory leak and crash with transform animators.
Every time initialize() was called, we would increment the ref on
an item. However, initialize is called every time the job is started,
so the ref would increase and only decrease once, leading to a leaked
helper. Change it to only increment the first time.
A different problem was that when an item was destroyed, we could run
the risk of the QQuickTransformAnimatorJob destructor being called
with the helper's item being null. This would lead to the helper not
being removed from the cache and a dangling helper would remain in the
transforms cache. Now change it so that when a target is destroyed, we
explicitly destroy the helper as well (as no animation can happen then
anyway) and reset all pointers in the job.
Change-Id: I1ce76db134bbc1871d32f1224ba5b68a4a4eeafa
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Gunnar Sletta [Fri, 3 Oct 2014 14:12:56 +0000 (16:12 +0200)]
Remove alpha channel from images that doesn't actually have alpha.
We did this for QPixmap since forever, and it has a huge impact
on rendering performance, so there is no reason why we shouldn't
spend that extra bit of time.
Change-Id: Ibd2e6d585525a5b5a975b8d7498c21dec00647c5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Gunnar Sletta [Thu, 2 Oct 2014 10:05:14 +0000 (12:05 +0200)]
Compare doesn't work for colors, so compare the channels explcitily.
Change-Id: I7a21328700c85b5b79dbb4342817e28833dece70
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Gunnar Sletta [Thu, 2 Oct 2014 10:03:27 +0000 (12:03 +0200)]
Relax ShaderEffectSource's sourceItem vs window handling.
For dynamically loaded items, the window may not be set
on either the source or the item, so we need to be a bit
more relaxed in our checking.
This fixes a regression for dynamically loaded GaussianBlur.
Change-Id: I3e888405a95058ca79ecd2dff42c0ed4c8fff065
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Eskil Abrahamsen Blomfeldt [Wed, 8 Oct 2014 10:30:27 +0000 (12:30 +0200)]
Fix missing glyphs in selection
Change
198009db79a85d3cab7fe3a6432635d36123a2d6 revealed a bug in the
new selection algorithm which would occur sometimes
when a given run of text spanned several script items. Since we
are checking the glyph runs for overlaps in the actual text, we
need to report the exact characters spanned by the glyph run. We
use the new enabler for this in QGlyphRunPrivate.
Added a new test case which is an error case we did not yet cover,
which is when there is only a single script item, but several
font engines are used to produce it (fallback fonts).
Change-Id: Ie4c3e79ad98a033d5c75fd67ada4ae83df33435b
Task-number: QTBUG-41808
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Friedemann Kleint [Tue, 7 Oct 2014 12:28:49 +0000 (14:28 +0200)]
Temporarily skip tst_qquickframebufferobject when using ANGLE.
Task-number: QTBUG-41815
Change-Id: I5c6ec36a4f8830d95e1d4904d1be41d752757339
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Shawn Rutledge [Thu, 9 Oct 2014 08:09:24 +0000 (10:09 +0200)]
QQuickWindow autotest: focus transferred to parent on window close
These bugs were fixed so XFAIL is no longer necessary in the autotest
(change
da0c74550f0e8a21239896d6aead6e05f85eb695 in qtbase).
Task-number: QTBUG-33423
Task-number: QTBUG-39809
Change-Id: Ia89554b9f54aca7ef6c6ac6b474ca2bb9c0f5629
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Zeno Endemann [Tue, 30 Sep 2014 12:02:45 +0000 (14:02 +0200)]
Prevent removeFirst call on empty list.
The hoverItems list might get changed as a result of the sendHoverEvent
call, so it is safer to take the element out first.
Change-Id: I88c7380a2e4dd2297f9d0cfe01edc453ca525cb3
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Shawn Rutledge [Thu, 4 Sep 2014 12:29:21 +0000 (14:29 +0200)]
use the new form of QTranslator::load() for more flexibility
As the docs explain, the variant of QTranslator::load() taking a
const QLocale& is better because it "uses QLocale::uiLanguages()
and not simply the locale name, which refers to the formatting of
dates and numbers and not necessarily the UI language." And, using
a default-constructed QLocale permits QLocale::setDefault() to
override the system locale, so for example an application's
main.cpp can do that before constructing a QQmlApplicationEngine.
Task-number: QTBUG-7329
Change-Id: Ia29a4c894087c92b071c0fe484728866f2660fe6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Shawn Rutledge [Tue, 30 Sep 2014 07:00:21 +0000 (09:00 +0200)]
documentation for qmldir "depends" declaration
[ChangeLog][QtQml][qmldir] added the ability to declare dependencies
on other modules in a module definition qmldir file
Task-number: QTBUG-41489
Change-Id: Icd526bc7617bc3e4f725c7d008d0522a201cf645
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Shawn Rutledge [Thu, 25 Sep 2014 16:28:27 +0000 (18:28 +0200)]
qmlimportscanner: parse "depends" lines in qmldir files
These lines specify additional hidden dependencies. The first use case
is in QtQuick.Dialogs: DefaultFileDialog.qml uses FolderListModel, but
this file is not listed in the qmldir because the decision whether to
use it is made at runtime. So QtQuick.Dialogs qmldir contains this:
depends Qt.labs.folderlistmodel 1.0
Task-number: QTBUG-41489
Change-Id: Ide4bca2ce2e342b95e9a87cc418d26f331372d12
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Shawn Rutledge [Wed, 24 Sep 2014 15:36:53 +0000 (17:36 +0200)]
qmldir parser: add support for "depends component version" syntax
Dependency declarations are initially for the benefit of
qmlimportscanner which does not (yet) use this parser. This patch
adds support for dependencies into the qmldir parser for completeness,
along with autotests. It is necessary to prevent errors at runtime
when parsing a qmldir which contains the "depends" declaration.
Task-number: QTBUG-41489
Change-Id: Ief2524a30140c42874f94f1735755b171e15dcf7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Gunnar Sletta [Wed, 1 Oct 2014 09:12:18 +0000 (11:12 +0200)]
Partially revert
d9c531781e6c95f80681b3c82700833e1de88794
This logic changed then timing for when the layer's m_dirtyTexture
was set and unset, which had some side effects. Revert to the old
and known-to-work behavior of using a connection.
Change-Id: I4048e7ae70491afe36b2d766e6c506d9febc44ed
Task-number: QTBUG-41451
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Fri, 26 Sep 2014 17:43:52 +0000 (19:43 +0200)]
Make Canvas use texture atlas for smallish Image based canvases.
This makes Canvas with Image batchable in the renderer which
means that it is feasible to have 100s of small Canvases in a
scene, for instance as static icons rendered with a bit of
script.
Change-Id: I3ad57360d632b7093fd6993afa88ed35c21d178a
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Mitch Curtis [Tue, 30 Sep 2014 08:40:40 +0000 (10:40 +0200)]
Document that QQmlApplicationEngine's root item must be a window.
Change-Id: I22466e82105c9b56894a53400394d1124191f93d
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Lars Knoll [Tue, 2 Sep 2014 12:48:03 +0000 (14:48 +0200)]
Fix compiler warning
Add a matching operator delete to our operator new to shut
up MSVC.
Task-number: QTBUG-40652
Change-Id: I1396094d23c4d0cfc88a73fabbab05f1d4ec7b44
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Topi Reinio [Wed, 24 Sep 2014 12:37:46 +0000 (14:37 +0200)]
Update the Calqltr demo visuals and engine logic
- Add logic for displaying the calculation result in the best
available precision, determined by the display width
- Display 'ERROR' when the result cannot be displayed
- Animate the number pad button colors to react to presses and
visually disable them when pressing the button has no effect
- Fix issues in calculator.js logic
- Update documentation accordingly
Task-number: QTBUG-41253
Change-Id: Ibed7b8218ea4cd074b8f9b90d9bb4e3ea6b25ba2
Reviewed-by: Johanna Äijälä <johanna.aijala@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Topi Reinio [Fri, 26 Sep 2014 13:00:14 +0000 (15:00 +0200)]
Doc: Combine the extending QML tutorial chapters into a single example
Combine the six examples associated with each tutorial chapter
into a single, top-level example project 'extending-qml', with
subprojects for each of the tutorial chapters.
Clean up the docs, add links, and a note about a warning that
the user may see when running the code in the first chapter.
Task-number: QTBUG-32947
Change-Id: Idba4e2153817ab29f1afaf1947d1f2e25964e7b3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Sérgio Martins [Thu, 25 Sep 2014 20:02:04 +0000 (21:02 +0100)]
Fix build when using -Werror
"'borderBottom' may be used uninitialized in this function [-Werror=maybe-uninitialized]"
Observed when compiling for android.
Change-Id: Ifcb26e28440f08528a192ea2fe88d6343e33710b
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Alex Blasche [Wed, 24 Sep 2014 10:08:10 +0000 (12:08 +0200)]
Add orientationUpdateMask to QQuickScreen
Task-number: QTBUG-38699
Change-Id: I173b7e53c27dba336351572859f7c9aeafe07ef9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Andrew Knight [Wed, 24 Sep 2014 07:29:39 +0000 (10:29 +0300)]
Revert "Temporarily mark grab()/item.layer tests insignificant under ANGLE"
This reverts commit
6b31418a1b5d9be47df5ed61747e8a5fb225acfa.
These tests now pass with the latest ANGLE.
Change-Id: If812d430e69f0d39a970e9119ebc1f2e5b4886dc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Andrew Knight [Wed, 24 Sep 2014 09:09:50 +0000 (12:09 +0300)]
Partially revert "Disable tests on failing ANGLE config"
This partially reverts commit
fa29df24bd2792f5eb64e4ff21a116b2c5f5384c.
The sprite sequence test now passes in CI under MSVC2010.
Change-Id: Ie8f7abdd2ff00db377b1ef3f221c5048c430c067
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Simon Hausmann [Mon, 29 Sep 2014 11:21:09 +0000 (13:21 +0200)]
Fix example in scope documentation
The example tried to demonstrate the use of direct access to properties of the
root component object, but unfortunately it also defined an id property that
clashed with it. Therefore the provided example did not work as intended and
produced a "stringified" object reference instead of the text of the "title"
property.
This patch changes the id to avoid a clash.
Change-Id: Ib9abcf48482773a0dcdf5e2375d1445d87ccf4ef
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Mitch Curtis [Tue, 23 Sep 2014 08:36:22 +0000 (10:36 +0200)]
Also search for visual children in TestCase::findChild().
It previously used QObject::findChild(), which won't work in all cases,
because items like ListView don't seem to make their delegate items
QObject children, while simple nested Items do.
Change-Id: I1a8ed1fb55493212cb25abf595d016437812a80f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>