aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add Imagine styleJ-P Nurmi2017-07-311346-6/+7330
| | | | | | | | | | | | | The Imagine style is based on image assets. The style comes with a default set of images, but the images can be easily changed by providing a directory with images using a predefined naming convention. [ChangeLog][Controls] Added the Imagine style, which is based on image assets that can be provided using a predefined naming convention. Task-number: QTPM-517 Change-Id: I550d7dac9a9686d60bec15655ac92dea9f36149c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix qdoc linking errorJ-P Nurmi2017-07-271-1/+1
| | | | | | | | | qtbase commit 237c867 removed the "Fusion Style Widget Gallery" topic. Link to "Qt Widget Gallery" which contains a screenshot of the Fusion style. Change-Id: I59a7fe238ea2090fed76a1ce022e7b844083e925 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: update MenuBar in the type comparison tableJ-P Nurmi2017-07-271-1/+3
| | | | | Change-Id: Icb63953315926d0126d2154ef2942791726621fd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Introduce MenuBarJ-P Nurmi2017-07-2637-13/+2848
| | | | | | | | | | | | | | MenuBar is an ordinary Item. It can be located basically anywhere, but the idea is to introduce a new ApplicationWindow::menuBar property in a follow-up commit. Currently the example snippets are using the header property. [ChangeLog][Controls][MenuBar] Introduced a MenuBar control. Task-number: QTBUG-60350 Change-Id: Ie66dc457a3d8edbe8362fab2a591dc49442c95e2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_popup::test_margins(): use T.PopupJ-P Nurmi2017-07-211-1/+1
| | | | | | | | The test assumes that the background doesn't have implicit size => doesn't pass with the Imagine style that uses an image element. Change-Id: Id40eb9b7093fdd6ef80c474c97a18d8cea27a493 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickMenu: make sure to stop the hover timer when closingJ-P Nurmi2017-07-211-0/+2
| | | | | | | | This seems to be one of the reasons why tst_QQuickMenuBar has had troubles in a busy CI environment. Change-Id: Ifa20c309eac86e8f47ba0a8c3da76a58f00465cb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Auto tests: incorporate the QEvent::Leave trick to moveMouseAway()J-P Nurmi2017-07-212-6/+7
| | | | | | | | | | | 6f1eba89 used QEvent::Leave to make QQuickWindow clear its last known mouse position, which ensures that QQuickWindow won't send unexpected hover events from flushFrameSynchronousEvents(). The same hover events are causing trouble in tst_qquickmenubar too, so incorporate the leave event trick to moveMouseAway() to benefit from it in other tests too. Change-Id: I25a285d008d1cb639c7be09d714e482d472b4e50 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devJ-P Nurmi2017-07-218-16/+215
|\ | | | | | | Change-Id: Idb1895dae2870dbed860ba3106fe52b01d733504
| * Fix QQuickControlPrivate::getContentItem() overridesJ-P Nurmi2017-07-144-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When no content item is explicitly assigned, container type of controls (Page, Pane, Popup...) create a default content item on demand. Notice that the content item is created from within the contentItem() getter, so it must not emit contentItemChanged() to avoid binding loops. QQuickControl::setContentItem_helper() was introduced in 1eaebd0 to mitigate basically the same problem with QQuickScrollView, which has its own special lazy creation of a Flickable content item. Now, the problem is that the other container controls are not executing setContentItem_helper(), because they have already assigned contentItem and therefore it returns right away. Fix the issue by returning the new content item without assigning it to let setContentItem_helper() do its job. The issue was spotted while debugging QTBUG-61434. Change-Id: Id6f84748ec08bbdfd3bd934dda627e2619af7d2a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix unused parameter errors in qwidgetplatform_p.hJason Erb2017-07-141-0/+6
| | | | | | | | | | | | | | Task-number: QTBUG-61950 Change-Id: Idbc6bcc8f08dcccc50b409a055ab6c35e1f9aef8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * QQuickDrawer: fix multi-touch leaking through modal overlayJ-P Nurmi2017-07-144-4/+201
| | | | | | | | | | | | | | | | | | | | The first touch point was blocked as appropriate, but the consequent touch points were leaking through to other popups below Drawers' modal overlay. Task-number: QTBUG-61581 Change-Id: I1c3e28e3d25b7489c4a9b684107fd1b5158e1674 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickPageIndicatorPrivate: add missing overrideJ-P Nurmi2017-07-111-1/+1
| | | | | | | | | | | | | | | | | | Somehow this passed the 5.9 CI, but the dev branch throws an error: qquickpageindicator.cpp:110:10: error: 'itemChildAdded' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] Change-Id: I2effeb908552fa2759057cf0953ea65737be3f9a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix tst_pageindicator::test_interactive()J-P Nurmi2017-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | The Imagine style has to set top/left/right/bottom paddings separately. When the individual paddings are explicitly set, the generic padding property has no effect. Make the test set the required paddings so that it works also with the Imagine style. Change-Id: I8c4139917f397c8729817a54ad68c88d960dd479 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix tst_popup::test_size()J-P Nurmi2017-07-211-0/+4
| | | | | | | | | | | | | | The same fix we applied to tst_tabbar::test_layout() earlier. Change-Id: Id6d67aef66f01c14275c86dbd9ed0a7fa4244640 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix tst_tumblerJ-P Nurmi2017-07-201-1/+3
| | | | | | | | | | | | | | | | | | findView() was iterating recursively the children of the control's first child, but excluding the siblings. If the background item was the first child, the contentItem was ignored. Change-Id: I570361e65fc649234b25eb869c6533660a79a2c7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix tst_textfieldJ-P Nurmi2017-07-201-4/+8
| | | | | | | | | | | | | | | | | | Don't assume writable implicit size for the background, and check that the PlaceholderText element has a text property to allow Image elements as children. Change-Id: Ia5cadc2a0e289c2aaa0bc8c06b900487decead9e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix tst_tabbar::test_layout()J-P Nurmi2017-07-201-4/+3
| | | | | | | | | | | | | | | | | | The implicit size of the background can be read-only (the Imagine style has a background image), so reset the whole background instead of trying to reset its implicit size. Change-Id: I499f7ade13094064709a5a25153ad39ee14205d3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix tst_page::test_twoChildren()J-P Nurmi2017-07-201-2/+4
| | | | | | | | | | | | | | | | Allow the background to have an implicit size. The Imagine style has a background image so it has an implicit size. Change-Id: I39b41d265cb36959b198e6dac6024f6b91f3c5c6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | testbench: add dialog, flat buttons, make toolbar scalableMitch Curtis2017-07-191-11/+62
| | | | | | | | | | Change-Id: If29604b8131ded53bd947097b00e5fab4d41dd2e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | QQuickMenu: get rid of openSubMenu()J-P Nurmi2017-07-142-19/+16
| | | | | | | | | | Change-Id: I8125971dd91614984379e734af21f5ff28852667 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Make QQuickMenu::popup() available in C++J-P Nurmi2017-07-132-24/+41
| | | | | | | | | | | | | | | | | | This is going to be used for sub-menus by QQuickMenu itself, by the upcoming QQuickMenuBar, and allows users to implement their own Menu navigation if desired. Change-Id: I29258e78fec27e8dd207ed649958df1a718bcd39 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickMenu: close non-cascading parent menu from prepareEnterTransition()J-P Nurmi2017-07-131-4/+3
| | | | | | | | | | Change-Id: I075241c07702d1e8bbc89c43cef35525d9e67cc7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickMenu: resolve the parent itemJ-P Nurmi2017-07-132-7/+33
| | | | | | | | | | | | | | | | | | | | | | | | A cascading sub-menu is parented to the menu item in its parent menu, but a non-cascading sub-menu is parented to the parent menu's parent item to be able to have the sub-menu visible while the parent menu is hidden (non-cascading menus are opened and closed one by one). Based on these conditions, resolve the parent item automatically instead of doing it by hand in openSubMenu(). Change-Id: I5dd38ee0978604cd604dabf6f40ac4fb5f3eebbe Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickMenu::countJ-P Nurmi2017-07-123-0/+48
| | | | | | | | | | | | | | [ChangeLog][Controls][Menu] Added "count" property. Change-Id: I42971a6bf8fd74b9f2d3df52f191b66cd7022b81 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickMenu: override reposition() to position sub-menusJ-P Nurmi2017-07-122-6/+18
| | | | | | | | | | Change-Id: Ia63148beee6b574e435a120be245601b3a0b3322 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickMenu: control allowHorizontalFlip from prepareEnterTransition()J-P Nurmi2017-07-121-3/+5
| | | | | | | | | | Change-Id: I0444e3e9137e1b71cdd16c35dc7cc47875937a22 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickMenuPrivate::setParentMenu()J-P Nurmi2017-07-123-6/+31
| | | | | | | | | | | | | | | | To help propagating the cascade-property automatically, instead of doing it manually in openSubMenu() that we're trying to get rid of. Change-Id: I3a3d59cafccc85d6affc325eb60e717e22b8f812 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickMenu: fix overlay change notifier signalJ-P Nurmi2017-07-121-1/+1
| | | | | | | | | | Change-Id: Ia8ffca05d6eba5214dec3a4675be0f7a109f06bd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickMenu: control close policy from prepareEnterTransition()J-P Nurmi2017-07-122-3/+16
| | | | | | | | | | | | | | Moving stuff away from openSubMenu() until we can remove it... Change-Id: I0a979a6a0de25584a213b59e1d29d3b9f78b184e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickMenu::popup(): allow a parent argumentJ-P Nurmi2017-07-123-28/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parent argument is handy for sharing a single context menu instance for multiple listview items: ListView { delegate: ItemDelegate { onPressAndHold: contextMenu.popup(this) } Menu { id: contextMenu } } Change-Id: I77ff87ee03d2d1b53485863ab9c99f3226496dfc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickPopup: add reset-method for parentJ-P Nurmi2017-07-123-7/+34
| | | | | | | | | | Change-Id: Ia7d205bacf4da4cb13e31ab34fb62d13a77f7ddd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickMenu::dismiss()J-P Nurmi2017-07-113-36/+56
| | | | | | | | | | | | | | | | | | [ChangeLog][Controls][Menu] Added a dismiss() method. Unlike close() that only closes a menu and its sub-menus, dismiss() closes the whole hierarchy of menus, including the parent menus. Change-Id: Ibde2102bbb542a5deefdf17843496b7b80021db4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickMenu: cleanup focus handlingJ-P Nurmi2017-07-111-10/+3
| | | | | | | | | | | | | | | | Since 744164e6, there is no more need to manually transfer the focus when dealing with nested menus. Change-Id: I8e283b2ef4501aa36d57b3e06190237a1fee7133 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devJ-P Nurmi2017-07-1146-149/+563
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/controls/data/tst_scrollindicator.qml Change-Id: I1f5581ae7814c0d4152e4c9b79a30a8af5a3a17b
| * Fix focus handling for popupsJ-P Nurmi2017-07-113-5/+62
| | | | | | | | | | | | | | | | | | | | | | | | When a popup is closed, if there are multiple popups open, restore focus to the next popup in chain instead of transferring focus to the window content. This allows us to cleanup the custom focus handling for sub-menus in dev. There is no more need to manually transfer focus to the parent menu or to a sub-menu, but calling open() or close() is enough and the focus is automatically transferred as expected. Change-Id: I54406c7c6b8dd25af261e00ebb1ae00ccbea8b9f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Add color and styleColor to property editor for LabelThomas Hartmann2017-07-101-0/+24
| | | | | | | | | | | | Change-Id: Ie8ecc3874a61b29083e53441c3f484b94195ec46 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Example: Replace spaces from the image file nameVenugopal Shivashankar2017-07-1019-18/+18
| | | | | | | | | | | | | | | | | | | | Updated the corresponding qml files where these images are used. The spaces in file name stops qdoc from listing the file in the example page. Change-Id: I45b24ec88d367fe229fe365eeb611b86de805e0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Drawer: ignore and warn about invalid edge valuesMitch Curtis2017-07-073-6/+31
| | | | | | | | | | | | | | | | | | This fixes an issue where an application would crash when opening a drawer by dragging it after an invalid edge value had been set. Task-number: QTBUG-61843 Change-Id: Ie9b9ea0276b356b92927b858f2be355bfc042afb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Tumbler: fix regression with currentIndex and currentItemMitch Curtis2017-07-076-46/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2c4b2d48 made Tumbler's wrap property follow its count by default, but did so using updatePolish() to account for the use case where a items are appended to the model in a for loop, as is done in TumblerDatePicker.qml in Tumbler's auto tests. This (appending items one at a time in a for loop) is not a good idea, but it should work. The problem with the solution is that the delay means that the use cases mentioned in the referenced bug report were broken. This patch removes the delay. The recursion guards are necessary due to the complex nature of TumblerView (and its non-standard use of the Qt Quick views), as they prevent a memory leak in QQuickListView::createHighlight() from being introuduced. We now call deleteLater() to ensure we do not interfere with the views' internal operations, and hence we also perform a few extra operations at the same time as insurance (although it appears that simply unparenting the internal view from QQuickTumblerView is enough to get the tests to pass). Task-number: QTBUG-61374 Change-Id: Ifef9e99522ea183b282ac862f346beaed12d0c09 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Remove redundant code in touch event handlersJ-P Nurmi2017-07-072-26/+2
| | | | | | | | | | | | | | | | | | | | | | QEvent::TouchUpdate can contain touch points in any states. It iterates the list of points and calls handlePress/Move/Release(). We can re-use the same handling for QEvent::TouchBegin() (pressed) and QEvent::TouchEnd() (released). This change does not fix anything but makes the next steps easier. Change-Id: I29edd949579ab6a4bf923e455a1ef38adb05e3a5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix modal overlay to block multi-touchJ-P Nurmi2017-07-043-4/+43
| | | | | | | | | | | | Task-number: QTBUG-61698 Change-Id: I46db5e9816190ac7afd6b671198dff11089bc4f3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * ScrollIndicator: don't block touchJ-P Nurmi2017-07-043-0/+38
| | | | | | | | | | | | | | | | | | | | | | Unlike with mouse events there's setAcceptedMouseButtons(), currently there's no way to control whether a control receives touch events or not. As a temporary workaround until QQuickItem::setAcceptTouchEvents() has been added, we'll have to ignore touch events by hand. Task-number: QTBUG-61785 Change-Id: I9a678570bfdd104ae32b4040ecef7625dcfd1aee Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * BusyIndicator: don't block touchJ-P Nurmi2017-07-043-0/+38
| | | | | | | | | | | | | | | | | | | | | | Unlike with mouse events there's setAcceptedMouseButtons(), currently there's no way to control whether a control receives touch events or not. As a temporary workaround until QQuickItem::setAcceptTouchEvents() has been added, we'll have to ignore touch events by hand. Task-number: QTBUG-61785 Change-Id: I195d5ec3122ca0c7f2fade700b5b0c221472a243 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * PageIndicator: don't block touch when non-interactiveJ-P Nurmi2017-07-043-0/+51
| | | | | | | | | | | | | | | | | | | | | | Unlike with mouse events there's setAcceptedMouseButtons(), currently there's no way to control whether a control receives touch events or not. As a temporary workaround until QQuickItem::setAcceptTouchEvents() has been added, we'll have to ignore touch events by hand. Task-number: QTBUG-61785 Change-Id: I8e3bdc3df1c3b28afaf8f80965569135e6a53120 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * PageIndicator: fix touch supportJ-P Nurmi2017-07-043-49/+63
| | | | | | | | | | Change-Id: I00d4f6ed466e33be3f31b2cd0bcbae6707d84cb9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Doc: fix the anchors.fill links in the Chat TutorialJ-P Nurmi2017-07-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | There was a QDoc warning: qtquickcontrols2-chattutorial.qdoc:28: warning: Can't link to 'anchors.fill' and the anchors.fill links weren't actually linking to the anchors property but just to the beginning of the QML Item docs. Change-Id: I66f66765443e5b75af8198309f9f7482e70ea2d3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Merge remote-tracking branch 'origin/5.9.1' into 5.9Liang Qi2017-06-301-0/+75
| |\ | | | | | | | | | Change-Id: I40305fb37ab91033d43f408cd0726c4cddc556d5
| | * Add changes file for 5.9.1v5.9.1Jani Heikkinen2017-06-231-0/+75
| | | | | | | | | | | | | | | | | | Change-Id: If9e0016cb6d641154642a97bc97cf5229d65e998 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * | Bump versionOswald Buddenhagen2017-06-301-1/+1
| | | | | | | | | | | | Change-Id: I1567b32b9e951944ec764cd37d6ffeedac386476
* | | QQuickPopup: add reset-method for closePolicyJ-P Nurmi2017-07-113-2/+15
| | | | | | | | | | | | | | | Change-Id: I05357bf0605eb152531ded3788437b1d52022528 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>