aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Rename QtQuick.Controls 2.0 to Qt.labs.controls 1.0J-P Nurmi2015-10-01128-156/+156
| | | | | 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-019-9/+9
| | | | | | 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-0118-19/+19
| | | | | Change-Id: Ief7e28f6c595cb60f15a4960dada24a6c2f5ca3e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add PageIndicator::interactiveJ-P Nurmi2015-09-301-0/+19
| | | | | Change-Id: Iecb6d855d1c7710901925097ad4e03006d58309c 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-2515-373/+2
| | | | | | | | 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>
* Fix Tumbler font, and TextField & TextArea placeholder fontsJ-P Nurmi2015-09-251-20/+38
| | | | | Change-Id: Ifbc8e0a221b1190becb789d69b9b313ab45e1615 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Calendar: fix fonts of the default delegatesJ-P Nurmi2015-09-243-0/+147
| | | | | Change-Id: Ia85c9100cd052919f99162bcb1ef63be0b9efb9d Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Fix QQuickDayOfWeekModel::setLocale()J-P Nurmi2015-09-244-0/+125
| | | | | | | | It must emit dataChanged() even if the first day of week of the new and old locales are the same. The names are most likely different. Change-Id: I932215821962910ef1fb8a66f2dab81dcc51a3b1 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Templatize the former extrasJ-P Nurmi2015-09-233-15/+18
| | | | | Change-Id: Ief9ee07d1f5f6c80500bfa611bace860481e2a3f Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Doc: Replaced the module name qualifier used for QML docsVenugopal Shivashankar2015-09-231-3/+2
| | | | | | | | Also made changes to avoid qdoc warnings about qml snippets. Change-Id: Ide047fe7a4901fcf4b03efdccf457662e60585d2 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Enums are now available using the QML composite type nameJ-P Nurmi2015-09-232-66/+65
| | | | | | | Change-Id: I90cf20d57ee433c1c9319c7a947ac91558775bb7 Task-number: QTBUG-43582 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Controls: move Accessible from QML to C++ for DialLiang Qi2015-09-212-0/+17
| | | | | | Change-Id: I95604be3b31bc69f7ac3f7ed8ff444833713b67d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Merge Qt Quick Extras into Qt Quick ControlsMitch Curtis2015-09-1817-82/+11
| | | | | | | | | | | | The original split existed because the public and enterprise controls were developed separately. Now that all controls are public and developed together, the split no longer makes sense and is difficult for users to understand. Change-Id: I00420f4d09f8c837232231d03fe818b7b3403fab Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* test: add activeFocusOnTab into auto testLiang Qi2015-09-182-2/+1
| | | | | Change-Id: Idf65a4859d012e290b5614ef84063de9540d29b9 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Templates: fix activeFocusOnTabLiang Qi2015-09-173-0/+645
| | | | | | | Autotest is included, except ScrollBar and StackView. Change-Id: Idfbf031451ff3b244cd7f538c7210f0c242482ac Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* SwipeView: add index, view and isCurrentItem attached propertiesMitch Curtis2015-09-161-4/+57
| | | | | | Task-number: QTBUG-48052 Change-Id: I0d6d27cc352d999d8071b979349f2364f0edf74d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Calendar: fix compilation with QT_NO_ACCESSIBILITYLiang Qi2015-09-157-1/+86
| | | | | | Change-Id: If840f4bf715b4290fb50388b94e33420505b1a9b Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Controls: Make all internal text elements use control.fontLiang Qi2015-09-156-1/+160
| | | | | | Change-Id: I3469277e9dd413a483c82be11fd661a890fab5ba Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Ensure press-and-hold event keeps selectionGabriel de Dietrich2015-09-153-90/+153
| | | | | | | | | | | | | | | | | | | | This concerns TextField and TextArea. It is an almost universal UX pattern on touch platforms where the user long presses to pop the context menu up. In many cases the context menu is used for copy and cut operations, which means that poping it up should keep the selection. The implementation works by not forwarding the initial mouse press event to the parent class until we're sure it's not going to be a long press. If the long press timer is cancelled for any reason, we will then send the delayed mouse press event to the parent class followed by whichever event triggered the cancellation. Auto-tests refactored and updated. Change-Id: If3aa8075f07a80929f4bd723895d9599bf8d169e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Controls: move Accessible from QML to C++Liang Qi2015-09-1424-0/+430
| | | | | | | | | | | Controls 2.0 could be built with QT_NO_ACCESSIBILITY defined. Added a few helper functions for accessible in QQuickControl. Don't set text as Accessible.name for TextArea and TextField. Change-Id: I40383bbcec2f8c742f709bdec0209623f80da449 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Apply QQuickControl font behavior to QQuickLabelLiang Qi2015-09-141-0/+44
| | | | | | | In 0addfd5d, we missed QQuickLabel. Change-Id: Icc352f8db04b2b981d386513454650e376f0a955 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add ExclusiveGroup::checkablesJ-P Nurmi2015-09-101-4/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | Exclusive checkables typically share the same parent item. For example, a row or column positioner or layout. This change makes it convenient to handle such cases so that one can add the whole list of children to an exclusive group, without the need of creating any attached objects. Column { id: column ExclusiveGroup { id: eg checkables: column.children } Switch { id: s1; text: qsTr("First") } Switch { id: s2; text: qsTr("Second") } Switch { id: s3; text: qsTr("Third") } } Last but not least, this allows breaking the C++ dependency between QQuickTabBar and QQuickExclusiveGroup. Change-Id: Ic75065b87ef8fa532f77118d740f04484994bbf0 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Add QQuickContainer::contentChildrenChanged() notifierJ-P Nurmi2015-09-091-0/+36
| | | | | | | Makes possible to bind contentChildren to ExclusiveGroup::checkables. Change-Id: Idf9afabb93f78b012d2ca5c77fe79f34bf76e584 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Use QtQuick.TemplatesJ-P Nurmi2015-09-095-96/+101
| | | | | Change-Id: I3d1822457efd740e7c9d91747e978d787c0dd4b8 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* SwipeView: emit currentItemChanged().Mitch Curtis2015-09-051-0/+27
| | | | | Change-Id: Iacbc9cc7f89aeacbf1ce918eb28a1a5c7db7040d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* SwipeView: don't override initial currentIndex.Mitch Curtis2015-09-051-0/+27
| | | | | | | | | | | When insertItem() was called for the first time as a result of "statically" declared SwipeView children, the currentIndex would be changed to 0. We should only do this if the currentIndex is invalid (-1), otherwise we disrespect the user's settings. Change-Id: I692b60581e706edcfa4939bbe59a815ff3e019e5 Task-number: QTBUG-48086 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickControl: add font propertyLiang Qi2015-09-021-0/+250
| | | | | | | | | When the font of a QQuickControl subclass is set, it will propagate it to all children that are also derived from QQuickControl, as well as TextField and TextArea. Change-Id: I7c851f84b89609094d9a81d239ade0f0ac212985 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* tst_StackView: verify created control instancesJ-P Nurmi2015-08-311-0/+17
| | | | | | | ...like in all other tests. Change-Id: Ia713226f535bca3b6ab731d9441bb5d1b7f9c6f2 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* StackView: fix ownership issuesJ-P Nurmi2015-08-282-0/+97
| | | | | | | | | | | | | | | | | | | QTBUG-47317 revealed that dynamically created items remained visible after popping, so they were not only kept visible but also weren't properly destroyed. The visibility issue had to be fixed so that "indestructible" (not owned by StackView) were hid. This change tackles the destruction part, and marks pop-exit items for removal so they get destroyed when transitions are finished. Now that the transitionable items are actually destroyed, a new problem was releaved. We must not delete transitionable items until both enter & exit transitions have been finished. If we did that, the finished() callback would not get called for the pop-exit transition and tst_StackView::test_transitions() would fail (yay). Change-Id: Ie2eedf99d0366820260776591ad1f8b5b68e2ec3 Task-number: QTBUG-47317 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix tst_textfield test_pressAndHold() skipJ-P Nurmi2015-08-281-1/+1
| | | | | | | Change-Id: I1ceb0d2bd269c66a5663dab258698e1eddbd7d25 Task-number: QTBUG-47963 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* GifRecorder: add some indication of when recordings are finished.Mitch Curtis2015-08-281-0/+13
| | | | | | | | | | This is important for high quality recordings, where there is some conversion that must be done after the recording. If we don't do this, it's hard to get a good idea of when the recording actually finishes. Change-Id: Iafb73358288e50d8f070607f8d69602da6d32506 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* StackView: fix initialization of itemsJ-P Nurmi2015-08-271-2/+0
| | | | | | | | | | Only items that were created from pushed components were initialized. This change fixes item initialization for StackView::initialItem and pushed items. Change-Id: I6fe1afa233e63320180dfe8eac3874fed69cbb3b Task-number: QTBUG-47318 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* StackView: fix transitionsJ-P Nurmi2015-08-271-0/+47
| | | | | | | | | | | Passing null view bounds for the transitionable exit item helps to kick off the transition as appropriate. Otherwise the view transition item determines in QQuickItemViewTransitionableItem::prepareTransition() that no transition is necessary. Change-Id: Icb664725c4393ef3bb894b71a5912652f82c9da0 Task-number: QTBUG-47949 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Fix StackView: pushed items still showed up after being poppedJ-P Nurmi2015-08-271-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of 6ee9612. The idea was to keep items visible until both transitions had finished. StackView { pushExit: null pushEnter: Transition { ... } } When both transitions had finished, all stack elements (except the current one) were hid. The problem was that in pop & replace operations the exiting item was no longer part of the stack (because it had been already popped out) and therefore was never hid. This change restores the original (intended) behavior that a null transition would equal to an immediate operation. This keeps the code simpler, and makes the behavior consistent in a sense that all items are hidden as soon the respective transition finishes. PauseAnimation can be used to wait if desired. Change-Id: Ia9e78506754bdc18949676f061dbfff28a7128b7 Task-number: QTBUG-47317 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Skip tst_textfield::test_pressAndHold failing test on OS X.Mitch Curtis2015-08-271-0/+3
| | | | | | Change-Id: I479704184ceff878a239c2ee72d0c0929859b97b Task-number: QTBUG-47963 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Stabilize pressAndHold auto-tests for TextField, TextAreaGabriel de Dietrich2015-08-212-4/+4
| | | | | | | | | | | We just extend the wait interval. This is to make sure the control's press-and-hold timer will timeout before the wait. Since we're probably not using the most accurate timers, adding 20% to something that's around one second remains acceptable. Change-Id: I1d10c88a168e882c9069f9345e896c1aab2f2bda Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* TabBar: add manual GIF test.Mitch Curtis2015-08-212-0/+88
| | | | | Change-Id: Ie20e3a700b5030ed8e6e172c4faad8180ac097b8 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add and update GIFs.Mitch Curtis2015-08-113-1/+135
| | | | | Change-Id: Ia3bb2b8a4bcbe98f6ceabeb4f57f254cd625bb37 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* GifRecorder: force view updates.Mitch Curtis2015-08-112-6/+23
| | | | | | | byzanz-record will cut recordings short if there are no repaints. Change-Id: Ied7fcfec066aa3d558b5e6909f7abf74628cfa23 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* GifRecorder: refactor code.Mitch Curtis2015-08-102-71/+62
| | | | | Change-Id: Iba14928bdbdc7f01f7ccc7bd55181ec989188ce2 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* GifRecorder: add a gifsicle optimization step.Mitch Curtis2015-08-102-26/+37
| | | | | | | | qtquickcontrols2-busyindicator.gif: 39 kB => 31kB (20%) qtquickcontrols2-slider.gif: 34 kB => 13kB (61%) Change-Id: Iee2c74f1a9e3900572966bd600921d0ad2af80cf Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* GifRecorder: add a high quality option.Mitch Curtis2015-08-073-43/+139
| | | | | | | | | | | | | | | | | byzanz-record will heavily optimize colors in certain GIFs. The GIF generated for BusyIndicator, for example, lost all of its "transparency" that it has in the source image. The man page says that the .flv format is lossless, so when setHighQuality(true) is called, we record a video and then convert it to a bunch of frames with avconv, then to a GIF with convert. Finally, to further optimize the GIF, we could run it through gifsicle, so I haven't updated any GIFs in the docs yet. Change-Id: I0ccc5e2258d7c6dac52e464bcd6fb61128541e82 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* BusyIndicator: add manual GIF test.Mitch Curtis2015-08-072-0/+85
| | | | | | | | | The GIF isn't added yet, because byzanz-record only allows a certain amount of colors, so we must fix that first. Change-Id: I5c438ade6e8a6e7065742003e804c30bb23aa96a Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* GitRecorder: don't warn on empty outputFileName.Mitch Curtis2015-08-072-6/+4
| | | | | | | If it's empty, we generate it for the user. Change-Id: I4f02fcd603eb0c3c4ebba4838bcbd45f20ad6414 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Slider: add animated GIF to documentation.Mitch Curtis2015-08-072-0/+173
| | | | | | | Also adds the manual test that allows the GIF to be regenerated. Change-Id: I90ddb770281a53d3ef342d7c6080664b74fe3b25 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add padding test to Tumbler auto tests.Mitch Curtis2015-08-071-1/+102
| | | | | Change-Id: I78d580c28287fecaf287c4634a166c44926c48fb Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add gifs manual test.Mitch Curtis2015-08-0710-0/+1054
| | | | | | | | | | | | | | | | | | | | | | | | | | This is similar to the snippets auto test, in that it's more of a utility than a test. In this case, the testing provides a convenient way to run several recording "jobs" at once, as well as feed the app with generated input events. The test is different to the snippets auto test in that it: - Tests QML code that isn't shown to users; only the GIFs are displayed in the documentation. - Requires interaction to produce its output, which is achieved with mousePress(), etc. For this reason, it also can't just iterate over the list of QML files. - Requires byzanz to be installed in order to record the GIFs. The test also comes with EventCapturer, an event-filter based class that records mouse movements and generates compact C++ code for use with the GifRecorder. There is one known issue, which is a bug in byzanz-record: it sometimes decides to record the mouse cursor even if you didn't ask it to. Change-Id: Icaaa4f37c8d34a813e36901fd187d84e4f250d33 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add support for ListView to Tumbler.Mitch Curtis2015-08-061-7/+197
| | | | | | | This enables creation of non-wrapping Tumblers. Change-Id: I0e21b860b84c456c0651923e87217cafc42c69b7 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>