aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'release' into stableGunnar Sletta2013-01-171-1/+2
|\ | | | | | | Change-Id: I88ecd5f396ecd9a9c910108d1cca832a3087f1d8
| * Avoid race condition in QQuickTestsGunnar Sletta2013-01-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | The QQuickView::show() function may or may not be synchronous and because the rendering happens on another thread, the frameSwapped can be emitted before we enter the qWaitForSignal() event loop. Fix this by waiting for the window to become exposed instead, which implies that it has rendered at least one frame. Change-Id: I1100a6fe981018395bf141d67f06adb94a354206 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
|/ | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* qmltest: Added the possibility to use QApplicationLiang Qi2012-12-311-5/+24
| | | | | | | | | | | Current QML test cases in QtDesktopComponents still need to use QApplication. Added QT_QMLTEST_WITH_WIDGETS define when QtWidgets is available. Also proveded a command line switch "-widgets" for it. Change-Id: Ib6c7313538cb8875144636b6f8bd264b0f13aa8d Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove the remaining usages of deprecated QWindow accessorsShawn Rutledge2012-11-301-1/+1
| | | | | Change-Id: I146e7b8e3ae0ee74f5f4e3ef85f59d50a639c0f5 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Enable mobule build with QT_NO_TRANSLATIONTasuku Suzuki2012-11-261-0/+2
| | | | | | Change-Id: Id7aeef0d499f48ddc64b4ea3e4dc713db8458c38 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alan Alpert (RIM) <aalpert@rim.com>
* All QWindow properties that have "window" in them have been renamed.Shawn Rutledge2012-11-081-2/+2
| | | | | | | Depends on patch Ie4424ec15fbdef6b29b137f90a2ae33f173edd21 in qtbase. Change-Id: I9614cc2c7ed119c663b3f6f99267483e291e529c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix crash in qtlocation tests.Friedemann Kleint2012-10-241-1/+1
| | | | | | | Task-number: QTBUG-27696 Change-Id: I0cc12e1be25a789a8245fae3a444629ca57872ef Reviewed-by: Christopher Adams <chris.adams@qinetic.com.au> Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
* Fix qmltest library.Friedemann Kleint2012-10-201-4/+16
| | | | | | | | | | - Avoid hangs (waiting for frameSwapped) and crashes in window managers for empty windows by giving windows a minimum size if they have 0x0 (observed on Mac, Windows). - Polishing, set proper window flags, title, object name, output. Change-Id: Iad5d66c3adbbfe085390132987e95f4c69272831 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add waitForRendering() function for qmltestCharles Yin2012-07-251-1/+1
| | | | | Change-Id: I6357412d84fdb4a8b6bd8603baba7d10a2bcc245 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Align windowShown flag with qml renderer stateCharles Yin2012-06-141-3/+24
| | | | | | | | | | Previously, we set windowShown to true once the window is active, this is not enough for some tests as the initial rendering may not be finished yet and will give the wrong result for some tests which require reading back pixels. Change-Id: Idd67329d207aaf1734a795b40a5bcc40093cf6b8 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Enabled widget free compilation of QtQuickDonald Carr2012-04-181-2/+1
| | | | | | | | | | There is no hard dependency of QtQuick on QWidget. This change makes the minor adjustments required to remove the build dependency altogether. This patch follows the path of least resistance bypassing any elements with a dependency on the legacy QWidget functionality. Change-Id: Ie3f47d3b4f60a1460dbb5d76a494a2c329469cc0 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Allocate QQuickView on heap instead of stackCharles Yin2012-03-301-18/+16
| | | | | | | | | Some qpa plugin will crash when delete the QApplication instance if QQuickView is created on stack, this is a workaround fix, the real reason still need to be investigated further. Change-Id: Iea75541e53a94f65454e78f8020003e6533c0bd0 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Only attempt to load QML test cases from source directory if it exists.Aaron McCarthy2012-03-131-2/+5
| | | | | | | | | | When running installed unit tests the QML test cases are likely not in the source directory, but in the same directory as the installed test binary. If the source directory does not exist, fall back to searching for QML test cases in the current directory. Change-Id: I231b9cd49b12d88dd6cfbcc8dfb8b6c2c69d5aad Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Remove the rest of qtquick 1.0 code from qmltestCharles Yin2012-03-131-56/+39
| | | | | | Change-Id: I0d20583faf1a75f287dcd866b11457254d250354 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-9/+9
| | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* CodeCoverage: Fixes regression.Caroline Chao2012-02-221-34/+5
| | | | | | | | | | | | | | | | Fixes segmentation fault introduced by qtbase change: 36f5cc848de2525 Coverage data are now saved in QTestLog::stopLogging. Also the current application name needs to be set for a quick test as well. Remove also code coverage call to installCodeCoverage from quicktest due to refactor of the code coverage setup in qtestlib. This should be less error-prone. See qtbase change: 949b7452e0d2402 Change-Id: I13566cc43dfb3af264d3b2be2e5f2617128f4801 Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
* QtDeclarative/Quick: Fix warnings.Friedemann Kleint2012-02-161-0/+1
| | | | | Change-Id: I71bd638fcc41356e0b76df27ec76ad3ed5ef90d9 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* qmltest: Count passes, fails and skips consistently.Jason McDonald2012-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | | This commit changes qmltest to count one pass per data row, rather than a single pass for an entire data-driven test function. This makes counting of passes consistent with counting of fails and skips which were already counted once per data row. This change also means that the plain-text, xml and light-xml output formats will now show one result per data row, so that every data row executed will be shown in the test output with either a pass, fail or skip result. Previously data rows that passed were not shown in the output, preventing analysis of total number of tests runs, pass-rates, and various other metrics. This commit corresponds to (and depends on) a commit in the qtbase module which changes the behaviour of qtestlib in the same way. Task-number: QTBUG-21848 Task-number: QTBUG-22124 Change-Id: I3c1f0e68bdff4087b9ccfc80a3f96f4541335b6f Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Remove code related to test location.Jason McDonald2012-02-091-2/+0
| | | | | | | | | Testlib no longer does anything with the test location and neither do any of Qt's tests, so this code is no longer needed. Change-Id: Ic370b6b741382a90454c893bffcab4a7328a2f9e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* qmltest: Perform extra checks after each data row is executed.Jason McDonald2012-02-091-0/+1
| | | | | | | | | Add calls to the new function QTestResult::finishedCurrentTestData() to verify that expected failures and expected messages have been produced. Change-Id: Ia139a962c705a5f47be992b7f2e81775aa2e2f28 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* CodeCoverage: Fix wrong type passed to saveCoverageTool.Caroline Chao2012-02-081-1/+1
| | | | | | | Passing a bool as appropriate. Change-Id: I0dcca8d30c6d75e7fcddcf7047e1dd1c572ec6ea Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove QtQuick1 elements from qtdeclarativeMatthew Vogt2012-02-031-42/+2
| | | | | | | | QtQuick1 is now contained in a separate repository. Task-number: QTBUG-23737 Change-Id: I09eae67af5693a22b896b916f816f73ccc3a89b1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update copyright year in Nokia copyright headers.Jason McDonald2012-01-171-1/+1
| | | | | | | | Update copyright headers from before 2011, and a couple of new ones that were merged after the previous change to copyright headers. Change-Id: Ia76e08e2734afa4ef3f1207dbcda5ff3bc81b366 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't delete global appCharles Yin2012-01-131-1/+4
| | | | | | | | Sometimes delete the global GUI app causes crash, this is a work around fix. Change-Id: Ic2406e7a085483de5d96321de8257663925b7e5e Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* QMLTest: Fix output of file names, make output more verbose.Friedemann Kleint2012-01-111-44/+77
| | | | | | | | | | | | | | | - Check command line arguments thoroughly. - Change all QuickTestResult functions taking file names to accept QUrls and format them using QUrl::toLocalFile() in case of local file names in order to display Windows drive letters correctly. - Introduce a template function (for QDeclarativeView, QQuickView) that dumps out all available information when compilation goes wrong. - Skip 'Debug', 'Release' folders for Windows builds. Change-Id: Ibdd92867870a2b05494de8a0adbe0910d4897ba2 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Integrate testcocoon support into QtQuickTest.Caroline Chao2011-12-091-0/+33
| | | | | | | | Add support to install and save coverage data when a test is run using quick_test_main. Change-Id: I39ddd678d748979c335139b3f8bda43b3d05720d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Say hello to QtQuick moduleKent Hansen2011-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change moves the QtQuick 2 types and C++ API (including SceneGraph) to a new module (AKA library), QtQuick. 99% of this change is moving files from src/declarative to src/quick, and from tests/auto/declarative to tests/auto/qtquick2. The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to a plugin, src/imports/qtquick2, just like it's done for QtQuick 1. All tools, examples, and tests that use QtQuick C++ API have gotten "QT += quick" or "QT += quick-private" added to their .pro file. A few additional internal QtDeclarative classes had to be exported (via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the QtQuick 2 implementation. The old header locations (e.g. QtDeclarative/qquickitem.h) will still be supported for some time, but will produce compile-time warnings. (To avoid the QtQuick implementation using the compatibility headers (since QtDeclarative's includepath comes first), a few include statements were modified, e.g. from "#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".) There's a change in qtbase that automatically adds QtQuick to the module list if QtDeclarative is used. Together with the compatibility headers, this should help reduce the migration pain for existing projects. In theory, simply getting an existing QtDeclarative-based project to compile and link shouldn't require any changes for now -- but porting to the new scheme is of course recommended, and will eventually become mandatory. Task-number: QTBUG-22889 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Fix qmltestrunner crash bug when report filename and line numberCharles Yin2011-11-091-1/+2
| | | | | | | | | | The HandleScpe is not needed here. Also for each test file, the rootObj should reset its internal states properly, otherwise the following test cases are polluted by the previous tests. Task-number:QTBUG-22620 Change-Id: I1e4869070b8712e5a6c755461d52bd12d1f03160 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Declarative: Fix gcc 4.6 warnings about assigned/unused variables.Friedemann Kleint2011-11-011-1/+1
| | | | | | Change-Id: Iac4bb4a6b1aa4071a239bb25f25f01b71e36868b Reviewed-by: Alexis Menard <alexis.menard@openbossa.org> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Add I18N support to qmltestrunnerCharles Yin2011-10-281-0/+15
| | | | | | | | | | Add a new command line option "-translation file" to handle translation files to qmltestrunner. Task-number:QTBUG-22390 Change-Id: I351ed41734c79a51e00aeef551af642482bf36f2 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Fix qmltestrunner hang bug when no TestCase itemCharles Yin2011-10-241-4/+12
| | | | | | | | | | | Add a hasTestCase property to the global qtest object, set it to true in each TestCase's onCompleted handler. qmltestrunner only enter the event loop if this property is true to avoid infinite waiting. Task-number:QTBUG-22281 Change-Id: Id609432210ae795d8c128901e64ba0aef4551f01 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Charles Yin <charles.yin@nokia.com>
* Rename Qt Quick-specific classes to QQuick*Kent Hansen2011-10-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | The QSG (SceneGraph) prefix is too generic for Qt Quick(2)-specific classes. All the classes and files in the declarative/items directory have been renamed. In particular, for classes that are currently public, the renaming is as follows: QSGView --> QQuickView QSGCanvas --> QQuickCanvas QSGItem --> QQuickItem QSGPaintedItem --> QQuickPaintedItem The header files have been renamed accordingly (e.g. qsgview.h --> qquickview.h). Change-Id: Iac937fff81db20bb639486a793c3aeb5230b038c Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* only use one QSGView instance for all qml test casesCharles Yin2011-10-141-13/+14
| | | | | | Change-Id: I9296e30d216b57d8cf2a11e94030781f03594aa6 Reviewed-on: http://codereview.qt-project.org/6646 Reviewed-by: Charles Yin <charles.yin@nokia.com>
* make it possible to run single qml test case file by passing a tst_*.qml ↵Charles Yin2011-10-101-9/+14
| | | | | | | | | file to -input option Change-Id: I8376ca0ae23d4366d69e0e7f3c95593ba54fc71d Reviewed-on: http://codereview.qt-project.org/6273 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Charles Yin <charles.yin@nokia.com>
* make quicktest build and modify to use qwindowMatthew Cattell2011-09-091-4/+5
| | | | | | Change-Id: Idebb00b828307421bcbd89d8abaa9ea1d903af47 Reviewed-on: http://codereview.qt-project.org/4542 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Merge branch 'master' into refactorGunnar Sletta2011-08-311-9/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/v8 src/declarative/declarative.pro src/declarative/items/qsgcanvas.cpp src/declarative/items/qsgshadereffectsource_p.h src/declarative/items/qsgview.cpp src/declarative/particles/qsgcustomparticle.cpp src/imports/gestures/gestures.pro src/imports/particles/particles.pro src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro src/qtquick1/qtquick1.pro tests/auto/declarative/examples/examples.pro tests/auto/declarative/qsglistview/qsglistview.pro tests/auto/qtquick1/qdeclarativeviewer/qdeclarativeviewer.pro Change-Id: I423344f83e1835116cad531b877fde6e68a8849a
| * Deprecate QDeclarativeDebugHelper classKai Koehne2011-08-261-9/+0
| | | | | | | | | | | | | | | | | | | | This was a helper class for enable debugging in 4.7. Since Qt 4.8 you should just say CONFIG += declarative_debug Change-Id: I51dabaec36e175a097721570061aad38c3f828d1 Reviewed-on: http://codereview.qt.nokia.com/3507 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* | Get declarative running on new gui/opengl stack.Samuel Rødal2011-08-291-1/+1
|/ | | | | | | | | Rename QGuiGLContext -> QOpenGLContext, QGL* -> QOpenGL*, etc. Change-Id: I08379029d756e28b20ae141ca30ed801626b513d Reviewed-on: http://codereview.qt.nokia.com/3711 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* parse args earlierCharles Yin2011-08-081-3/+4
| | | | | | | Change-Id: Ie0869d3f70d1e898a9b0635e28bcad2e92fa607c Reviewed-on: http://codereview.qt.nokia.com/2718 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Charles Yin <charles.yin@nokia.com>
* don't create QApplication if there is already one thereCharles Yin2011-08-081-1/+5
| | | | | | Change-Id: Iaf9ebf6855992962abfb3452dc398149af15bbbc Reviewed-on: http://codereview.qt.nokia.com/2711 Reviewed-by: Charles Yin <charles.yin@nokia.com>
* Merge the QJSEngine and QJSValue development branch into master.Simon Hausmann2011-07-291-4/+3
| | | | | | | | | | | | This replaces the dependency to QtScript with two new builtin classes QJSValue and QJSEngine. This is still work in progress, development continues now in the master branch. Change-Id: I7f5487feb45c972f25a22b10cc81b9218b9805de Reviewed-on: http://codereview.qt.nokia.com/2299 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Extract all QtQuick 1 elements into a separate library/plugin.Martin Jones2011-07-121-1/+1
| | | | | | Change-Id: I41a280de2739ee08202f4be2519e5012870090f2 Reviewed-on: http://codereview.qt.nokia.com/1391 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Merge branch 'v8'Aaron Kennedy2011-07-081-18/+0
|\ | | | | | | | | | | | | | | Conflicts: src/declarative/qml/qdeclarativescarceresourcescriptclass.cpp src/declarative/qml/qdeclarativescarceresourcescriptclass_p.h Change-Id: I54e579307cbeafbbad21884218c5e797ba245c8b
| * get the caller file & line number from v8 stack trace.Charles Yin2011-06-231-18/+0
| | | | | | | | Change-Id: I0ffebd2d22702bc14e1629b8bc0455a9cf8ea416
* | Update licenseheader text in source files for qtdeclarative Qt moduleJyri Tahtela2011-07-081-17/+17
|/ | | | | | | | Replace old license header with correct one. Change-Id: I492ddaaa0227b2c8faf11bdcd6e12e7231a54a10 Reviewed-on: http://codereview.qt.nokia.com/1312 Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
* Integrate QtQuickTest into QtCharles Yin2011-05-201-0/+315
Change-Id: I558821c0dec9166ea1d0d2e1e2f889553c436316 Task-number:QTBUG-16082