Commit Graph

1700 Commits

Author SHA1 Message Date
Yoann Lopes ace4b5881c Distance field glyph cache refactoring.
The distance field glyph cache is now an abstract class part of the
adaptation layer. It can be implemented to define the way the glyphs are
stored in graphics memory on a specific platform. The typical use case
is for having a cross-process glyph cache. To implement a custom glyph
cache, one has to override three pure virtual functions: requestGlyphs(),
storeGlyphs() and releaseGlyphs().

The default implementation works the same way as before the refactoring
(no cross-process cache).

Change-Id: I6e231a119abbffbe36f5f0d690f0b8be0664ff4f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-11-14 15:28:43 +01:00
Kim Motoyoshi Kalland fd58c5fc9f Improved QQuickShaderEffect::lookThroughShaderCode() performance.
Removed use of regexp. Skip comments and compiler directives in
the shader code. Don't look through default shader code.

Task-number: QTBUG-22423
Change-Id: Ie08cd8288ba7d7a33f1e3b0dc2ab5f2bedad04dd
Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
2011-11-14 14:19:34 +01:00
Alan Alpert 7dc37bc9b5 Get tst_examples passing again
Shared QDeclarativeEngine sidesteps GC slowdown issue.

New approach also verifies that the root object successfully loaded,
this picks up all the cases where it did not successfully load before.
Most of these were because they weren't importing QtQuick 2.0, import
statements have been updated. One was because it does not create a
QQuickItem root, it has been manually excluded. This required adding per
file exclusions to the current directory exclusions.

Change-Id: I809f0f20acc319aef58ba2e30e672e32f640686d
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-14 08:16:36 +01:00
Martin Jones 21de6faafe autotest for setting parent in a component created by Loader.
Change-Id: I1b6850ce5e4a820b5ab7b2d06a877307104478a1
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2011-11-14 06:38:57 +01:00
Charles Yin c430ff551d Fix memory leaks&uninitialized members in QQuickContext2D&QQuickContext2DTexture
1) Delete m_buffer in QQuickContext2D::~QQuickContext2D
2) Add a default ctor for QQuickContext2D::State, although the reset() method is
   always called, but the valgrind still complains the "uninitialized" error, so
   add this to make an explicit initialization.
3) m_item in QQuickContext2DTexture is also not initialized.

Change-Id: Ie6c74136342d7f0ff8dc268d5d6b976c95ff52f1
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2011-11-14 06:38:57 +01:00
Yann Bodson 080af75aca Text.onLineLaidOut doc does not appear
Task-number: QTBUG-22706

Change-Id: I2b8b7d4012e48ff4226f060a5ce38d2acdab0deb
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-14 05:01:20 +01:00
Alan Alpert d7e6194b7b Don't clobber unified timer settings
Change-Id: Iee43b566180471e08d655a4d2af72e9586227532
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2011-11-14 01:52:06 +01:00
Kai Koehne 2557ff5a94 Debugger: Remove option to constantly send tracing data
Change-Id: I392277453aa34498549e39182accf7797a262504
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2011-11-11 16:39:03 +01:00
Aurindam Jana 40360f040d QV8ProfileService: Code refactor
Define sendProfilingData() to send data to client.

Change-Id: I1f4778946af4552ef6323c78a538ab7149990b0a
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2011-11-11 14:56:27 +01:00
Aurindam Jana f15b7a0ffb QV8Profiler: Rename the global static instance
Change-Id: Iecd2856a36c7cf364f3d18288c2974a3bc29f91f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2011-11-11 12:59:02 +01:00
Jędrzej Nowacki e6a9ff7a11 Add missing includes.
We want to move forward declarations in qtbase. It is not good
to depend on qmetatype.h to do all forwarding.

Change-Id: I7d5ecec239e6c2ce5576b19f7af1c6d8d8222e7e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-11 12:59:02 +01:00
Aurindam Jana a7f5c93de3 QV8Engine: Console APIs
Modified functionality for console.log, console.debug. Added
script and line information. Added functions console.warn
and console.error.

