Commit Graph

2443 Commits

Author SHA1 Message Date
Chris Adams d2921ffc52 Check engine equality condition inside null ptr check
Previously, we asserted if the engine associated with the two external
resources from the arguments to the object comparison callback were
not equal, prior to checking that the external resources were non-null.

Task-number: QTBUG-24489
Change-Id: I4b2bd2377fcf38163d1341e43e056b1405ab72ac
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-02-27 02:39:41 +01:00
Chris Adams de02b0f6ba Ensure importing module API in js import works
This commit adds a unit test to ensure that a property of a module
api can be accessed in a JavaScript import.

Change-Id: Iecba76a9db0400ece1777256f19803d4bad53438
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-02-27 02:39:41 +01:00
Michael Brasser cd6cabc6cc Improve test coverage for anchors.
Change-Id: I2705407b16ef678ed5b3cbfa7116ae6b18366688
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
2012-02-27 02:39:41 +01:00
Bea Lam 6c08b232f3 Stabilise tests
Change-Id: I2227fede52f5b0d59bd0dd9b10ab0151318d61dd
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-27 02:39:41 +01:00
Michael Brasser 86b14cf970 Remove unused member.
Change-Id: Ibfcc7a78e442c2be5bab6933e2e85ed39344e6c2
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-02-27 00:12:08 +01:00
Michael Brasser 316ede1584 Get script benchmark compiling and running.
Change-Id: Ifc433f6c430d430bfb8b2d8b47a84ad2688e4cb2
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
2012-02-27 00:11:49 +01:00
Yuchen Deng 4a17079382 Build fix when use '-no-stl' option
error C3861: 'toupper': identifier not found
error C2065: 'RAND_MAX' : undeclared identifier
error C3861: 'rand': identifier not found
error C2065: 'RAND_MAX' : undeclared identifier
error C3861: 'rand': identifier not found

Change-Id: Iaa0daf516c3d9f90d9119f958d79187ee2bb959c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-24 21:37:37 +01:00
Aaron Kennedy a8929f5d30 Update license headers
Change-Id: Id47c6b26ee2ac2b3d30c464adaa55b7a7c3e4442
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-02-24 17:13:09 +01:00
Gunnar Sletta 17790b069d The plugin is cleaned up by the plugin loader so don't double-delete
Change-Id: I8bac5b6e1960cbc38575c76f02aa6c6c90700331
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-24 14:05:17 +01:00
Gunnar Sletta 5cc9b79675 Revert resource releasing logic inside window managers.
This was based on the assumption that exposure and visibility
would take similar code paths, but this is not the case and
the fallout of this change (like not releasing resources at all)
is not worth it.

This reverts ef6318ae38 and most
of 5f0013ee76

Change-Id: Ib2e29972502a8ec956cd6bd294a2a2bb50d8e76e
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-02-24 12:16:51 +01:00
Alan Alpert 9d2b618fa0 Start of examples refactor
This is the general reorg of the examples directory structure, plus additional
guidelines.

calculator, animations and accessibility have been updated to the new standards
and tested, as an example.

Task-number: QTBUG-24133
Change-Id: I76c3b86751d3195ba2a5474ff23afb875765e9a4
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-02-24 10:24:58 +01:00
Michael Brasser 91d543f009 Add additional autotests for signal handlers.
Change-Id: Ie94ce8b536347981310abeb077a88acedf44c7e6
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
2012-02-24 07:09:34 +01:00
Aaron Kennedy c4e177c049 Allow V8 bindings to assign to value type sub properties
This was an overly defensive change because it wasn't clear if the isAlias
check would catch aliased value type sub properties.

Change-Id: Iee2805d22f281c1fd188b14e265687fd8e7042db
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-02-24 07:02:16 +01:00
Andrew den Exter 5fee1e79cc Use floating point types for position offsets and cursorRectangle.
Rounding to align painting to pixel boundaries is no longer necessary
are largely removed.  Correct the few instances remaining in TextEdit
and TextInput.

Change-Id: Ic6ec57092d74ec43b23d85cd8868e0190acc3e09
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
2012-02-24 01:46:49 +01:00
Stephen Kelly 8efc0ba050 Remove use of QT_ASCII_CAST_WARN_CONSTRUCTOR.
Fixes build after I0b4df4c99600cacbaafbf0bc4270cd4978600956

Change-Id: I9cf326b52e0e7e267b8fbc422175713cee9352f5
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-02-24 01:46:28 +01:00
Roberto Raggi 212204b4ff Fix rewrite of multiline string literals.
This commits ensures that we don't rewrite `\'-terminated
multiline string literals. Also, it fixes the processing
of \r characters inside the string literals.

Change-Id: If3d7c1b83c7306b9ccb1be31412b6f8e76434c41
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2012-02-23 10:43:44 +01:00
Aaron Kennedy 7e76d66f52 Fix crash in instruction dump
Change-Id: I2cfa9da120a602b52f401dd304b44cd17c47b220
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-02-23 10:31:24 +01:00
Friedemann Kleint fb3889a423 Use new plugin system in QtDeclarative.
- Use prefix "org.qt-project" for interfaces.
- Use new macros, add json files.

