aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Move V4 debugger and its test into better placesUlf Hermann2015-10-305-42/+44
| | | | | | | | | Now that we have an abstract base class we don't need to carry the V4 debugger in QtQml anymore. The test clearly belongs into the debugger category. Change-Id: I0f71bdb331da8a568e43600363a0468299aa1a87 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into origin/devUlf Hermann2015-10-229-47/+250
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debuggeragent.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debuggeragent.h src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h src/qml/debugger/qqmldebugserviceinterfaces.cpp src/qml/jsruntime/qv4debugging_p.h Change-Id: I82a4ce1bcd4579181df886558f55ad2b328d1682
| * QmlDebug: Add a debug service for use with native debuggershjk2015-10-163-1/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This service provides information about the state of the most recently used QmlEngine in a way that can be integrated with "native" debuggers (GDB, LLDB, potentially CDB). Unlike the existing QV4 debugger service, the data extraction is triggered by direct calls from the native debuggers, i.e. has the examined QmlEngine stopped at the time of inspection. Since roundtrips through the native debuggers are expensive, an additional goal is to minimize roundtrips. Change-Id: Ic420129bbc15162197e35b52d92e882c027c9f6d Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
| * Support alpha in QQuickWindow::grabWindow().Gunnar Sletta2015-10-161-6/+23
| | | | | | | | | | | | Change-Id: I2dd69745427d8f5e882303d2a4de3935ddca02e9 Task-number: QTBUG-48787 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Only set V4 debugger when service is enabledUlf Hermann2015-10-151-0/+3
| | | | | | | | | | | | | | Otherwise different debug services could steal each other's debugers. Change-Id: Ic0a50333d21c7d20a7124240ea598f8446400ae3 Reviewed-by: hjk <hjk@theqtcompany.com>
| * Don't delete singletons objects owned by C++.BogDan Vatra2015-10-153-0/+36
| | | | | | | | | | | | | | | | | | | | This way we can enable the usage of a single singletons in both worlds. Currently singletons are destructed before the other QML types, and using a singleton that is owned by C++ we don't need to care about the destruction order anymore. Change-Id: I120fcb8659e16321ae6e70c7b0d62be3bc650d73 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Align QQmlVMEMetaData to int.BogDan Vatra2015-10-151-0/+10
| | | | | | | | | | | | Task-number: QTBUG-48139 Change-Id: I12bec1ec72a99de0c3f5b4b12d22fba2b66c8f49 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * QmlDebug: Split QV4::Debugging::Debuggerhjk2015-10-141-40/+44
| | | | | | | | | | | | | | | | | | | | ... into a pure interface and a QV4::Debugging::V4Debugger implementation. This is in preparation of a second implementation of this interface to be used with 'native mixed' debugging. Change-Id: I3078dcfe4bdee392a2d13ef43a55ca993e7b88d8 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* | Put QPacketProtocol into its own static libraryUlf Hermann2015-10-153-113/+28
| | | | | | | | | | | | | | | | | | | | | | | | We need it in 3 places in qtdeclarative and we could also use it in QtCreator. We don't want to bundle it with the debug client code as it is also necessary for the server. QPacket replaces QQmlDebugStream as it has the same purpose. This also fixes the inconsitent handling of data stream versions. Change-Id: I650fae353f267511c551b427d9169f4d718aa7f2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Test enabling/disabling of combinations of debug services.Ulf Hermann2015-10-154-11/+102
| | | | | | | | | | | | | | This tests the new QQmlDebuggingEnabler::setServices() method. Change-Id: I29b588fa425a8e3230c451d6ff73a1bde104bfc4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Properly test services arguments for QQmlDebugServerUlf Hermann2015-10-158-1/+60
| | | | | | | | | | | | | | | | | | So far we have only tested that each service is still functional when the services:<service> argument is given on the command line. This test checks that services which aren't specified are indeed not loaded. Change-Id: Ica935da0337b2215898f65cf283d6e11365432a8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-14121-103/+501
|\| | | | | | | Change-Id: I11ea57222ba5aa683b7bfd7735fbc1d2cf86e875
| * QQuickItem: correct focus reason for key navigationLiang Qi2015-10-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before we used Qt::OtherFocusReason for normal key navigation, such as up/down/left/right. But in style world, the reason is critical for focus change. Now we follow the way in widgets world, use Qt::TabFocusReason and Qt::BacktabFocusReason for down/up and right/left(or reversed if mirrored). Task-number: QTBUG-41801 Change-Id: I99e97ea4ced2cef9b3280c578c3a463de8fe1727 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * Provide a threaded TestHTTPServerUlf Hermann2015-10-149-59/+127
| | | | | | | | | | | | | | | | | | This allows us to do blocking operations that interact with the test server in the main thread. The threaded server is used in tests that don't explicitly require asynchronous operation. Change-Id: Ibcb28e79a1114cb9cfb812e86aae0a1af71c569e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Tests: Fix single-character string literals.Friedemann Kleint2015-10-1319-38/+44
| | | | | | | | | | | | | | | | Use character literals where applicable. Change-Id: Ib0e618752fbc762a73a0a91c43efab61ef2c9687 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Don't send delayed mouse presses to ancestors of the replaying Flickable.Andrew den Exter2015-10-122-2/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | If a Flickable delayed a mouse press event and then replayed it later, ancestor items of that Flickable would receive the press twice: once when filtering events of the Flickable, and again when the event was replayed to a descendent of the Flickable. Extend the protection against a Flickable receiving that repeat event to all ancestor items so this doesn't happen. Change-Id: I438c146130c24a7d47e9e8712a1ab08f3d915a06 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
| * Make QML composite types inherit attached propertiesJ-P Nurmi2015-10-094-0/+28
| | | | | | | | | | | | | | | | Change-Id: Ic06af4805da987dd08e361f2668e7a1788d3eefe Task-number: QTBUG-43581 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | | | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * Purge spurious execute permissions.Edward Welbourne2015-09-3086-0/+0
| | | | | | | | | | | | | | | | JavaScript, README and QML are not meant to be run from the shell. Change-Id: Ia1ddf621e2e341639daac651e2b4954364407574 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Flickable: remove spurious emission of content size changesJ-P Nurmi2015-09-291-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | If contentWidth or contentHeight is negative (unspecified), Flickable should not emit contentWidthChanged() or contentHeightChanged() when its own geometry changes. The value of contentWidth or contentHeight does not change. It remains negative (unspecified). Change-Id: Iad478d11e2e4370d2e94abe84cfd62d144e23dd9 Task-number: QTBUG-35038 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
| * Cleanups to property allocation in the VMEMOLars Knoll2015-09-251-0/+2
| | | | | | | | | | | | | | | | There's no need for a separate propertiesAllocated bool, we can keep that state in the WeakValue itself. Change-Id: Ife0f517bee9bc5830680eec68983767379a3c2cf Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Add extension API to QJSEngineMitch Curtis2015-09-251-3/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows users in a JavaScript-only environment to install extensions including: - Translation functions (qsTr(), etc.) - The console object (console.log(), print(), etc.) - Garbage collection functions (gc()) This deprecates installTranslatorFunctions(). This API results in less clutter in the API, as we'd otherwise need to have several functions for each type of extension. [ChangeLog][QJSEngine] Introduced an extension API that allows installing various function and object extensions (qsTr(), console.log(), etc.) to QJSEngine. [ChangeLog][QJSEngine] installTranslatorFunctions() was deprecated in favor of the new extension API (see installExtensions()). Change-Id: I4d6eb2097c3eda6810e967b2e8f6441c28c91a16 Task-number: QTBUG-40772 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Cleanup fontloader cache when QGuiApplication is destroyedJørgen Lind2015-09-254-0/+82
| | | | | | | | | | | | | | | | | | | | If this cache is used for a second instance of QGuiApplication then the cache is invalid. Change-Id: I02ca16dc03a1239b0ed50c7bcfbf87880ca8d948 Task-number: QTBUG-40861 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-09-2525-123/+549
|\| | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmldebug.cpp Change-Id: I93de5a81b18cdece475870cf7cfba1b9baef2304
| * V4: Fix SparseArray::deleteNodeRon Hashimoto2015-09-253-0/+39
| | | | | | | | | | | | | | | | | | SparseArray::deleteNode should modify size_left only if the deleted node had a right child Change-Id: I0f3504a5c6568dbd9e392bf83eaf3f9780eb2b84 Task-number: QTBUG-46022 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Improve warning for QtQml.BindingTobias Koenig2015-09-243-0/+58
| | | | | | | | | | | | | | | | | | | | Print a warning if there is no property with the given name of the specified target object, or the property is read-only. Change-Id: I5dc2e8330fb1ce53be396b7bf5baf13c1702d2f4 Task-number: QTBUG-39243 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Use V4 double-to-string conversion instead of QVariant'sUlf Hermann2015-09-232-0/+32
| | | | | | | | | | | | | | | | | | V4's version makes an effort to find the shortest possible representation, which QVariant doesn't do. Task-number: QTBUG-47070 Change-Id: I49ce130020496592325074e0db29a6984ee7649a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Inline property data into the objectLars Knoll2015-09-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Append the part of the objects property data that is known ad instantiation time to the object itself and by that avoid creating a separate MemberData. Saves some memory and should speed up object creation. Currently implemented only for Object and ArrayObject. Change-Id: I7693bf2f3a28fb718522398ebb94ac115e021fa4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Make QML composite types inherit enumsJ-P Nurmi2015-09-215-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: in Qt Quick Controls 2, enums declared in the abstract C++ base types were not accessible with the concrete QML type name, but had to be referenced using the base type name: Slider { snapMode: AbstractSlider.SnapOnRelease } Solution: this change resolves the C++ base type and creates the missing link between the composite type and its base type's meta- object. This allows referencing enums using the concrete/composite QML type name: Slider { snapMode: Slider.SnapOnRelease } Change-Id: Icefdec91b012b12728367fd54b4d16796233ee12 Task-number: QTBUG-43582 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * TextEdit: selectedTextChanged not emitted when calling select 2nd timeDan Cape2015-09-211-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qquicktextcontrol was only checking if the text was previous selected or not and if the current state matched the previous state it would not dispatch a selectedTextChanged event. This is wrong if you programmatically select text a second time with a different start or end of selection. You must notify that the selected text changed since visually you can see the highlight changed locations. When correcting this and creating a test case, it was seen that other tests had QEXPECT_FAIL set for this specific case. Upon further inspection, I could remove those calls and adjust the expected data that was set before the test (changing false to true). testing of tst_qquicktext: Totals: 182 passed, 0 failed, 0 skipped, 0 blacklisted testing of tst_qquicktextedit: Totals: 354 passed, 0 failed, 3 skipped, 0 blacklisted Task-number: QTBUG-38704 Change-Id: Ib5244dc264ab76951bb722a31dcb64717282725a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * Add DataView unsigned integer getter/setters with correct casingsNobuaki Sukegawa2015-09-211-3/+32
| | | | | | | | | | | | | | | | | | | | According to the spec, unsigned integer getter/setters should be cased "Uint". http://www.ecma-international.org/ecma-262/6.0/#sec-dataview.prototype.getuint8 For backword compatibility, this diff does not remove mis-cased methods. Change-Id: I8e65dca12b8358376dbb3c519246c8abca0d47b0 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * ListView: Set currentItem's culled state on geometry changeGabriel de Dietrich2015-09-212-0/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the viewport is moved, the ListView may cull its currentItem if it's out of the viewport bounds. However, it could be that this is only a transient state while the currentItem is being animated. Unfortunately, we don't uncull the currentItem at any moment during the animation. To solve this, we simply set the currentItem's culled state every time its geometry changes. Change-Id: I72d548f13f229029ccd8568721ea23e73f7b4392 Task-number: QTBUG-48044 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * Refactor TestHTTPServer.Friedemann Kleint2015-09-152-95/+96
| | | | | | | | | | | | | | | | | | | | | | | | - Prefix member variables by m_. - Coding style fixes, wrap line long lines and statements. - Compile with QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII. - Introducde Qt 5 connection syntax. - Streamline code. - Use iterators for hashes. Change-Id: Ib6528220063248e09f7c19594233b7cd5940e0a8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Implement QQmlListModel::setData()Tobias Koenig2015-09-141-0/+31
| | | | | | | | | | | | | | | | | | | | Extending QQmlListModel by setData allows us to modify the content of the ListModel from within a delegate by doing an 'model.someProp = someValue' assignment. Change-Id: I87e4c31aca3813f099b2a4fd694beb2492a03bd0 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * Fix autotestsLars Knoll2015-09-144-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 35793cea28c4bd1d6d8fbae884d9ae3c19745c61 caused changes to font metrics on Mac when running our autotests. This change adjust auto tests to pass again after the change. Fix QQuickText::fontSizeMode autotests. The calculations are font dependent, and with small differences in the fonts between different OSes it's difficult to find values that work everywhere. Also fix the baseline calculations for some items that were using the wrong fonts (exchanging empty and non empty calculations). Fix language dependent differences on metrics calculations in tst_qquicktextinput. Change-Id: I7d0c7c79c8c62a4619b2f0e95ef53660b7feb782 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * Move createQmlCallableForFunction out of the binding wrapperLars Knoll2015-09-081-1/+1
| | | | | | | | | | | | | | | | | | It's now QV4::FunctionObject::createQmlFunction, which I believe is a better place and name for the method, esp. as it has no real connnection to the binding wrapper anymore. Change-Id: I59e20e120db72e53735b3a986e0b91bc7c3347d7 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Add some necessary files to qquickanimations.proUlf Hermann2015-09-151-0/+55
| | | | | | | | | | Change-Id: Iddf0a5d1e344d1d74f5d7b87a70285ae49f3e095 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Fix OTHER_FILES in qquickcanvasitem.proUlf Hermann2015-09-151-3/+26
| | | | | | | | | | | | | | It's very handy for IDEs if it matches the actual files. Change-Id: Ib19b5ddc322260a9b24f3cf2f618e06a943cfa9d Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Re-enable QDebugMessageService testUlf Hermann2015-09-152-8/+4
| | | | | | | | | | | | | | | | The lines were wrong and the signal handling was flawed. Otherwise the test works fine. Change-Id: I818fd3ec92b3413c938ee125a3bb2662cd71faa1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Allow forced completion of asynchronous Loader.Michael Brasser2015-09-101-0/+69
| | | | | | | | | | | | | | | | | | | | | | Setting Loader::asynchronous from true to false will attempt to force complete any operations in progress. This allows the user to begin loading something in the background, and then force the load to complete once the Loader's content must be viewed. Change-Id: I056dcc20faacb38b3529c967245416da9949e64a Task-number: QTBUG-29789 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Add enabled property to the QML Connections elementDan Cape2015-09-092-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | Now allows a quick way to enable/disable the signal handlers in the QML Connections element. Updated test file to have objectName and added test for this new functionality. Set to be available as of QtQml2.3. [ChangeLog][QML Elements] Allow enabling/disabling of connections established using a Connections element Change-Id: Ib0de2b3c78bb529ef74d5b4bb4ccb0f335cc50de Task-number: QTBUG-36350 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-09-0615-8/+108
|\| | | | | | | Change-Id: Id27c36e55fcc68cc1140b0d9bec00b8ae6b52ed0
| * Item views: Don't emit 'currentItemChanged' if the current item didn't ↵Gabriel de Dietrich2015-09-054-0/+12
| | | | | | | | | | | | | | really change Change-Id: I8892bb9b6ab6737d4a6f6f8aab836f863668682e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * QQuickView/QQuickWidget::errors(): fix crashJ-P Nurmi2015-09-032-0/+5
| | | | | | | | | | | | Change-Id: Ie37ed5fac642931b658d2b738ddd45d23cda54c6 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
| * Temporarily blacklist importsPath change on Windowsv5.6.0-alpha1Simon Hausmann2015-09-031-0/+2
| | | | | | | | | | | | | | | | The test started failing with no changes in declarative, so the best theory at this point is a networking related change in qtbase. Change-Id: If361253847d781126d3877080648f5ccc07808cd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Merge remote-tracking branch 'origin/5.5' into 5.6Simon Hausmann2015-09-023-0/+78
| |\ | | | | | | | | | Change-Id: Ibc7a47f7ce6d15dff79fdc59f8ded297d1b8d50d
| | * Don't consider QLocale a value type.Mitch Curtis2015-09-022-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression where all of the properties of Qt.inputMethod.locale were undefined. Change-Id: Id33890a78296709baad6aeda96d74ca8cb39c61d Task-number: QTBUG-47916 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| | * Fix hue clamping in Context2DLaszlo Agocs2015-08-241-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | It goes from 0..359, not 0..255. Task-number: QTBUG-47894 Change-Id: I0612a9d5e4999afae7703b5c49741b94fb0da07f Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
| * | XHR: Server side errors are not network errorsJulien Brianceau2015-08-272-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XMLHttpRequest specs state that only 'network errors' should result in a request error, and a server side error like HTTP 500 Internal Server Error (which results in QNetworkReply::InternalServerError) is an indication of the HTTP server response rather than a network error. Change-Id: I94bf678a8487e3d31007dc5119d6fb4e87ea3102 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Valery Kotov <kotov.valery@gmail.com>
| * | Fix sha1 of test262Simon Hausmann2015-08-251-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | While .gitmodules was pointing at the new URL, the sha1 for the submodule was pointing to the old github repository. Change-Id: Ie0b9f39e13a6e759249aaaf0e90c5a242bb36134 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>