Change-Id: Id9f4dce5658a09b00522f8e087caf8f4242f418a
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-11 12:59:02 +01:00
Kai Koehne 3346a77474 Debugger: Fix trace service for tracing on startup in block mode
Don't call QDeclarativeDebugTrace::instance() inside messageReceived,
since messageReceived() will be called for the first message while
the constructor is still running.

Also add proper autotests for qdeclarativedebugtrace.

Change-Id: Ic37d077d93ad4957fb21035abe40b2d281278314
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2011-11-11 11:21:06 +01:00
Glenn Watson 2a812493bc Support JS objects in ListModel via QVariantMap
Added support for the new listmodel implementation to store and
retrieve JS objects via QVariantMap. Storing JS objects in a
listmodel is significantly slower than storing native datatypes
at the moment (this may be improved in the future). Also note
that it's not currently possible to bind to fields within the JS
object.

Change-Id: I3b1a11ace7cdec754c1a2bb2b2d1b7edf561864d
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-11 08:20:53 +01:00
Martin Jones acf71fab3b Deploy qdeclarativecontext test data files.
Change-Id: I7463b1b8dbfd40764c49c6988dcf8b11e9f3b255
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2011-11-11 08:20:53 +01:00
Chris Adams 43c516be86 Remove unused codepaths from QV8SequenceWrapper
The object equality comparison callback does not allow an object with
a sequence resource to be equal to an object with a variant resource.
As such, the SequenceType::isEqual(QVariant) codepaths are not needed.
Also, QVariantList conversion is handled by toBasicVariant() in the
QV8Engine, and thus we don't need conversion code for this type in
the sequence wrapper.

Change-Id: I2ec599c5ad6cfdb715cd4e0aae3f0cc3bb36cfdf
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-11-11 08:20:53 +01:00
Michael Brasser 851412e58e Fix qmlplugindump test on mac.
Change-Id: I939e4cccc34dd8807e3dd4e4a2eb43d4653a14e2
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-11-11 06:44:22 +01:00
Michael Brasser 90fdbb0433 Stabilize debug client test.
Change-Id: I1f43d754b618ef44a26b749c279fced6636358f8
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-11 06:43:47 +01:00
Charles Yin a648b2f7a8 Export QSGDynamicTexture
The QSGDynamicTexture is in the public header and documented, it should
be exported like QSGTexture as well.

Change-Id: I7c1811509b0311b177d3b9c9bdb893d1383c6d59
Reviewed-by: Juha Vuolle <juha.vuolle@nokia.com>
2011-11-11 06:43:40 +01:00
Alan Alpert 58acb3a499 Change examples bug reference
Previous reason it was disable has been fixed. There's now a new reason
with a new bug number.

Change-Id: I7a3d2bcf5d0f72a1909bdb71cc775bf4ec107726
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2011-11-11 06:43:25 +01:00
Bea Lam 1686a82f38 GridView should re-layout if add/remove before visible index
Unlike ListView, GridView must redo its layout if an item is added or
removed from before the visible items, since it affects the column/row
layout.

Task-number: QTBUG-21588
Change-Id: Id333bc653033751c45d127973e94fae4580c55b0
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2011-11-11 06:42:58 +01:00
Michael Brasser e9b68b62e2 Make compile and pass CI tests.
Change-Id: Ie2ec20d9e346ccaf698762d6abf0224c39fb3490
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-11 04:52:22 +01:00
Andrew den Exter d71a898a2a Fix expected failure in TextInput and TextEdit positionAt test.
Test the mid point of the text input falls between the positions of the
cursors before and after that point rather trying to test a minimum
distance that can vary with font size.

Change-Id: Ie3270b4bfb0c579b8b4d5bb47b784d6926521f49
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-10 10:42:06 +01:00
Andrew den Exter 32bbe6d4d1 Remove expected failures from TextInput pre-edit tests.
Use the cursorRectangleChanged signal of QInputPanel to determine
if an update has been sent instead of a custom input context.