Change-Id: I53df83f95153c5c9c462098584606284470a5ae0
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-23 09:05:49 +01:00
Matthew Vogt dc31651788 Remove warning produced by 'parent' reference.
When Qt.createQmlObject is invoked from QML, any contained references
to parent produce a warning from V8.  To prevent this, move the
assignment of the parent object to before the initial execution of the
bindings.

Task-number: QTBUG-24464
Change-Id: Ib330822f1ca46ec5a6af648a56197da09669c3f2
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-23 07:02:04 +01:00
Bea Lam bbbc44c45d Clean up some of the view transition docs
Fix some of the wording in the docs.

Change-Id: I07892bec06c78b73bdd93926719d609405e263b3
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-02-23 05:08:25 +01:00
Alex Wilson 09ea9cace4 Fix for bad operator precedence causing right mouse button issues
Binary or (|) has higher operator precedence than a ternary in C,
causing the original expression here to function quite incorrectly
for anything other than the common left-mouse-button-only case. I
just added brackets -- feel free to change this to "if"s if you
think that would more clearly avoid this issue in future.

Change-Id: Ie20bd7e805b89a393794d3240fb0ae680b29ff64
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2012-02-23 04:06:04 +01:00
Andrew den Exter 924a9620d5 Fix Text eliding with implicit height and maximumLineCount.
Ignore the height of the text if the element height is invalid.

Task-number: QTBUG-24293
Change-Id: I1646c3f64583da40e6166aeea24c2c4af42cb279
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
2012-02-23 04:06:04 +01:00
Martin Jones c5f65d8597 QML locale.firstDayOfWeek returns 7 for Sunday
To match JS Date object, Sunday should be 0.

Change-Id: I662c0b1fcbf921fa1c4bb58f900366dd088b343b
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
2012-02-23 04:06:04 +01:00
Michael Brasser 66ce518181 Small doc fixes.
Change-Id: I54ed2d0387b85ac853d94cfe716a1f6016986e2a
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
2012-02-23 04:06:04 +01:00
Yann Bodson 12f0663dbd Fix font size calculation in headings in StyledText.
Calculate the font size correctly even when the size is specified
in pixels and update this size when the font changes.
Also make sure that the text layout's font is set before parsing.

Task-number: QTBUG-24458

Change-Id: Ida7723f6e4f4b9fd3a6878076f4beaf5bda8f7f7
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2012-02-23 03:00:31 +01:00
Andrew den Exter a08546507f Reduce QQuickTextEdit memory usage.
Remove unnecessary members from QQuickTextEditPrivate and
QQuickTextControlPrivate and re-order and pack to reduce padding for
alignment.

Change-Id: I14f5e3fc01646d02745f095c2a4b168cd675745d
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
2012-02-23 01:19:51 +01:00
Michael Brasser 6a42a6e0a9 QML_RUNTIME_TESTING should be disabled by default.
Change-Id: I67e0dae6f21162b962c1ce4454dc3d82e4e40049
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-02-23 00:15:51 +01:00
Michael Brasser 4084cf753a Update number of reserved bits.
Change-Id: I38e112c2493abd9ec79b97e6e28334a3ba66543c
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-02-23 00:15:35 +01:00
Martin Jones d93cae5bea Remove the last sql dependency in declarative
Change-Id: Ib2410e1b32e2cc5216d5fc9659bc45fb46a1da61
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-22 22:55:27 +01:00
Oswald Buddenhagen 78c34d31b6 clean up qmake-generated project
remove "header" and assignmets which are defaults or bogus

Change-Id: I1d777f5418b0f353bf276a979c6300a941927e7e
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-02-22 17:39:51 +01:00
Aurindam Jana fcae81ce68 DebugMessageService: Remove unneeded data
Do not send version info of QMessageLogContext.

Change-Id: I32dd4a548ee2b918e5d04dcdffd4d5545fd2f54f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-02-22 15:27:28 +01:00
Caroline Chao 5b3d57e8f8 CodeCoverage: Fixes regression.
Fixes segmentation fault introduced by qtbase change:
36f5cc848de2525

Coverage data are now saved in QTestLog::stopLogging. Also the current
application name needs to be set for a quick test as well.

Remove also code coverage call to installCodeCoverage from quicktest
due to refactor of the code coverage setup in qtestlib. This should be less
error-prone. See qtbase change:
949b7452e0d2402

Change-Id: I13566cc43dfb3af264d3b2be2e5f2617128f4801
Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
2012-02-22 11:59:23 +01:00
Alan Alpert 3dd45840c8 Positioners cleanup
Use qreal for positions and spacing instead of ints, and make the
positionedItems list take care of filtering out invisible items.

