aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * QmlDebugging: Object Tree and States ListAurindam Jana2012-03-191-13/+16
| | | | | | | | | | | | | | | | | | All created instances are stored under the root context. Check for the creation context of the object when building up the tree. Do the same when building up the states list. Change-Id: I8716d9966a61b8f7cb3ad4b7ab5acd4c94b4cd03 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
| * When clearing an incubator also clear incubators it is waiting for.Martin Jones2012-03-191-0/+117
| | | | | | | | | | | | | | | | If an incubator is cleared while waiting for other incubators to complete also clear the incubators it is waiting for. Change-Id: I83470920c0fd8a23d0098849192555f7478bb492 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
| * Resetting a model can cause a crash in views with header/footer.Martin Jones2012-03-194-0/+218
| | | | | | | | | | | | | | Geometry listeners were called for deleted header/footer. Change-Id: I47854178232f8a4ab5e19a931901b49741fec388 Reviewed-by: Bea Lam <bea.lam@nokia.com>
| * Ensure section header/footer are cleaned up.Martin Jones2012-03-191-0/+17
| | | | | | | | | | | | | | | | If the model is cleared or replaced with an empty one, the section headers should be released. Change-Id: Ia2f070c312593743b2c5332a6c69facaf222ee6d Reviewed-by: Bea Lam <bea.lam@nokia.com>
| * Fix QQuickCanvas test failure.Andrew den Exter2012-03-191-1/+1
| | | | | | | | | | | | | | | | Switch to a QTRY_COMPARE to allow a little more time processing the event loop. Change-Id: I4f14feb5cbc7d11654f6c9089baff4ae67d894db Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Fix bug in v4 strict equality.Michael Brasser2012-03-153-0/+98
| | | | | | | | | | Change-Id: I184065e0b7c8c6536f2081b9bf03e98992a4c9fe Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
| * Windows: Fix file URL issues in declarative autotestsMiikka Heikkinen2012-03-159-35/+39
| | | | | | | | | | | | | | | | | | | | Fixed by using testFileUrl() shared utility function where appropriate instead of testFile() or various other ways file URLs were being incorrectly used. Task-number: QTBUG-24779 Change-Id: I48cbd297d419238f42ea45132344b7e5a487b6f1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * Fix tst_qquickimageparticle test compilation with Visual StudioMiikka Heikkinen2012-03-151-2/+3
| | | | | | | | | | | | | | | | MSVC doesn't support setenv or unsetenv functions, so use qputenv instead. Change-Id: Ife4eb056e6c87d23774512c61b13a3ae3d8ac9ce Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * Allow threaded compilation in an async LoaderMartin Jones2012-03-1514-7/+3251
| | | | | | | | | | | | | | Enables threaded compilation for a Loader "source". Change-Id: I2d60a3ace07aab58f3b8f069e45a2864178c959f Reviewed-by: Chris Adams <christopher.adams@nokia.com>
| * Don't assert if focus is already clear.Alan Alpert2012-03-152-0/+29
| | | | | | | | | | | | | | | | | | Already cleared focus should exit the function without terminating the runtime. Task-number: QTBUG-24714 Change-Id: Ia8c6be0d88e43d1f71112acc7bac3eb674f22de8 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Set more sensible Flickable default input filtering parametersMartin Jones2012-03-151-1/+1
| | | | | | | | | | | | | | | | | | Shouldn't throw anything away by default. Also fix bug that flicking back into bounds from outside bounds halved velocity. Change-Id: I3c2d303a9e46910439dc8bfb01771376f634a684 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Fix crash caused by dereferencing collected v8 dataChris Adams2012-03-154-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a var property of a QObject is read after the v8 data associated with the qobject has been deleted but prior to the DeferredDelete event being processed, the varProperties array will be null and a crash will occur. This patch ensures that we check for this condition in both the access and set codepaths for var properties, and also ensures that an object which has previously been queued for deletion cannot be referenced in JS. Finally, it adds a unit test to ensure that we don't regress. Task-number: QTBUG-24748 Change-Id: Idde384ca01e18f4dcf9e376e9379f2c5eb410e14 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Don't allow tst_QJSEngine or tst_QJSValue instance to be collectedChris Adams2012-03-152-22/+36
| | | | | | | | | | | | | | | | | | Both of those unit tests currently change the ownership of the test instance object, which could result in it being collected by the JS GC and deleted if events were processed. Change-Id: I5a9821fb56e19af1d52fea46e54755875dfbb29a Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Remove binding dependency on QQmlExpressionAaron Kennedy2012-03-152-24/+24
| | | | | | | | | | | | | | | | This is the first step to creating much lighter weight bindings that are tuned for the specific scenario in which they're used. Change-Id: Ib985dcff25679b711b5c634bbc891aa7902bf405 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Ensure that dynamic property storing QObject ptr notifies on deleteChris Adams2012-03-152-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when a QObject ptr was stored in a dynamic variant property, the value of the property could change (to a zero ptr) if the QObject was deleted without a notify signal being emitted by the QDeclarativeVMEMetaObject which stores the property. This commit ensures that such a notify signal is emitted correctly. Task-number: QTBUG-23451 Change-Id: I5689abd984b177737f8d5f18950838b73ebde328 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Let V8 throw the exception when QML property lookup failsKent Hansen2012-03-143-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only V8 knows whether a failed property lookup should actually cause a ReferenceError to be thrown. When evaluating a "typeof" expression, for example, a ReferenceError should not be thrown even if the expression involves global variables that don't exist, according to the ECMA-262 specification. QML should try to match the standard JavaScript behavior. This is achieved by simply returning an empty value handle (to signify the absence of the property), and leaving it to V8 to throw an exception as appropriate. Task-number: QTBUG-21864 Task-number: QTBUG-24448 Change-Id: I9945adcab98fc3b801371163367473d6af0ab31a Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
| * Remove warning about missing file from parserstress testMiikka Heikkinen2012-03-141-2/+1
| | | | | | | | | | | | | | | | | | There is no dummy.qml, so trying to find it will cause a warning and return an empty string. Since the url is optional anyway and apparently not relevant to this test, just use empty QUrl directly. Change-Id: I11ba742dedccd6bdea226f680aa57c957afc7dc7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * Windows: Mark several declarative test cases insignificantMiikka Heikkinen2012-03-145-7/+9
| | | | | | | | | | | | | | | | These tests are marked insignificant for now to make CI runs pass. Insignifications need to be removed once the related issues are fixed. Change-Id: I3a1d36e5b17cf2f1b2f00b20b615359d96975f2b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * Use the same ReferenceError message wording as V8Kent Hansen2012-03-144-27/+27
| | | | | | | | | | | | | | | | | | | | | | Instead of "Can't find variable: foo", use "foo is not defined". This is in preparation of letting V8 throw the exception when a property lookup fails on the QML scope object (needed for QTBUG-24448). Change-Id: I3c747482a8ef138dad9a85530a4f6b5c4c818a03 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
| * Debugger: Print informational messages via qDebugKai Koehne2012-03-143-7/+7
| | | | | | | | | | | | | | This allows users to use QT_FATAL_WARNINGS. Change-Id: I114825764c841030418c956d23575159157dfd69 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
| * Debugger: Fix autotest for shadow buildsKai Koehne2012-03-142-2/+1
| | | | | | | | | | Change-Id: I1b53afeb2a9f0d6e571c5ed87304e85896523488 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
| * Debugger: Fix autotests on WindowsKai Koehne2012-03-142-16/+16
| | | | | | | | | | | | | | | | Remove export macro logic for internal classes. Change-Id: I4dfa7f8e7bc9b5086e01e40342bd00812d5966bd Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * CodeCoverage: Skip headersclean test.Caroline Chao2012-03-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The code coverage tool adds #line when instrumenting the code using the gcc syntax. tst_headersclean uses the -pedantic-errors flag which causes a fatal error when the code is instrumented with the coverage tool. Similar change was done for qtbase (4ee14d6f87688492). Change-Id: I525879ef56463473dd3c9eb91dee4d9b8310cdf9 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Fix AND expression in v4Luis Gabriel Lima2012-03-149-0/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | The type of the and expressions, e.g. (a && b), were being assigned to the type of the right hand expression (b). As reported in QTBUG-24660, this approach could lead to some unexpected behaviors. Now, when the left and right hand expressions are of different types, the responsability to deal with the and expression is delegated to v8. Task-number: QTBUG-24660 Change-Id: Ic42ebb035e62e2f197c337b2106d00453a99f04c Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
| * Disable particle-related examples from tst_examplesChris Adams2012-03-141-0/+4
| | | | | | | | | | | | | | | | | | CustomParticle and ShaderEffect are currently broken. Disabling these examples until they can be fixed. Task-number: QTBUG-24034 Change-Id: Ic1ebba1f66f28495822cd729af1e1c24acad79da Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Reuse a QQuickCanvas in examples auto test.Martin Jones2012-03-141-11/+25
| | | | | | | | | | | | | | Much faster than creating a new one for each example. Change-Id: Ic32f244047e0dba78134ba0e3d368260be838f1e Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Support module api objects in v4.Michael Brasser2012-03-144-9/+20
| | | | | | | | | | Change-Id: I72911a2c8e0a8613e53861da7b38312e51bf57da Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
| * Reuse QQuickView in GridView table driven testsMartin Jones2012-03-141-40/+88
| | | | | | | | | | | | | | | | Makes the tests run faster since we're not waiting for a window to appear all the time. Change-Id: Id2442cf32055084088c19865499055c7282bcae0 Reviewed-by: Bea Lam <bea.lam@nokia.com>
| * More refactoring on animation controllerCharles Yin2012-03-134-0/+167
| | | | | | | | | | | | | | | | | | Add a flag and helper functions for disabling user control in QAbstractAnimationJob class and make it synchronized with QDeclarativeAnimation class's disableUserControl flag. Change-Id: Ifa84ab0c78291941469c33f2cafe5f61ee718b2c Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-131-6/+6
| | | | | | | | | | | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I62d203f21df63a95ee236e578b10418fd9680707 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
| * Implement mouseDragCharles Yin2012-03-131-0/+74
| | | | | | | | | | | | | | | | | | Simulates the drag behavior by press-move-move-release mouse events, we need 2 move events here to trigger the drag threshold. Task-number: QTBUG-22753 Change-Id: Ic3470c061834b7410c524029d82375cba62afa36 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * QmlDebugging: Modify test JSDebug test casesAurindam Jana2012-03-131-4/+12
| | | | | | | | | | | | | | | | Add signals that are emitted on debugger responses for flaky auto tests. Change-Id: Ic59f559083b2b19fb8eec920dcb76f23125639a8 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
| * Reuse QQuickView in ListView table driven testsMartin Jones2012-03-131-44/+89
| | | | | | | | | | | | | | | | Makes the tests run faster since we're not waiting for a window to appear all the time. Change-Id: Ibff3706873dbad2f92d2135eae260368f4f4bb10 Reviewed-by: Bea Lam <bea.lam@nokia.com>
| * Default image scaling behaviour has changed; fix autotest.Toby Tomkins2012-03-131-2/+2
| | | | | | | | | | | | | | | | The default image scaling behaviour has changed in qtdeclarative. This change fixes the autotest to conform to fixed ratio scaling. Change-Id: I9c901825295fb04cab74c46f61696c5274ddd943 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Fix crash when writing property after engine deletionChris Adams2012-03-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Previously, the engine pointer stored in a QQmlProperty could be stale due to engine deletion. This commit ensures we guard that pointer. Also reverts cbb7f8b10e99fad675839d7625d3236ed67b3e01 Task-number: QTBUG-24734 Change-Id: I5349c51fbd19fa46a8710280173c1d224358b96e Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* | 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
| * Speed up view flick tests.Martin Jones2012-03-135-29/+26
| | | | | | | | | | Change-Id: I98b0a45b5afd0150bfacef2c1c1e814f70ae042f Reviewed-by: Bea Lam <bea.lam@nokia.com>
| * ListView.contentHeight does not include header and footer item heightsMartin Jones2012-03-132-0/+20
| | | | | | | | | | | | | | Task-number: QTBUG-24664 Change-Id: I2a2fe144835e61665b8693d58ca4fb9ba506e8a8 Reviewed-by: Bea Lam <bea.lam@nokia.com>
| * Fix leak in tst_qquicklistmodel unit testChris Adams2012-03-131-0/+2
| | | | | | | | | | Change-Id: I6883f263648d425240503f6abbd358b744d68506 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
| * Displaced items were moving unnecessarilyBea Lam2012-03-134-0/+260
| | | | | | | | | | | | | | | | | | | | | | | | They should only move if they actually change from the last set position, and not if they are simply changing from their current item position, as that is wrong during an animation. This also cleans up some code for resetting the transition data. Task-number: QTBUG-24586 Change-Id: I0a6635903975ebc40d5cf8398b943a9de92d4493 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Change repeater item to handle model being deleted.Glenn Watson2012-03-132-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | The repeater item previously stored a raw QObject pointer in a variant. When this pointer was a dynamic list model element that was deleted, the variant would continue to hold a stale pointer. Change repeater to use a guard object to hold the model when it is a QObject. Continue to use a variant to hold models that are not based on QObject to maintain same semantics. Change-Id: Ie100947132923803263c725e86efa68206382f12 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Fix v4 nested object access bug.Michael Brasser2012-03-121-1/+0
| | | | | | | | | | | | | | | | | | Use the correct type to look up the sub property. Task-number: QTBUG-24606 Change-Id: Iab372ca7440249241bf855d2875a947ad8fe4527 Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
| * Add additional v4 tests.Michael Brasser2012-03-125-0/+254
| | | | | | | | | | Change-Id: Id33eb50e4a01f3450515f6e666e18cb018f1706e Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
| * tests: enable headersclean also for cross_compile buildsRohan McGovern2012-03-122-7/+1
| | | | | | | | | | | | | | | | This test is no longer a host-only test. Enable it everywhere. Change-Id: Id7e65ad4d6f468b6b65d0f6035934fbd20fcb5e0 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
| * Remove unneeded dependencies to QtWidgets and QtOpenGLLars Knoll2012-03-1254-61/+47
| | | | | | | | | | Change-Id: I43bb54524f5786a838073df8812107dda7b0d56e Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
| * Fix MouseArea autotest.Laszlo Agocs2012-03-121-4/+9
| | | | | | | | | | | | | | | | | | The hover test seems to be simply wrong. The double click tests worked before due to the obscure handling of double click but were somewhat incorrect in any case. Change-Id: Ie5690e26eb5921fe149e128d24d331f52a5a9075 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>