Change-Id: I500ef71a3ea76e8b4271560d7aa5cc4fc6737cb0
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-10 09:11:24 +01:00
Andrew den Exter fbbc0932e1 Fix expected failure in TextInput horizontalAlignment_RightToLeft test.
Send events to the input panels input item instead of the canvas. And
clear the pre-edit text before testing implicit alignment of empty text.

Change-Id: I5e6b04c53c9c6b344563b80b3aa76ab614b0ca0a
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-10 07:37:50 +01:00
Andrew den Exter d6bcd07252 Remove the TextInput inputContextMouseHandler test.
QInputPanel/QPlatformInputContext doesn't have a mouseHandler interface.

Change-Id: I9bb839258cbc3869f035a60e2f9bfefec02e92ec
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-10 07:37:36 +01:00
Michael Brasser beba232f82 Compile fix for tst_qquicktextinput.
Change-Id: I96a64199bc7f7f03c52f6e67482ae0425805c4a1
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-10 06:03:32 +01:00
Andrew den Exter 6a1145d848 Remove expected failure from TextEdit mouseSelection test.
No longer fails as QTestLib correctly propagates keyboard modifiers.

Task-number: QTBUG-21743
Change-Id: I1419afe8411614368f2284952912f29610530d84
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-10 06:03:32 +01:00
Martin Jones c2c19f2b8f PathView element's current item changes on insertion.
When inserting an item before the current item update the offset
to ensure the current item doesn't change.

Task-number: QTBUG-21320
Change-Id: I2375bc5098e7f83c33e7a0b123ed1b82f607055f
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2011-11-10 04:30:30 +01:00
Johannes Zellner cc6e177d86 QStringLiteral does not build on arm gcc 4.5.2 in this condition
Replace QStringLiteral with QLatin1String

Change-Id: I205bcd4f446e225c3f4054798e74dd0cb356e126
Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2011-11-10 01:21:26 +01:00
Glenn Watson ac5743847f Improvements to listmodel implementation and tests.
- Fixed edge case crash bug with QObjects being set on existing
    listmodel element.
- Improved warning messages when assigning wrong type to role.
- Removed a few code paths that can never be hit.
- Added several tests to cover functionality not hit by coverage.

Change-Id: I3d237c0555afbba6377b4d898bec911515b1b4ea
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-09 22:46:06 +01:00
Aaron Kennedy 39b7c020a3 Delete nodes in the render thread at shutdown
This fixes a crash on OS X and possibly other platforms.

Change-Id: Ie8fc451b526d12d46133ef560c04e88c0b142b9a
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2011-11-09 15:18:09 +01:00
Harald Fernengel 59495d2cee trivial: make the test actually check the headers
Change-Id: I82ec9f1d7879c7539d80f49a493f68b5e5be5e70
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-09 13:13:36 +01:00
Aaron Kennedy 1c93b9ce6e Fix v4 crash when accessing invalid attached property
Task-number: QTBUG-21883
Change-Id: Ic14a5d494890fc1bc322c660b97f657d640f2ff8
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-11-09 13:13:36 +01:00
Aaron Kennedy 0c5f918550 Return a string from resolvedUrl() to match 4.x behavior
Task-number: QTBUG-20960
Change-Id: I9ae99ada5c9bbe7498df24908c6acd202ca73a15
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-11-09 11:31:10 +01:00
Aaron Kennedy da8d1689ef Ensure connection lists get cleaned
Task-number: QTBUG-21368
Change-Id: I2cdecc984edb76a5fb1417cfdb29ffe6b90b0993
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-11-09 11:31:02 +01:00
Charles Yin 4b49a7ab1f Fix qmltestrunner crash bug when report filename and line number
The HandleScpe is not needed here. Also for each test file, the rootObj
should reset its internal states properly, otherwise the following test
cases are polluted by the previous tests.

Task-number:QTBUG-22620
Change-Id: I1e4869070b8712e5a6c755461d52bd12d1f03160
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
2011-11-09 11:29:42 +01:00
Kai Koehne f59b4c4539 Fix gcc compilation warnings
QML_SHOW_FRAMERATE is a leftover from QDeclarativeView. Rest
is signed vs unsigned integer comparison.

