aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/snippets
Commit message (Collapse)AuthorAgeFilesLines
* Improve tst_snippetsJ-P Nurmi2017-11-021-4/+4
| | | | | | | | Make sure dynamically created QML components are destroyed when going out of scope, and print out the error when creation fails. Change-Id: Ie0ed785780cb861dd057adda8f4da399dd4986d2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_snippets: inject the style name to image file namesJ-P Nurmi2017-05-121-3/+15
| | | | | | | | | | | | | | For example, qtquickcontrols2-label.qml outputs: - qtquickcontrols2-label.png (Default) - qtquickcontrols2-material-label.png (Material) - qtquickcontrols2-universal-label.png (Universal) This allows us to take screenshots with different styles without overlapping names and error-prone manual renaming. Change-Id: Ic475ee0d95539a1122e37780f8cec038e2fc9446 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_snippets: skip style-specific screenshots when appropriatev5.9.0-beta4J-P Nurmi2017-05-042-1/+10
| | | | | | | | For example, don't take screenshots of qtquickcontrols2-material-*.qml snippets when running with another style than the Material style. Change-Id: Ifef5b841d16314ba5d131a7d56f57251d6780ae7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_snippets: take screenshots only when requestedJ-P Nurmi2017-05-031-61/+43
| | | | | | | | | | | | The component loading code has been adjusted so that it can load snippets that use either a Window root element too. This speeds up the test a lot in the CI, and allows us to flatten the snippet-structure. Set SCREENSHOTS=1 environment variable to take screenshots. Change-Id: Ibd9e76befe62044dd1374899f18ea3d8c7ad454b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* *.pro: osx -> macosJ-P Nurmi2017-04-201-1/+1
| | | | | Change-Id: I29b36eaa417986be24c917bc9c9b1f6441773e3d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Another attempt to fix tst_snippets on OS X 10.10J-P Nurmi2017-04-071-1/+1
| | | | | | | | | | | | | | | | | | | The test is sharing (and showing, and resizing) the same view for every snippet. In the CI system we keep having issues that sometimes, after running the test for a while, the window content stops being resized as appropriate. Considering that QQuickWindow resizes its content item in resizeEvent(), this probably means that in the CI the window does sometimes not receive the resize event as appropriate. Before, the window was left hanging there after taking the very first screenshot. Now we try to close the window so that each and every screenshot snippet gets loaded while the window is hidden, shows it, and waits for it to become visible/active. This will hopefully ensure that the window will always receive an "initial" resize event. Task-number: QTBUG-58606 Change-Id: If4b38443cfdc9175f313bf8e70c7daf42d34f687 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Attempt to fix tst_snippets on OS X 10.10J-P Nurmi2017-03-291-8/+7
| | | | | | | | | | Don't show the window until we start taking the screenshots and actually need a visible window. Task-number: QTBUG-58606 Change-Id: I2fcab3b54f0faf67588a21e0732d2e6dbcee9194 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tst_snippets: share a single QQuickView instance for all data rowsJ-P Nurmi2017-01-251-3/+10
| | | | | | | | | | | | This test contains a lot of data rows. Re-creating a QQuickView for every data row puts a lot of stress on the system. In the new Open Nebula -based CI, things start consistently exploding after a random amount of tst_snippets data rows. This change fixes that. Task-number: QTBUG-58196 Change-Id: I6549944a6d7b2bd384d09ee974bee6423ffe625c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Avoid .qmlc files being picked up by Creator's locatorMitch Curtis2016-11-111-1/+1
| | | | | Change-Id: Ic3764ca6ba70b3b9557a6c2088698c40456a93f5 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix tst_snippets in static buildsJ-P Nurmi2016-11-081-0/+2
| | | | | | | | There are now snippets using the Material and Universal styles, so they must be declared as dependencies. Change-Id: If0db9469ae71876920752a9e286f7ab95673ad4d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-10-031-45/+70
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quickcontrols2/gallery/gallery.qrc src/imports/calendar/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/qtquickcontrols2.qdocconf src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/qtquickcontrols2plugin.cpp src/quicktemplates2/qquicktooltip.cpp src/quicktemplates2/qquicktooltip_p.h src/quicktemplates2/qquicktumbler.cpp tests/auto/controls/data/tst_spinbox.qml tests/auto/controls/data/tst_tumbler.qml tests/auto/qquickmaterialstyle/data/tst_material.qml Change-Id: I25b7473b47739043b6f768603bece30b18021318
| * Refactor tst_snippets to make it easier to add non-screenshot snippetsMitch Curtis2016-09-261-45/+70
| | | | | | | | | | | | | | | | Add a separate test for non-screenshot snippets and move the screenshot snippets to their own folder. Change-Id: Ic3e7370321e346b83f7df42205e204d1265ce5b0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-061-1/+1
|\| | | | | | | Change-Id: Ief98cd56abd13cfa4e30578e150207462a8243b8
| * Replace 'foreach' with 'range for'Anton Kudryavtsev2016-09-021-1/+1
| | | | | | | | | | | | | | | | And add QT_NO_FOREACH define to .qmake.conf. Now QuickControls2 is 'foreach' free. Change-Id: I98695258859decadae6fd2f23f5f6f5ef2b0550f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Bump up all controls and templates imports to version 2.1J-P Nurmi2016-07-081-1/+1
|/ | | | | | | | | | | | Controls must import templates version 2.1 in order to "inherit" 1-revisioned properties, methods, and signals. So far, this has been done case by case, but it's less error prone and more clear to change them all. For example, if you ever see a source file pasted/linked somewhere, it's easy to identify the version it belongs to. Change-Id: I41609ec1a22bc05ac3e79f953a147ca42d9e0786 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Don't limit snippet screenshots to *-custom.qml filesMitch Curtis2016-05-111-1/+1
| | | | | | | e4a7b9e8e changed this when it shouldn't have. Change-Id: I75d1283f9fab74e137d2fc35654eaa909c1c819d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* customize.qdoc: Use standalone snippetsMitch Curtis2016-05-101-6/+21
| | | | | | | | So that we don't refer to internal types, as these make copying and pasting snippets difficult. Change-Id: I6f3b943d2eed48beb7a64690c707924e2c5a8078 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* import Qt.labs.controls 1.0 => QtQuick.Controls 2.0J-P Nurmi2016-04-211-1/+1
| | | | | | | | | Docs, resources, .metainfo and plugins.qmltypes will be updated in follow up commits. Change-Id: I4438c5bfb8802bff0fa15c56431cfd288f179861 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Introduce ToolTipJ-P Nurmi2016-03-221-2/+2
| | | | | | Change-Id: I917f7e83219788fc63389773eb07ee39757bed7f Task-number: QTBUG-51003 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* tst_Snippets: add missing "qtquick*.qml" filterJ-P Nurmi2016-03-181-1/+1
| | | | | | | | Most doc example snippet files were renamed in ca8f57f, the test needs to be updated accordingly. Change-Id: I633ace53b7aaf8853b6eae5c8c60a90c2ae38dc2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Support static buildsJ-P Nurmi2016-01-131-0/+6
| | | | | Change-Id: I17bb9131603da912597777b2ec0b9be3894ed858 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* tests: fix license headersJ-P Nurmi2015-11-081-1/+1
| | | | | Change-Id: Id3be5a62dec38d610695d71ad792016fabdc922d Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Move the code snippets to a more logical placeJ-P Nurmi2015-10-30107-1198/+4
| | | | | | | | | | They are part of the documentation, but just auto-tested to ensure that they are actually creatable and don't throw warnings. Therefore the logical place is in the doc/snippets folder instead of somewhere in the tests/ tree. Change-Id: Id79a19890f7457ef277e7434a3fc6b6fb20eaa25 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Simplify TextField & TextArea placeholderJ-P Nurmi2015-10-301-12/+0
| | | | | | | | | | Better not expose the extra Text item in the API. Ideally it should be implemented as a scenegraph node. We might even want to promote the placeholderText property (and add placeholderColor) to TextInput and TextEdit in Qt Quick core. Change-Id: I4f443c77d1c696b87a50ee184f868713dd50316f Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* SpinBox: add validator, textFromValue and valueFromTextJ-P Nurmi2015-10-291-0/+28
| | | | | | | Change-Id: I45e01199453ac5fd64b7f98c165cc12eeb0ce8c3 Task-number: QTBUG-48989 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Nikita Krupenko <krnekit@gmail.com>
* Re-introduce SpinBoxJ-P Nurmi2015-10-225-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It came up in discussions at the QtWS that even if we have Tumbler, people still want and expect to have the good old SpinBox control. SpinBox has it pros, such as that it might work better inside a vertical Flickable, and that in multi-field forms it might visually align better with other controls like TextFields. An early mockup of SpinBox was removed in 1c0edf0. A quote from the commit message: SpinBox is a desktop centric control. It won't be provided in Qt Quick Controls 2.0, but maybe later when desktop support is re-considered. Qt Quick Controls 2.0 will focus on embedded and mobile. SpinBox is still available in 1.x. While it is true that SpinBox might not be optimal for touch or mobile, the real reason for the removal was that validating decimal number input is very complicated. Even though locales have well- defined thousand separators and decimal points, users have very different expectations on how strict or relaxed the input validation should be. This change re-introduces a touch-optimized integer-based SpinBox. What makes it more touch friendly than the earlier version is that it has now auto-repeating buttons. Limiting it to integers avoids the decimal number input validation problem. We can introduce a separate DoubleSpinBox later if necessary - just like in QtWidgets. Change-Id: I2819060eb5d1ae6a8c00b0f12be703456085079d Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: Input groupJ-P Nurmi2015-10-196-0/+36
| | | | | Change-Id: Iba6e3503d20e1f141c5dd81a2eeab6176e809914 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Docs: Containers groupJ-P Nurmi2015-10-193-0/+47
| | | | | Change-Id: I5eb80f21edb50413b33a96b934466964e56462aa Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: Navigation groupJ-P Nurmi2015-10-192-0/+53
| | | | | Change-Id: Id866d226fc651a39fffd887600b4bf54d2b7ac6e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: include ScrollBar in indicators & add a screenshotJ-P Nurmi2015-10-191-0/+26
| | | | | Change-Id: I1ff8df098a358d39020a63aa8f1d920f620f838e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Make tst_snippets fail if there are QML warningsJ-P Nurmi2015-10-161-0/+11
| | | | | Change-Id: I6680d891bd9a1c54746cc97c5eae742c1cca4e62 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix MonthGrid snippetJ-P Nurmi2015-10-161-1/+1
| | | | | Change-Id: I991af7acd1510960aebcced718525b5c1d3842a8 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: Indicators groupJ-P Nurmi2015-10-153-0/+48
| | | | | Change-Id: I092b50dd0f184523ec28e4145a4e6b1eab1c762a Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: Buttons groupJ-P Nurmi2015-10-155-0/+32
| | | | | Change-Id: I2945a3c367244ec0b92cc8f2ba84a7b052d9a514 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: LabelJ-P Nurmi2015-10-142-0/+18
| | | | | Change-Id: I744f622edbc6589e9371518f82431220b667e03e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Docs: SwipeViewJ-P Nurmi2015-10-142-0/+38
| | | | | | Change-Id: Iabeb3ebc54f64d2f3d0b008a5f5a16a89f701f85 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Add RangeSliderMitch Curtis2015-10-148-0/+78
| | | | | | | | | This is basically Slider, except with two handles. It's used to specify a range of values. Task-number: QTBUG-48667 Change-Id: Ib4f9afe5dc8343e307610943d338a2b574a01e4d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* tst_snippets: include the snippets to OTHER_FILESJ-P Nurmi2015-10-131-0/+3
| | | | | | | Makes them accessible with Qt Creator's locator. Change-Id: I78851db7d1154447f7e0e7112935ac25044b2550 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Flatten tests/auto/snippets/dataJ-P Nurmi2015-10-1369-0/+0
| | | | | Change-Id: Ie58e6ee44380900854f5f7c91f7358cb5be0aec7 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Attached properties are now available using the QML composite type nameJ-P Nurmi2015-10-091-2/+1
| | | | | | Change-Id: I8cfbd420cea4e01528d2f289cfc5989268d8718a Task-number: QTBUG-43581 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add Calendar singletonJ-P Nurmi2015-10-045-5/+5
| | | | | | | | | | Not yet super useful, as it only contains a Month enum to help with JavaScript's zero-based months. Later on, we can add various calendar related utility methods, such as calculating the next/prev month and so on. Change-Id: I7685eb931833fc0c30e2d5d4fe874d0618d054b4 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename CalendarView to MonthGridJ-P Nurmi2015-10-045-15/+15
| | | | | | | | | | Let's reserve CalendarView for a bit higher level control that combines MonthGrid, DayOfWeekRow and WeekNumberColumn, and provides built-in navigation. CalendarView would use the not-so-extensible CalendarModel internally, so we could get that out of the public API as well... Change-Id: I43126ed4c87f54a5b24129b9d60c969f5bd58642 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Calendar: validate month & year rangesJ-P Nurmi2015-10-035-7/+7
| | | | | | | Fixes also all Calendar types to use 0-based month. Change-Id: Iee3cafc00e0338b8076fbb3fe195b8491752cbc1 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename QtQuick.Controls 2.0 to Qt.labs.controls 1.0J-P Nurmi2015-10-0163-63/+63
| | | | | Change-Id: I142622dd85e95ef70b11132e77ccf48701f2cabc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename QtQuick.Templates 2.0 to Qt.labs.templates 1.0J-P Nurmi2015-10-011-1/+1
| | | | | | Change-Id: I3263a600065dfa2bfe7334ec44a74e2dca83aa36 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename QtQuick.Calendar 2.0 to Qt.labs.calendar 1.0J-P Nurmi2015-10-017-7/+7
| | | | | Change-Id: Ief7e28f6c595cb60f15a4960dada24a6c2f5ca3e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename test snippets: qtquickextras2 -> qtquickcontrols2J-P Nurmi2015-09-255-0/+0
| | | | | Change-Id: Ie1cd4e8d6a8bc214e8d21272c527fffed0884217 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Remove ToggleButtonJ-P Nurmi2015-09-257-59/+0
| | | | | | | | We don't have a sensible design. It's better not to have it at all than to have a confusing tiny bit tweaked clone of Switch. Change-Id: Ib0eabd075590100e9e49846c7172909525b54a57 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Initial QtQuick.Calendar docsJ-P Nurmi2015-09-257-0/+135
| | | | | | | The overview is still missing. Change-Id: I081f1684b64fc8b95f59844b8373293523181266 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>