summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
Commit message (Collapse)AuthorAgeFilesLines
* Smooth dragging an item with MouseArea.Andrew den Exter2013-03-191-10/+10
| | | | | | | | | | | Calculate drag distance relative to the mouse position when a drag is detected rather than the press position so there isn't a large change in position on the first move. Task-number: QTBUG-30188 Change-Id: I46918a7b3c62bdaef567b6a9fed651ce33434247 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Fix jump and property changes on first move when dragging a Flickable.Andrew den Exter2013-03-192-2/+8
| | | | | | | | | | | | Fixes a regression whereby on the first mouse move the contentItem was moved the total distance from the touch point to where the drag distance was exceeded. For large drag thresholds this causes a noticeable jump. Task-number: QTBUG-30032 Change-Id: I92c119d27dc2e22203484f9ada5978697d171957 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Makes QSmoothedAnimation respect zero duration.Thomas Kristensen2013-03-132-0/+33
| | | | | | | | | | | In automated GUI test scenarios it often desired not to wait for animations before verifying a result, so setting the duration to zero should accomplish this, before this patch; if duration was set to zero QSmoothedAnimation would treat it as if duration was not set, and used velocity to calculate animation speed. Change-Id: Ie6520d6c595bd014f3cab69bbb527e773f3850da Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Fix warning about adding int to a QString (CLANG).Friedemann Kleint2013-03-111-1/+1
| | | | | Change-Id: If83018b1bd6dcaf7f8104fa9c4c3f4359062623e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix warnings about unused variables in tests (CLANG).Friedemann Kleint2013-03-114-28/+23
| | | | | Change-Id: I29d4a41d2b6c4ac5c7b27930257c3853500325a1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Improve emission of FocusScope focusChanged signals.Andrew den Exter2013-02-273-13/+540
| | | | | | | | | | | | | | | | | | | | | | Emit activeFocusChanged up the focus tree when an item receives a focus event, rather than when the focusItem changes which happens before internal state is sufficiently updated for hasFocus and hasActiveFocus to return the correct values from within a changed signal handler. There are some limitions to this. First the signals are not emitted reliably when the scene is not active which makes sense for activeFocus but not for focus. The second is in some instances the focus and activeFocus can update unnecessarily while the focus chain sorts itself out. QDeclarativeItem tests by Andreas Aardal Hanssen <andreas@hanssen.name> Task-number: QTBUG-28288 Task-number: QTBUG-25644 Change-Id: Ib3d17c42754c15a08b34c3388f50b45cc1d2a831 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Flickable shouldn't grab the mouse until it starts an effective move.Andrew den Exter2013-02-223-2/+116
| | | | | | | | | | If the boundBehavior prevents the flickable from moving its content item in response to a drag it shouldn't grab the mouse as that will prevent a parent MouseArea or Flickable from handling the drag. Task-number: 29718 Change-Id: Ief82ef7b898ea2581fd0b7e52548f451d887e2f1 Reviewed-by: Alan Alpert <aalpert@rim.com>
* MouseArea shouldn't grab the mouse until there is an effective drag.Andrew den Exter2013-02-222-0/+120
| | | | | | | | | | A MouseArea shouldn't prevent a parent MouseArea or Flickable from handling a drag event unless it is going to do something useful with it. Task-number: QTBUG-29717 Change-Id: I17caa51ebc2e547e73e727fd185e60644591ad2b Reviewed-by: Alan Alpert <aalpert@rim.com>
* Merge branch 'release' into stableSergio Ahumada2013-01-311-1/+1
|\ | | | | | | Change-Id: Ied6e28f0e7e3dceccdbbe878dfab8f88c64e32d8
| * test examples only in developer buildsOswald Buddenhagen2013-01-111-1/+1
| | | | | | | | | | | | | | | | | | we don't want to actually build examples in production builds any more, so the test is bound to fail. Change-Id: I5c936a5b193aa575a0193dcf0968cce9c20c505f Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | remove pointless conditionalsOswald Buddenhagen2013-01-3071-142/+71
| | | | | | | | | | | | | | | | it's not entirely clear why anything inside the declarative module would have a conditional on the presence of the declarative module ... Change-Id: Ie6e22840b6d1d63da90c7d02aedb14fd870191af Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | make use of qtHaveModule()Oswald Buddenhagen2013-01-282-5/+5
| | | | | | | | | | | | Change-Id: I6482af592a564dbbbab28b3f425ab2886f6d1bea Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Update copyright year in Digia's license headersSergio Ahumada2013-01-1099-99/+99
| | | | | | | | | | | | Change-Id: I0281c3f6c10bb7c57f0e470306f38e96badf997b Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | Remove QPerformanceTimer now that QElapsedTimer contains the necessary bitsRobin Burchell2013-01-093-93/+1
|/ | | | | | | | | | | QPerformanceTimer was a copy of QElapsedTimer with some additional functionality which has since been subsumed into QElapsedTimer, so remove the forked code. (backport of cd6ebb4912a5d96c788ea0c838d8a1a06ff4029e from qtdeclarative) Change-Id: Ife1dac4d6c46404b43253680819da21350c65569 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Improve tst_qdeclarativetextedit.Friedemann Kleint2013-01-072-60/+82
| | | | | | | | | | | | | | | | | | | | | - Base on QDeclarativeDataTest to locate test data. - Make small windows frameless to prevent errors from minimum size constraints of decorated windows on Windows. - Add test messages printing the value of comparisons. - Skip alignment tests if no reference image exists: Previously, the test would create an image file name "<testfile>-unknown-architecture", find out it does not exist, write out the 'actual' image under that name (clobbering the source directory) and compare to it, claiming success. The reference image name is now composed of platform and style name and the test is skipped if the file does not exist. Task-number: QTBUG-28611 Change-Id: If1496e11db9638e7febd3af637ad55d7c6f11409 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* test: Mark tst_qdeclarativetext as insignificantSergio Ahumada2012-12-181-0/+2
| | | | | | Task-number: QTBUG-21015 Change-Id: I5b0f3a607c182aec819bd525ce3b2a4f8b47791a Reviewed-by: Alan Alpert <aalpert@rim.com>
* Backport PathView currentIndex fixes from Qt 5Bea Lam2012-12-122-0/+427
| | | | | | | | | | | | Backport 447e5acb880ebda498891623dc4009984cb73bc6 and 0fc361f96b06ba318e70610e46beb421753cae9d which fix bugs related to currentIndex. The first commit ensures currentIndex=0 when all items are removed; the second ensures that the initial currentIndex value is respected and also resets the view correctly if the model changes. Change-Id: I73266a211001a54163be8415d449802ff077a72e Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Process imports in the order they appear in the code.Robin Burchell2012-12-1229-0/+169
| | | | | | | | | | | | | | | By placing imports into a hash keyed by the qualifier, imports were not processed in the order they appeared in the source. This is perhaps not a major problem, but it is nice to have predictability. This becomes more important in Qt 5, when QHash is randomly seeded at application startup, as alterations to order could have strange side effects on code. Reported-by: Maciej Blomberg Change-Id: Ibd34fab1eed4bc727b498ba4684c62d801ae713b Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* centralize and fixup example sources install targetsOliver Wolff2012-12-111-1/+2
| | | | | | | | follow respective change in qtbase Change-Id: I15346e16cd1d6f30cf32a77284b5f19b1dd2a7a9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: hjk <qthjk@ovi.com>
* Fix typo in metatype registration.Stephen Kelly2012-12-111-1/+1
| | | | | Change-Id: If0fd01464160259d634770908d5c284db2bbe582 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Stabilize tst_qdeclarativetimerAlan Alpert2012-12-052-24/+40
| | | | | | | | Use consistent timing on the unified timer instead of qWait Manual cherry-pick of 2ebb2fce87642ef0da8629bdb27164fffbdcdcb9 Change-Id: I76c402081062f7f6849bd421e90bc96f08e8d95a Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Remove 'com/nokia' string from autotestAlan Alpert2012-12-051-11/+11
| | | | | | | Missed this bit in commit 905537e032095790b4ac1607c5ca0de2ad412476 Change-Id: Ic318dbe7a48412e9689ca0f4506c7098d9f48b6a Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove 'com.nokia' string from autotestAlan Alpert2012-12-0511-66/+66
| | | | | Change-Id: Ic318dbe7a48412e9689ca0f4506c7098d9f48b5f Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* remove symbian & maemo5 vestigesOswald Buddenhagen2012-12-041-9/+0
| | | | | Change-Id: I4c02f91abde94d9ee7d154efa6eb371e1a8dfd71 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Limit case-sensitivity check in QML to file names.Friedemann Kleint2012-12-011-4/+5
| | | | | | | | | | Provide for checking relative paths only; default to file names. Currently, the checking triggers on a drive letters and installation folder names, which is too strict. Task-number: QTBUG-28277 Change-Id: I2056a39b605f7891d2c3e395efc6bc541aa7e470 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Mark randomly failing test as insignificantLars Knoll2012-12-011-0/+2
| | | | | Change-Id: Ie78eda64966b6d594123db91f908e3c84b1966b6 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Make tst_examples::namingConvention not failKai Koehne2012-12-011-1/+7
| | | | | | | | | The test seems to be wrong. Keep the warning though if other tests actually rely on the behavior. Task-number: QTBUG-28271 Change-Id: I93b952156b96b5d07ab5177ffce6152e77479c2d Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix tst_qdeclarative buildSimon Hausmann2012-12-011-1/+1
| | | | | Change-Id: Ifb326e09a5254d1518d7d18c1994b36c349bdeb6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QML file loading: honor synchronous requests made through QNAMAlan Alpert2012-11-281-0/+50
| | | | | | | | | | So that it can skip loading state when the underlying QNetworkReply is already finished. Change-Id: Ic2d26271868b64bf8a411b4b54d7e5be7ee5d2b5 Parts-of-the-patch-by: Jeremy Nicholl Task-number: QTBUG-27723 Reviewed-by: Alan Alpert <aalpert@rim.com>
* QtQuick1: Fix ObserverModeAurindam Jana2012-11-279-0/+402
| | | | | | | | Although ObserverMode was enabled, the messages to the plugin were not delivered and hence the feature did not work. Change-Id: I58ec83a4ee727b32833c011a4942cde0cd6a02c8 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* Accept missing semicolon after do-while statement.Erik Verbruggen2012-11-262-0/+22
| | | | | | | | | | | Although not valid according to ECMA 5.1, both JSC and V8 accept a missing semicolon after a do-while loop. (Both JSC and V8 do not do this through automatic semicolon insertion, but handle it as a special case.) This is a "port" of a similair change done in the qtdeclarative module. Change-Id: I417cf18abb75e7040c48894b8f8f68afc41547fe Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix QDeclarativeTextInput::moveCursorSelection()Konstantin Ritt2012-10-202-38/+40
| | | | | | | | | | | | by using fixed QTextBoundaryFinder behavior. Update QDeclarativeTextInput autotests. Task-number: QTBUG-11365 Task-number: QTBUG-27364 Change-Id: Idda22f6c0974bf29d2ff961ea8d998a68c3d676b Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change qtdeclartive tst_examples autotest to use qWaitForWindowExposed.Janne Anttila2012-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The QtDeclartive tst_examples autotest has been flaky. After some investigation I found that it has been using qWaitForWindowActive, which basically means that window itself or it's child has taken focus. When running tst_examples locally I found that some tested QML files stay on screen for maximum time given for qWaitForWindowActive. This probably happens because not all QML demos take focus. From Git logs I also found that test case intially used qWaitForWindowShown (15e48b7387ae302a1b07a57b8374b097dc9c96a4), but that was changed to qWaitForWindowActive when qWaitForWindowShown was deprecated. Based on documentation qWaitForWindowExposed should be used instead of qWaitForWindowShown. --> Switch qWaitForWindowActive to qWaitForWindowExposed to decrease execution time of tst_examples in CI system and make tests to pass more consistently. Change-Id: Id859b377e577c44e85216a5acb51e69fe9659699 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Increase the timeout for the example window to 3s (up from 1)Thiago Macieira2012-10-171-1/+1
| | | | | | | | The examples test is failing on different tests every time, so it's likely to be a timing issue. Change-Id: I3fc8826d1100dba8e62839eb7f8d67b5bda3b761 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* QtQuick1: Make the examples test for QtQuick1 pass.Friedemann Kleint2012-10-172-17/+41
| | | | | | | | | | | | | | | | | | | | | | | | - Fix check to indicate immediate errors, skip the loading state and check for errors after loading again. - Exclude all broken examples. - Exclude Mac .app folders - Fix the DeclarativeViewer to check for the presence of the ImageMagick and ffmpeg executables only once, reducing test time. - Do not check for ImageMagick by running its command line tool 'convert' on Windows, since Windows has a tool of the same name that converts file systems (!). - Fix doc snippets to load correctly. - Introduce defines in case WebKit or XmlPatterns are not present (which existed in Qt 4). Task-number: QTQAINFRA-428 Change-Id: Icc0a983bc42857b41ab1d9e93336f8265bfbec36 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QtQuick1: Introduce messages to some tests.Friedemann Kleint2012-10-172-8/+19
| | | | | Change-Id: If95a85c8aaff359a35ae21549f0142e47cb0cc10 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename the QtQuick1 module back to QtDeclarativeFriedemann Kleint2012-10-17147-297/+297
| | | | | | | | | | | | | | | | | Matches the name that this code used to have in Qt 4. - Adapt library, change import path to 'QtDeclarative'. - Update the tests and examples to match the new library name. - Rename qtquick1global{_p}.h to qtdeclarativeglobal.h. - Change exports back to Q_DECLARATIVE_[PRIVATE_]EXPORT, like it was in Qt 4 and matching the library name again. This also changes the include guards in qtdeclarativeglobal{,_p}.h. - Fix occurrence of quick_debug in tools/qml/qml.pro. Change-Id: Ibb1fb2e503f90943a2125e4ac3cc4eca3369ca3f Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix quick1_debug -> declarative_debugSergio Ahumada2012-10-134-4/+4
| | | | | | | This change was introduced in qtbase by abbecca7d484560111dfdbb894d48d253873018b Change-Id: Ic04076e0925c8e2a7226caef4a008fd09a9d1216 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtQuick1: fixed qperformancetimer testChristiaan Janssen2012-10-013-16/+11
| | | | | | | | It wasn't included in the autotests, and did not compile due to missing defines in the makefile. Change-Id: Ie1e3790422e6c1af2948b1edc38a72e2f8d543ed Reviewed-by: Fanda Vacek <fvacek@rim.com> Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* QDeclarativeTrace patch for a custom trace instanceFrantisek Vacek2012-09-281-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed for the BB10 Cascades profiling. There are more reasons for introducing this patch: 1) Cascades do not use QtGui library for QML rendering. It has its own paint engine with client-server architecture. Profiler traces are sent asynchronously from non Qt renderer thread to the Qt client. The QPerformanceTimer has to be patched too, cause we need to know time difference between tracing zero time and some time in past, see: qint64 QPerformanceTimer::elapsed(qint64 to_monotonic_time_ns) const 2) Since we need more sophisticated trace engine in cascades, this patch allows explicitly assign custom class derived from QDeclaraqtiveDebugtrace to the trace framework. If no custom instance is assigned, the default QDeclarativeDebugTrace instance is created implicitly on first trace request. Using custom trace instance which is not part of Qt (it is part of libbbcascades) allows us to implement all Cascades trace special needs in libbbcascades and not to carry Qt with the platform specific code. 3) The NO_CUSTOM_DECLARATIVE_DEBUG_TRACE_INSTANCE macro is introduced to allow custom trace engine only on the bleckberry platform, see declarative.pro. If this macro is defined Qt compiles from its original code. 4) Possibility of custom QDeclaraqtiveDebugTrace instance might be usable for other projects which needs to extends somehow default Qt trace functionality. 5) Patch is not intended to be applied to Qt Quick 2, since declarative debugging infrastructure is changed there. Change-Id: I199211c1de66e930e252e8c033503d7f4940565f Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* Add QtQuick1 WebKit integration (from QtWebKit module)Simon Hausmann2012-09-2723-0/+837
| | | | | | | | This adds the QML1 QDeclarativeWebView integration to the default build (it was added a while ago) as well as the unit tests. Change-Id: I7324f5a3b00716d4b300e8c11d9ea3b8b9577da3 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Mark qtextdeclarativetextinput test as insignificantSimon Hausmann2012-09-271-0/+2
| | | | | | | | Task-number: QTBUG-27364 Change-Id: I35d23837896a87be371712023388da14e8a228c5 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2498-2354/+2354
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I11a957e35758e821269478ebc91e87f0f5ebc4d5 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove Symbian platformKai Koehne2012-09-18102-583/+49
| | | | | Change-Id: Iad770614f7c1c890febeee662d0ce9370dcb17e3 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use qInstallMessageHandlerKai Koehne2012-09-149-44/+44
| | | | | | | qInstallMsgHandler got deprecated in Qt 5. Change-Id: I87f5f8d5b28afcbcf8a9c613d1d4b1199f5f4254 Reviewed-by: Martin Jones <martin.r.jones@gmail.com>
* Avoid usage of deprecated QInputMethod::inputItem() in testsPekka Vuorela2012-09-072-6/+11
| | | | | Change-Id: Ie6e37ab23b1bef99d294fe8a0acd95429a37a527 Reviewed-by: Joona Petrell <joona.petrell@gmail.com>
* Use CONFIG+=quick1_debug in pro files to activate debuggingv5.0.0-beta1Kai Koehne2012-08-244-4/+4
| | | | | Change-Id: I63cc45662e8f1ac5979ac8cf2ba8c76b42c45895 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Unskip test that's no longer failingKent Hansen2012-08-221-2/+0
| | | | | | | | | | | This reverts commit 504ba059df18c524fa8199084791f3b792b2104e. The test was failing due to a regression in qtscript that's now been fixed (commit 9429a85a2160cf8b860b1292e4e0bc0855841755). Task-number: QTBUG-26889 Change-Id: If7a417d4d3f67a853ffde1033ab2ae9e43f44a2c Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Skip failing test for now.Lars Knoll2012-08-201-0/+2
| | | | | | | | | Created QTBUG-26889 describing the failure. We need to skip the test for now to unblock qt5.git integration. Change-Id: I2be7ebcbd655a7a32a4c7e49d7a2e4889ee9c164 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Remove the user of the QWidgetStar metatypeid.Stephen Kelly2012-08-151-2/+0
| | | | | | | | It is to be removed, and is obsoleted by QMetaType::PointerToQObject. Change-Id: I6832808cfd1e22d6c04c7ba37bf52ff7c36f0272 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>