Change-Id: Ie17e217fc1cf13d29a3795a40dbbc07e9c7c6067
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-09 09:55:01 +01:00
Andrew den Exter 19cdd020ab Fix expected failure in TextEdit hAlign_RightToLeft test.
Send events to the input item instead of the canvas.  And apply the fix
from 4.8 for the tested condition which somehow wasn't applied when the
test itself was.

Change-Id: I0f5bfe8fc13fc426b395fa8ef87cb5549789a92e
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-09 09:55:01 +01:00
Andrew den Exter a0d18924b5 Fix expected failure in TextEdit textInput test.
Input method events should be delivered to the input panels input item,
not the canvas.

Change-Id: I9385a66bdea40311f9fe5f3817ff815991575e4a
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-09 09:55:01 +01:00
Andrew den Exter 1e41c724c5 Remove the TextEdit inputContextMouseHandler test.
QInputPanel/QPlatformInputContext doesn't have a mouse handler which
invalidates this test.

Change-Id: I0a0009d5808391ba1a2d6b30d6e4a9eeb1160c0f
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-09 09:55:01 +01:00
Andrew den Exter 2290062a7d Re-enable TextEdit pre-edit cursor rectangle test.
Formerly known as micro focus.

Change-Id: I4a860e1da488b38b8cf17e79ac922a39ff017dbc
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-09 09:55:01 +01:00
Friedemann Kleint cc8f0227a4 QDeclarativePixmapCache: Add missing enumeration values and break.
Change-Id: Ia83a4932d50133aaae5d488d7be0df99a75be576
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-09 09:55:01 +01:00
Andrew den Exter 3226ae7f0f Fix TextInput inputMethods test.
Input method events should go to the input panels input item not the
canvas.

Change-Id: I2792b8d51585c028c3ba1a109b3dea16bea18f61
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-09 09:55:01 +01:00
Michael Brasser 28102d1935 Behavior on a value type should not cancel previous assignment.
The call to read the value type value causes the previously assigned
value to be overridden. This commit fixes the issue, but doesn't
solve the root cause, which would require changes at the
compiler/vme level.

Task-number: QTBUG-20827
Change-Id: I1a53ee7b777bea81c5929ab7e47e2932e6901967
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-09 08:23:57 +01:00
Martin Jones 15547ac366 tst_QSGGridView enforceRange_rightToLeft fails
Change 9bd6361400 corrected the
highlight range for right to left layout, i.e. positioned relative
to the right.  This change fixes the autotest to account for this and
fixes flicking in StrictlyEnforceRange mode with RTL layout.

Task-number: QTBUG-22162
Change-Id: I133b7e647883e51783bcf54111871451a3a7e67f
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2011-11-09 08:23:57 +01:00
Andrew den Exter 89eea17656 Add tests for the VisualDataGroup onChanged signal.
And other things.  Fixes onChanged being emitted with an empty change
list, an out of bounds array access in groups property and model parts
group filter not being correctly reset.

Change-Id: If2f27b303a141634d106b7c5164984e5817aff4e
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-09 08:23:57 +01:00
Kai Koehne cd633df026 Add console.time / console.timeEnd API
Implement console.time() / console.timeEnd() as also provided by FireBug
/ Safari.

Task-number: QTBUG-22347
Change-Id: I94fcadbb0c54fdf60dc2559e3ae63d613e29630b
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2011-11-09 08:23:57 +01:00
Andrew den Exter 2b5432bd63 Extend VisualDataModel tests to cover Package delegates.
Verify the existing tests also pass if a package delegate is used.
Fixes incorrect changes being emitted when the group a part model is
filtered on changes and package items not being un-parented when
destroyed.

Change-Id: Ib4be42274b0a0460ae9b763a9737f4a6d3b94603
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-09 08:23:57 +01:00
Michael Brasser 6a01c81dff Fix crash on exit when overriding signal handlers in states.
Cherry-picked from 93c64e1be3a2d68eb504d7c4f7c60f66ce1ff650 in 4.7.

Task-number: QTBUG-21617
Change-Id: I99ce8292d53954f5229867a384f47bedf7fad315
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-11-09 08:23:57 +01:00