aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml
Commit message (Collapse)AuthorAgeFilesLines
* Adapt tests to new events from qqmlprofilerserviceUlf Hermann2013-11-291-10/+10
| | | | | Change-Id: I59baa1f9aa0751d4bffc6eff0332318efc6fe9a8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix JavaScript signal connect on alias without other handlersSimon Hausmann2013-11-292-0/+41
| | | | | | | | | | | | | The changed handlers for aliases are connected lazily in the engine. QQmlPropertyPrivate::flushSignal is responsible for that and called in other places, for example when installing a onSomeAliasPropertyChanged handler. However we were missing a call to flushSignal when doing onSomeAliasPropertyChanged.connect(...), i.e. using the JavaScript connect API. Task-number: QTBUG-30493 Change-Id: Ia3f008626fd7af3f2cfbdd30d13fb83158bed4d5 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* tst_qqmlxmlhttprequest: Use QScopedPointer.Friedemann Kleint2013-11-211-196/+99
| | | | | | | | Ensure resources are cleaned up in case of failing tests. Change-Id: Ie27800da37beac09fec34111af276ed029dcde20 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-11-2025-23/+505
|\ | | | | | | Change-Id: Id732233d56e8d1706f62ef7a153d4a471406c551
| * V4: fix Array.indexOf() for QStringListLiang Qi2013-11-202-0/+15
| | | | | | | | | | | | | | | | | | Autotest is included. Task-number: QTBUG-33542 Change-Id: I46c3a81006019c6613a3d35aa018217f85a15d0b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
| * V4: remove failing assert and fix code.Erik Verbruggen2013-11-192-0/+26
| | | | | | | | | | | | | | | | | | | | Assert failed for cases where the node’s ancestor with lowest semi-dominator number was not the same as the parent. The test case exemplifies this. Task-number: QTBUG-34792 Change-Id: Ie6847b22a27211801bff7479bfcbfaf329c6005a Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
| * Fix failing assertion when trying to assign to an id referenced QML objectSimon Hausmann2013-11-192-0/+18
| | | | | | | | | | | | | | | | | | | | References to id addressed QML objects are member expressions, which are unlike other member expressions by not being lvalues. Handle this correctly. Task-Number: QTBUG-34890 Change-Id: Ied6230edbc561128ad36bf0d1a1918185204deec Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Make comparison of singletons and qobjects workAlbert Astals Cid2013-11-183-0/+120
| | | | | | | | | | | | | | | | | | | | | | Otherwise you can end up with some weird situation in which you have two objects, you print them and then you print the comparison and get a Foo(0x858480) b Foo(0x858480) a == b false Task-number: QTBUG-34651 Change-Id: Id2444d919f039be085eb5ed9112345db691540a5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix interaction between head room and appending in arraysLars Knoll2013-11-181-0/+13
| | | | | | | | | | | | | | | | | | | | We reserve space on both ends of the JS array for appending and prepending. Make sure they interact well with each other and don't cause any memory corruption. Task-number: QTBUG-34853 Change-Id: I184280178690e3cb12ab9b199a8436b32383af38 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Don't assert in QQuickItem::updateLars Knoll2013-11-182-0/+22
| | | | | | | | | | | | | | | | | | | | | | The method can actually be called from QML, so we can not have an assert in that method. Instead simply return if the item has no contents Task-number: QTBUG-34060 Change-Id: Ib28ffa5c6c63fbec956abe25020010ed73a9cfa9 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Limit the amount of memory we allocate on the stackLars Knoll2013-11-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setup limits for both the C and the JS stack, and check them before entering functions. If we run out of space, throw a RangeError exception. Be careful and recheck the stack bounds when things go outside. This catches the case where the engine got moved to another thread changing the stack boundaries. Windows currently uses an unsafe fallback implementation, this needs to be fixed later on. Task-number: QTBUG-34568 Change-Id: I22fbcbec57b28f9cc8a49e12f1cc6e53e4f07888 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Don't call receivers from disconnectNotifyAlan Alpert2013-11-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | A pending documentation update is going to explain that you can't call into QObject functions from disconnectNotify, or it may deadlock on the signalSlot mutex. Task-number: QTBUG-34829 Change-Id: I57e7b4e457d813d4255c8cdbe36228b2e0f45aaa Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Remove '-enable-debugger' argument from qml executableKai Koehne2013-11-165-7/+3
| | | | | | | | | | | | Task-number: QTBUG-34836 Change-Id: I3ab2a16036a1086c0ac1f50880a402caf9f54f2d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * Fix === operator for value typesLars Knoll2013-11-154-1/+69
| | | | | | | | | | | | | | | | | | Fix === comparison for urls and other QML value types. Task-number: QTBUG-33546 Change-Id: I4a7066e6bbc7de7c599fe2c7b2fdfb75e0ff5196 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Don't crash when trying to assign to null.propLars Knoll2013-11-153-0/+32
| | | | | | | | | | | | | | | | | | | | Fixes a regression introduced during the exception handling refactoring. Task-number: QTBUG-34544 Change-Id: Ib751274d759030db3e5d3b1380b30dc07ec85f83 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Make tst_qqmlprofilerservice more robustKai Koehne2013-11-151-2/+3
| | | | | | | | | | | | | | | | Don't expect only application output to be printed. E.g. a stray qDebug somewhere in Qt could break this test so far ... Change-Id: Ibdc31fba3bd8d822c264bd44515d16e648db9a8e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * V4 debugging: Fix instable test.Erik Verbruggen2013-11-141-2/+2
| | | | | | | | | | | | | | | | | | Request the scripts after hitting a breakpoint. The reason this test could fail before, is that the engine might be calling into the debugger even before any script was loaded. Change-Id: Iba49f445ab97afaf2bb168b04063432ca2f9dddd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Allow passing qmlRegisterSingletonType QObjects to C++ as QObject*Albert Astals Cid2013-11-144-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | At the moment you can pass them as their FinalType* or as one of their ParentType* but not as QObject* which does not make much sense to me Task-number: QTBUG-34617 Task-number: QTBUG-30730 Change-Id: Id5cfb7bbb123456ef43f44f33b450f8966a7641a Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Revert ffaf39e9a7f11d4e2800b3b37160a2a952795614Alan Alpert2013-11-131-1/+1
| | | | | | | | | | | | | | | | | | Making it public right now seems a little premature, given all the work happening on the engine now (and for 5.3). We'll be in a better position to commit to it or not next release. Change-Id: Ib7b14afeb9205fb8a87ed16a6d38b1f468b2bbbb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Polish up QQmlFileSelectorAlan Alpert2013-11-132-9/+20
| | | | | | | | | | | | | | | | Incorporate beta feedback, and hide QQmlAbstractUrlInterceptor as the implementation (instead of making that "the API"). Change-Id: Ib7b14afeb9205fb8a87ed16a6d38b1f468b2aaaa Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * V4 IR: scan arguments when entering function scope in QML.Erik Verbruggen2013-11-122-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | When doing IR generation for a function declaration in a QML object, call through the helper methods to check for forbidden names, and most importantly, also checks if the function has parameters. If the latter is the case, they need to be added as a member for the current scope in order to get IR generation correct. Task-number: QTBUG-34493 Change-Id: I0ade15ee19e1b1ac8ee2f2d3fa186d1551800199 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * V4: fix loop block marking for initializer blocks.Erik Verbruggen2013-11-122-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Any new blocks generated as part of the initializer were incorrectly marked as belonging to a loop. For example, if a LocalForStatement would contain a ternary expression, the generated then and else blocks would be marked. This would confuse the block scheduling, because all blocks are postponed unil the condition block (“group start”) is scheduled. Task-number: QTBUG-33754 Change-Id: I45919ebeac356f015bb91fe0210472b3df0b56d8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Stabilize tst_qpauseanimationjobFrederik Gladhorn2013-11-201-34/+17
| | | | | | | | | | | | | | | | | | This test is highly timer dependent and contains so many windows special cases that indicate problems (when timers are not accurate or the machine is busy). Change-Id: Ie057d560d39300252ffb6c19b4d1446179c0e56a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | qqmldebugclient.cpp: Fix warning about missing return.Friedemann Kleint2013-11-181-0/+1
|/ | | | | | | | | | | In file included from ../shared/qqmldebugclient.cpp:473:0: ../shared/qqmldebugclient.cpp: In member function 'QString QQmlDebugClient::stateString() const': ../shared/qqmldebugclient.cpp:452:1: warning: control reaches end of non-void function Change-Id: Ic5422dcff41591691621077ade45b6ea3ea3a8f1 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Intercept qmldir files with the url interceptorAlan Alpert2013-11-116-1/+31
| | | | | | | | | | | There's another code path which loads qmldir files directly, and it did not use the interceptor when available. Note that this, like other interceptors, does not affect baseUrl and so any other qmldir file still must have paths relative from the initial URL. Change-Id: I620943c36d488d22fbaf1793514075d31ab76e3e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Debugging with V4Erik Verbruggen2013-11-103-319/+177
| | | | | | | | | Currently missing, but coming in subsequent patches: - evaluating expressions - evaluating breakpoint conditions Change-Id: Ib43f2a3aaa252741ea7ce857a274480feb8741aa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add a new variant of qmlRegisterSingletonType for QML singletons.Antti Piira2013-11-093-0/+123
| | | | | | | | | | | | | | Adds a new public API to register a QML based singleton type from C++. This is the equivalent of the the qmlRegisterType, but for singletons. qmldir file is not needed for types registered through this function, but the type still needs to include the following pragma statement among the import statements: pragma Singleton Change-Id: Icb35b665fe2a8605667fe8ac575347be2a60490c Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix a few more compiler warnings in release buildsLars Knoll2013-11-091-7/+0
| | | | | Change-Id: I826226b7ddd4a74037b5bbe9a4a7322d404f53a9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove debugging tests for commands not used by Qt Creator.Erik Verbruggen2013-11-091-122/+0
| | | | | | | These are also not (yet) implemented in the V4 debugging engine. Change-Id: If47b97535e69117193b87d278131f19bd4120c57 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Simplify & speed up function callingLars Knoll2013-11-091-2/+2
| | | | | | | | | Get rid of the SimpleCallContext, instead simply use the CallContext data structure, but don't initialize the unused variables. Change-Id: I11b311986da180c62c815b516a2c55844156d0ab Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Ensure the this object is set correctly to the scope object in binding ↵Simon Hausmann2013-11-052-0/+20
| | | | | | | | | expressions This is a regression from 5.1 Change-Id: I61ad372a02d937c195dad74bd9fcb8fd4410d97a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix rounding behavior of Qml when assigning doubles to integer propertiesSimon Hausmann2013-11-051-4/+4
| | | | | | | | | | | | The engine used to round, but that is inconsistent with ECMAScript's way of converting doubles to integers by truncation. With this patch we can also enable the propagation of integer type information into the IR, but we have to be careful not to utilize it when writing properties. Change-Id: I04af4879ba5131349eca2eeff2b27f4598f5267b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* tests: fix tst_qqmlmoduleplugin::incorrectPluginCase()Liang Qi2013-11-011-7/+7
| | | | | | | | | It gives different error message based on the case sensitivity of the file system on Mac. Task-number: QTBUG-32652 Change-Id: I52415126e63978c9f80b7652e0116e0e07703fd8 Reviewed-by: Liang Qi <liang.qi@digia.com>
* Fix valgrind errors in tst_qqmlecmascript::revisionSimon Hausmann2013-11-011-1/+1
| | | | | | | | | | | | | | The QML code looks like this: MyRevisionedClass { prop1: prop2 } and MyRevisionedClass is C++ based. We need to return an initialized value when reading prop2. Change-Id: I33792c04aa1ba0d8e38c1351b8fb4de7abbe4891 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Speed up lookups of imported scriptsSimon Hausmann2013-10-311-8/+8
| | | | | | | | | | The QQmlContextData stores the JS objects of imported scripts in a QList<PersistentValue>. Instead of indexing into that list, this patch changes ctxt->importedScripts to be a JavaScript array, that in the IR we can index via subscript. Change-Id: Ie2c35fb5294a20a0b7084bb51d19671a27195fec Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* tests: replace nokia with qtproject in tst_qqmlmodulepluginLiang Qi2013-10-3157-86/+86
| | | | | Change-Id: I674da7f77dde380fb0772d5077da84de875b6ce8 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Initial support for resolving meta-property access for the scope and context ↵Simon Hausmann2013-10-311-0/+1
| | | | | | | | | | | | | | | | | objects at QML compile time This avoids having to do a string lookup for ids and in the import cache at run-time, before we can do a string hash lookup in the property cache. Instead we resolve final properties in the context and scope object at compile time and look them up at run-time using their index instead. The dependencies to these properties are also tracked separately and recorded in the compiled data. This is merely the initial patch. There's a lot left to do, such as having specialized getter and setters for specific property types. Setters are missing altogether right now and will fall back to name lookup. Change-Id: If3cb4e7c9454ef4850a615f0935b311c9395b165 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix qqmllocale testAlan Alpert2013-10-301-5/+1
| | | | | | | | | | Test was only passing the time to the format function, thinking it was the only part under test, but the date is also relevant due to DST being part of the formatted output. Task-number: QTBUG-34406 Change-Id: I1f542b58907281632ee3c96b9b5b38426936953e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix adding created objects to instantiator.kakadu2013-10-294-0/+169
| | | | | | | | | | | | Before all new objects were pushed into the end of QVector, i.e. if item model changes object with low index newly created object will be added like it has big index. So, removing objects from instantiator was buggy. Task-number: QTBUG-33847. Change-Id: I49fba53a40fce72060b629f737c10b525c67cc86 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QQmlSettings: fix loading of initial valuesJ-P Nurmi2013-10-291-0/+18
| | | | | | | | | | When the initial value of a QML Settings var property is invalid ie. it has no initial value set, it must be loaded from QSettings as is without testing QVariant conversion (that would fail when the conversion target type is "invalid"). Change-Id: If002d52251e3f2d6373dcc305b439de61c6b8c79 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Disable DST related locale test temporarilySimon Hausmann2013-10-291-0/+4
| | | | | | | | We prioritize getting other fixes into QtQml right now, so skip these tests. According bug is filed. Change-Id: I9b824e41d2164906b22282e75aa80a69a4ce5652 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Properly propagate parse errorsLars Knoll2013-10-291-32/+41
| | | | | | | | Replace all try/catch statements used when parsing with checks for engine->hasException. Change-Id: I4493cb600d5a3eb095c2003bb88bd031403e47c9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use finalUrl in QQmlTypeLoader::Blob::addPragma to fix a bug.Antti Piira2013-10-252-0/+30
| | | | | | | | | | There was a bug in addPragma where url() was being used instead of finalUrl(). This resulted in an error finding the type if selectors were used. This patch includes the fix and adds a unit test to cover the use case. Change-Id: I18b6c73e96af2e1464931de76f1f8fd804746d82 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4 debugger: retrieve formals and locals.Erik Verbruggen2013-10-241-1/+166
| | | | | Change-Id: I47507a4d7d1b429b9c43ed3a7822079efe577327 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Avoid crash when a QML signal is connected to a non-void slotJ-P Nurmi2013-10-223-0/+24
| | | | | | | | | | Don't pass a QVariant pointer for the return value when we're not interested in it and the return type might not even be a QVariant (that would be only true for QML methods). Task-number: QTBUG-32801 Change-Id: I8f14e40d8f94caef7e3d086b776735f0484dbf0e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Re-enable debugger autotests on MacKai Koehne2013-10-221-7/+3
| | | | | | | | | Partially revert 8ed38c70 to also test qqmlprofiler, qqmlinspector on Mac. The tests were unreliable before, but that was fixed with 816e7f11f in qtbase. Change-Id: Icca7ff6617ea18d069d4cd95905d76fe59b92e31 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* tests: Replace Q_OS_MACX -> Q_OS_OSXSergio Ahumada2013-10-211-1/+1
| | | | | | | | Use the correct identifier for the OS X operating system. Change-Id: Iff433d312c7c808ddce13466be3db628cf3a9890 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Fix crash in FolderListModelFabian Bumberger2013-10-172-5/+24
| | | | | | Change-Id: I8d012e9a356676dd3dad246579c7339eaddc1e91 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix flaky QQmlProfilerService::scenegraphData testKai Koehne2013-10-171-6/+5
| | | | | | | | | | | QSGRenderThread::syncAndRender first triggers the frameSwapped() signal, and only then adds the SceneGraphRenderLoopFrame message. We're waiting for the frameSwapped signal to stop profiling, and therefore can't be sure whether we'll get the final SceneGraphRenderLoopFrame message or not. Task-number: QTBUG-33024 Change-Id: I3216667e8e5cdc79f210290ce22cc6b08c579b6a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Improve output of test caseKai Koehne2013-10-165-3/+61
| | | | | Change-Id: Ib36583120ca42835534f0f8494637aeb9618f317 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>