Change-Id: Icad93ad89c848e40a70bd7a9539bd810e27020df
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-02-22 09:34:41 +01:00
Matthew Vogt 136f2352f6 Add test verifying that QObject-derived pointer is passed correctly.
Ensure that an object derived from QObject is correctly passed to
an invokable function from QML.

Change-Id: I71eefe8c480e1f1574804d05244b53f29c7fbf0d
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-22 08:16:48 +01:00
Bea Lam 6f96bf2d8d Doc improvements for positioners
- Fix docs that say opacity changes can trigger an add transition since
  this is no longer the case
- Be more clear about when the move transition is applied
- Be more clear about which anchors are allowed/disallowed in which positioners
- Add example to Positioner attached property

Change-Id: I78417ac5b8eba1af5587955121b7fd4e2ca21169
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-02-22 07:09:09 +01:00
Alan Alpert 1f5c9ceb4c Whitespace fixes for positioners
Change-Id: I53a8a023e218cd41b2c01a7c931c95edfbaee780
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-02-22 06:01:14 +01:00
Andrew den Exter d70b27dd68 Reduce the size of QQuickTextInputPrivate.
Remove some redundant or obsolete member and reorder members to
minimise padding for alignment.

Change-Id: I2660007baa07bea076e9ad307061af87c07e37cf
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
2012-02-22 01:23:49 +01:00
Martin Jones f60588237b Implement String.localeCompare() using QString::localeAwareCompare()
v8's localeCompare() implementation is not locale aware, so we use
Qt's locale aware compare.

Change-Id: Ia9092b3d6754545bb797adac26080ac7a29dcd92
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
2012-02-22 00:03:53 +01:00
Aurindam Jana a73ad904c9 DebugMessageService: Also pass Debug Context Info
Use QMessageHandler which provides context information such
as line, file and function for the debug output.

Change-Id: I475faf4a1363d8419dec910b8a23cc44666c1908
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-02-21 15:39:57 +01:00
Kai Koehne 784d867d2b v8profiler: Actually submit data
Fix regression introduced in 82dfecab3.

Change-Id: Icd90c483b9b2fde8d4cf522f3a35368cd395b120
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2012-02-21 11:04:58 +01:00
Aaron Kennedy c7ec69b4a7 Reduce size of QQuickItemPrivate
Change-Id: I02653536f68cfef3dfc06acaf30e2565a97dc194
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-02-21 10:56:27 +01:00
Gunnar Sletta ef6318ae38 Release resources on shutdown..
Change-Id: I7758f5ba1f58e19d92e394133cccd449ce5a1756
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-21 09:01:10 +01:00
Martin Jones b672f1974d Flicking a pathview with large delegate spacing is inconsistent
The deceleration is inconsistent and dragging slowly is jerky.
This was largely due to the poor resolution of the path points.
pointAt() now interpolates, and the dragging logic is more
accurate.  Also removed the rounding of item positioning so
that side-by-side items don't bounce around.

Task-number: QTBUG-24312
Change-Id: I956aff0b83c3c1211d5657159c3de1e4ef0b5171
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-02-21 06:49:10 +01:00
Charles Yin a37f19fa6d fix typo error in documentation
Change-Id: Ic3706b0920b8a50f994e0627bda6baf0fd04b81c
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-02-21 05:35:37 +01:00
Charles Yin 2b508c59bd Renames QAnimation2ChangeListener to QAnimationJobChangeListener
Change-Id: I921b252380d095fb878b4e5d36df0b5a13a3888f
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-02-21 05:35:37 +01:00
Charles Yin 15bb4b57e8 Remove sql dependency from declarative.pro
Change-Id: I43aa11e948a498796788587e03a699f121308d1b
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-21 05:35:37 +01:00
Bea Lam 4154c79d4a Stabilise ListView and GridView tests
Some tests need to wait for view to be updated before proceeding. This ensures
a polish is received before proceeding

    - before checking through child items after initial load
    - after changing content y

    unless some other QTRY_* is already doing the job.

Also fixed some tests that randomly failed for other reasons.

Task-number: QTBUG-22872 QTBUG-23605

Change-Id: I2d41bf09fae09b90fd3aadbd5349e991c3339761
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-21 03:41:37 +01:00
Bea Lam bc81d64964 Fix condition check against wrong variable
Change-Id: I0857166e666e886077e4b0eda2d8b00b13f99ba6
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-02-21 02:26:54 +01:00
Bea Lam 2ac7e70a86 Skip tst_QQuickListView::sectionsDelegate() for now
Failing occasionally

Change-Id: I74fdc7f0d71a92ef2ea19df3125a362e2fa199c5
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-21 02:26:02 +01:00
Andrew den Exter e060245ebe Reduce the size of QTextPrivate.
Remove some unnecessary members, store colors as QRgb values instead
of QColor, and reorder members to minimise alignment padding.

Change-Id: Id3958429008c97a5714734a529250fe881e2161b
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
2012-02-21 02:25:14 +01:00