aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Use fixed font size in testAlan Alpert2012-04-261-0/+1
| | | | | | | | | Otherwise, system defaults can lead to different wrap points on different platforms. Task-number: QTBUG-25306 Change-Id: I4082fb2f9a805982e7c8d076154983af0a393226 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Remove relative directory elements in import pathsMatthew Vogt2012-04-263-6/+53
| | | | | | | | Avoid unnecessary conversions to/from QUrl. Change-Id: If52e78cfdaf4fe344f34d961e300b21dd4a11fb2 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Debugger: Change name and protocol of QDeclarativeObserverModeAurindam Jana2012-04-251-21/+25
| | | | | | | | | Rename QDeclarativeObserverMode to QmlInspector service. This is because the current protocol has been changed completely and just a version change is misleading. Change-Id: I3b72f081f6ab77eac474dcef7a84375ef69e20dc Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Debugger: Fix warnings about declarative_debug in autotestsKai Koehne2012-04-257-7/+13
| | | | | | | declarative_debug is deprecated and will be removed eventually. Change-Id: I1f5a61c91c25e37ff39e9154bcaa3cd74d60e109 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Debugger: Improve output of autotestsKai Koehne2012-04-259-50/+101
| | | | | Change-Id: Ib938d2f39d8a0928c257ef923df5d5fcfa85c4cf Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Make touch event delivery in the canvas reentrantLaszlo Agocs2012-04-251-1/+51
| | | | | | | | | | | At the moment the unlikely case of spinning the event loop from a QQuickItem event handler for TouchBegin is not handled properly: It will end up not delivering the subsequent TouchUpdate and TouchEnd events to the item, leaving it in a state that should not normally happen. Change-Id: I668d065c9cf1a299bfd9268a9125d7a7e32f6786 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Debugger: Make sure stateChanged is called from debugger threadKai Koehne2012-04-243-2/+18
| | | | | | | | | | Make sure stateAboutToBeChanged(), stateChanged() is always called from the debugger thread. This matches how messageReceived() is called. On exit, run an event loop until all stateAboutToBeChanged calls have returned. Change-Id: I9cd6199cc80552ad97e4b7d504ea91aa116a6a34 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Mark all Latin 1 strings with QString::fromLatin1 or QLatin1StringThiago Macieira2012-04-241-8/+8
| | | | | | | | | This is in preparation of QString's constructor using UTF-8 by default Change-Id: Ibd0a585342af572e3f74636deb97c1b6b3afeb9a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Verify that QML can reliably receive datetime info from C++Matthew Vogt2012-04-2410-0/+395
| | | | | | | | | | | | | | Since a JavaScript Date object does not contain any information about the timezone in which it is specified, a C++ module that exports datetime information to QML must also provide the relevant timezone data so that clients can correctly interpret the datetime value. Provide an example of exporting datetime information to QML, verifying that the data can be correctly interpreted in JS. Task-number: QTBUG-25262 Change-Id: I732797da225861470e6b034f2e3d89a43df36cf7 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Record current status of date conversion from QMLMatthew Vogt2012-04-249-15/+246
| | | | | | | | | | | | Ensure that the qqmlecmascript test is not broken by changes in the time zone of the test environment. This test documents the existing situation with convertibility of date information between QML and JS. Task-number: QTBUG-25262 Change-Id: I42716e0b34ef26daa391fdb4aebc1f31340fcea0 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Add support for var properties in V4Matthew Vogt2012-04-242-0/+76
| | | | | | | | | | | | Support initialization of var properties in V4. Var properties, which can only be manipulated by V8, are constructed directly into the form in which they will be stored. Task-number: QTBUG-25022 Change-Id: I27c6af9f8a310e7baec91bef2593c8518ec1e462 Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Improve test to use actual double click timeout.Frederik Gladhorn2012-04-231-6/+9
| | | | | | | | I'll keep the function marked as skip since I have no clue if this is even remotely connected to the issues it was having. Change-Id: I04b2a4f61321553804d29ef076178ea7c63b0deb Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Reduce memory usage of QQuickPath for simple paths.Andrew den Exter2012-04-231-0/+38
| | | | | | | | | | | | For a single segment line path we can get correct results by interpolating across just two points, so there no need to allocate the comparatively large point cache required for more complex paths. This also correct a normally small interpolation error caused by including the terminal point in the number of intervals. Change-Id: I564c3c012b6822831251276951603fca8544a356 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Only run populate for items in model at creationBea Lam2012-04-232-43/+34
| | | | | | | Don't run for items added in Component.onCompleted. Change-Id: I58745ab989efae168d036875cb2fb88e3e2db0c3 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Add some component path canonicalization testsChris Adams2012-04-2314-0/+201
| | | | | | | | | | | | | Previously, no unit test existed to ensure that url canonicalization worked correctly, which could result in two import statements using relative paths to the same actual component triggering two separate types being generated. This commit adds a unit test with various relative-addressing and both static and dynamic imports, to enforce type-consistency. Change-Id: I7772e3c531069322d5fa44063cbf57a758ed3710 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Re-enable QQuickPixmapCache test on most platforms.Jason McDonald2012-04-201-1/+1
| | | | | | | | | This test fails unstably on Ubuntu 10.04 and passes on all other CI platforms, so only disbale it on Ubuntu 10.04. Task-number: QTBUG-25307 Change-Id: Iae5d401e1c7b2398abfd80abc7827df27a84e63b Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Debugger: Improve autotest output on failureKai Koehne2012-04-203-19/+53
| | | | | Change-Id: Ia463b198b5d6dac8e480d141412cb4475e54d204 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Disable local storage if the standard data location is emptyCharles Yin2012-04-202-1/+21
| | | | | | Change-Id: I05ea7fa9521c807099b39e610f965a331e538f6e Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix eliding when text width is reset by an implicitWidth change.Andrew den Exter2012-04-203-0/+109
| | | | | | | | After emitting implicit size changed signals, reevaluate any conditions that were dependent on the validity of the item dimensions. Change-Id: Ie4ee0c87a22cf82752c207c69d426056c36ede67 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Clean up testBea Lam2012-04-202-10/+12
| | | | | Change-Id: I750d059492c74fbdcd8d61ec3268ba10dcf0466b Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Move data file to correct locationMatthew Vogt2012-04-201-0/+0
| | | | | Change-Id: Iaf5363f6bd0a7983dc937e427131f6537a19b1c3 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Provide receivers count from QQmlData.Michael Brasser2012-04-204-0/+42
| | | | | | Change-Id: I70b06507158797df3083dc23a119935497aa19f4 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Use QInputMethod::isVisible instead of QInputMethod::visibleGirish Ramakrishnan2012-04-202-22/+22
| | | | | | | QInputMethod::visible will be removed in qtbase. Change-Id: I16ffbe56d55a62ae6a905e3cfdab8ad245d24aa0 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* QtDeclarative: No longer use QDeclarative compatibility defines.Friedemann Kleint2012-04-202-2/+3
| | | | | Change-Id: Icbd9777cf1d978468c8023712ed90cd3c7dda56f Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* include QWindowSystemInterface explicity when neededGirish Ramakrishnan2012-04-193-0/+3
| | | | | | | | QtTest will not include QWindowSystemInterface anymore. See https://codereview.qt-project.org/#change,23440. Change-Id: Icad9f04fa748ad938925716b0012bc4cf1b3f154 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Add contains method to QQuickItem public APIAdriano Rezende2012-04-192-0/+209
| | | | | | | | This method can be overwritten in order to provide fine grained control over the mouse events handled by the item. Change-Id: I23cb61958d3ac0b2f5091c47fa9e0ed07dc5e5d0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Ensure the cursor delegate position is correct when wrapping.Andrew den Exter2012-04-198-20/+127
| | | | | | | | | | When inserting text into a TextEdit with implicit width and wrapping the cursor delegate position has to be updated after the width is expanded to the implicit width otherwise it will be positioned in a wrapped location. Change-Id: Ibcb709ec1b4f6827ea8ae919f2e0c932c7372869 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Split qquicklistmodel test into two partsMatthew Vogt2012-04-1812-464/+882
| | | | | | | | | This long-running test was potentially being terminated by the test framework for simply exceeding the maximum run time. Change-Id: I7e1be44f25885ae869f05acbce3c0fb1c05f76a6 Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-04-1759-116/+1019
|\ | | | | | | Change-Id: I39905acde16ba6bb0ba39401cb73082a73dd9167
| * Add QJson support to QV8EngineKent Hansen2012-04-1620-0/+568
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make QV8Engine perform direct conversion between JavaScript values and QJson{Value,Object,Array}. This implementation always makes a deep clone of the QJson{Object,Array} when converting to JS; it might make sense to add a lazy conversion scheme for dealing with large objects. Change-Id: Id0b65891a19515ce22f1e51fa8a28d9f3e595271 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Update test after QUrl minor behaviour changeThiago Macieira2012-04-121-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes required: - Uppercase the hex in percent-encodings - The tolerant decoder treats all % as broken if any one is broken (Input "%2B50%" is rendered now "%252B50%25", where previously it was "%2B50%25) The extra test is just so we use QString first. If the test fails, we get a nicer output from QtTest, instead of the hex dump it uses for QByteArray. Change-Id: I4c5cbfa3be962c648b50a69dc8bc3c4acc551e62 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Stop stuffing the URL "<Unknown File>" in QML errorsThiago Macieira2012-04-122-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | QQmlError already knows how to deal with source scripts with no URL and it will use "<Unknown File>" when converting to a string. QUrl in Qt 5 leaves the "<" and ">" characters encoded, which means we ended up getting warnings about "%3CUnknown File%3E", which isn't nice. Change-Id: I504604fa37bb734549048432aaf9db3b1fa568d2 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-1177-324/+2010
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmlprofilerservice_p.h src/qml/qml/qqmlboundsignal.cpp src/qml/qml/v4/qv4bindings.cpp src/quick/items/qquickshadereffect.cpp src/quick/particles/qquickcustomparticle.cpp src/quick/qtquick2.cpp Change-Id: Ia9c6517035ae912fa75e77473a452bd3383def56
| * \ Merge master into api_changesKent Hansen2012-03-2724-62/+614
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmlenginedebugservice.cpp src/qml/debugger/qqmlprofilerservice_p.h src/qml/qml/qqmlboundsignal.cpp src/qml/qml/qqmlpropertycache.cpp src/quick/util/qquickimageprovider.cpp Change-Id: I0609aa5ed54c7769f1e2773a96a7cd43a69f133c
| * | | Mark tst_qquickimage as insignificantKent Hansen2012-03-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nullPixmapPaint() test is flaky. There are also several other places where QQuickView::show() is called without a subsequent call to QTest::qWaitForWindowShown(); in some of the test functions, processEvents() is called instead (twice, even, just to be sure: see the imageCrash_QTBUG_22125 function). Change-Id: Icb49a36dcf968664f16c3223658ddd6189e965fc Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
| * | | Merge master into api_changesKent Hansen2012-03-23103-2416/+6231
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlboundsignal.cpp src/qml/qml/qqmlpropertycache.cpp Change-Id: I5193a193fa301c0b518291645bf626a5fa07118f
| * | | | Adapt to QMetaMethod::typeName() behavioral change for "void"Kent Hansen2012-03-221-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMetaMethod::typeName() has been changed to return "void", rather than an empty string, when the return type is void. Change-Id: Ifc903ba60a06ffaefe27c94fe629698d64904d94 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * | | | Migrate gui dependencies from QtQml to QtQuick.Matthew Vogt2012-03-2013-21/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that users of declarative that have no need for functionality provided by the Qt Gui module do not have to link against it. Any use of QtGui functionality is delegated to providers that can be installed by another library; QtQuick adds default providers for this functionality when linked against QtQml. Task-number: QTBUG-24559 Change-Id: I5e6a58a4198732dc2f8f52f71abfa1152b871aa7 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * | | | Merge master into api_changesKent Hansen2012-03-1980-290/+4698
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmlenginedebugservice.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/quick/util/qquickimageprovider.cpp tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: Ie78ba2fabd32f4812bcae9dbdd66ed289dc11dcb
| * | | | | Crash fix after QMetaType change.Jędrzej Nowacki2012-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMetaType::UnknownType was added so we can distinguish between "void" and an unregistered type. Change-Id: If8cee21b3f84bf129343dc457d10ab31a9bfc8b8 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
| * | | | | Make QFastMetaBuilder generate revision 7 meta-objectsKent Hansen2012-03-131-11/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for revision <= 6 will go away in Qt5. This commit updates QFMB to match the latest format generated by moc: - Store string table as an array of QByteArrayData (literals) - Store only the meta-method name, not the full signature - Don't store parameter names as a comma-delimited string - Store explicit information about parameters (count, types, names) Since the meta-data can now hold type ids > 256, there is no need to store the names of property/parameter types at all anymore. Change-Id: I487b14d22b2a92d9e6a9aa4e348f4bab181daff4 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
| * | | | | Adapt to Qt5 meta-object changesKent Hansen2012-03-133-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMetaMethod::signature() has been renamed to methodSignature(), and it now returns a QByteArray. Also, the new function QMetaMethod::isValid() should be used to determine whether a method is valid, instead of relying on signature() returning a 0 pointer. Where it makes sense, the existing code that was using signature() and parameterTypes() has been changed to use the new API QMetaMethod::name(), parameterCount(), and parameterType(int). Also, in the new meta-object revision (7), the QMetaObject stringdata member is now of type QByteArrayData*. QFastMetaBuilder will be ported to generate the new format, but for now it's sufficient to reinterpret_cast the stringdata assignment to keep it compiling. Change-Id: Ie340ef17bcebc3afa4aae6450dfe2d06e4d881a4 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
| * | | | | Merge branch 'master' of git://gitorious.org/qt/qtdeclarative into merge-masterMatthew Vogt2012-03-1375-131/+682
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Change-Id: Iaefec13503dadfa200539b8de7a2d80fc5bb3bcf
| * \ \ \ \ \ Merge branch 'master' of git://gitorious.org/qt/qtdeclarative into api_changesMatthew Vogt2012-03-1237-121/+2238
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I578b1e2f1bb374da6194e6ba04a0fd459b2632fe
| * \ \ \ \ \ \ Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-03-07162-463/+745
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I121cb9c9316b5e47476dcb982bc28b6f3f358f78
| * | | | | | | | Remove uses of QtGui symbols in QQmlEngine.Matthew Vogt2012-03-075-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the code dealing with QImage and QPixmap out of QQmlEngine and into the QtQuick library. QQmlEngine remains the owner of image provider resources, but does not use them directly. Change-Id: I52083581394d9c308db446372883eb7479ccf807 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * | | | | | | | Allow function assignment to cause binding for non-var propsChris Adams2012-03-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch maintains the old function-assignment behaviour for non-var properties, and will be reverted soon. Change-Id: I523e464501106616c51ff7478f7eb7171c1ca350 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
| * | | | | | | | Improve support for var propertiesChris Adams2012-03-0515-14/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the semantics of function assignment in QML. Previously, function assignment was interpreted as binding assignment. Now, function assignment is interpreted as function assignment, and therefore fails for all property types other than "var" properties. To support imperative binding assignment, a new function was added to the Qt object: Qt.binding(function) which takes a single function parameter and returns a function object which will be interpreted as an assignable binding expression by the QML engine. Finally, this commit also slightly changes the semantics of var properties in that the "special" JavaScript values of null and undefined may be assigned to var properties, rather than being interpreted as reset requests. Task-number: QTBUG-21842 Change-Id: Iee99a878b9badf0fb76e983da7ebfa493f55ceb5 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* | | | | | | | | Set rootItem'ownership as CppOwnerShipCharles Yin2012-04-173-2/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rootItem should not be deleted until the QQuickCanvas itself has been deleted. Set the rootItem's object ownership to CppOwnerShip can prevent it being destroyed by javascript destroy() method or v8 garbage collection. Change-Id: I7d83fec8ffcb8062d143b1b050a38368a2af800f Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
* | | | | | | | | QV8DebugService: v8::AfterCompile EventsAurindam Jana2012-04-172-30/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not send v8::AfterCompile events. This speeds up the debugger. Change-Id: I84f5d90e24878af42d514e5d26c9e051502605f6 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>