aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-08-236-37/+57
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/material/qquickmaterialstyle.cpp src/imports/controls/universal/qquickuniversalstyle.cpp src/quicktemplates2/qquickpopup_p_p.h src/quicktemplates2/qquicktooltip.cpp tests/auto/auto.pro Change-Id: I88b347dd85278e14f7b2ca468e30648c6432b6f2
| * QQuickToolTip: fix the creation context of the shared tooltipJ-P Nurmi2016-08-221-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Don't create the shared tooltip in the parent item's context, because that may be destroyed and invalidate all bindings in ToolTip.qml. The QML engine is the effective parent of the shared tooltip, so use the engine's root context for creation as well. We do not need to pass any specific context to QQmlComponent::create(), because it will pick the root context by default. Change-Id: I624b53fa9ba02123398e76b5eccf1a8091826b37 Task-number: QTBUG-55347 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix attached ToolTip propertiesJ-P Nurmi2016-08-191-2/+8
| | | | | | | | | | | | | | | | | | | | The attached properties should apply to the shared/global tooltip instance only when the shared tooltip is visible for the attachee item. Task-number: QTBUG-55347 Change-Id: Ia822f2d1de62d2d6dfb28519817edce674d8c2b8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickPopup: do not attempt to execute transitions without a windowJ-P Nurmi2016-08-192-3/+9
| | | | | | | | | | | | | | | | | | A parentless/windowless popup item is not associated to a QML engine. Accessing transitions calls qmlExecuteDeferred(), which leads to a crash. This can happen in auto tests with the shared tooltip during destruction. Change-Id: I9a258b2df6b87fce7833e358f17b1910934212c2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Close parentless popupsJ-P Nurmi2016-08-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A parentless popup is not visible anywhere, and is not even associated to a QML engine. Attempting to execute transitions would crash. Make sure to remove any event filters (when using a plain QML Window, like with QML TestCase) when a popup is made parentless. This ensures that if the global shared tooltip was shown on an item that was destroyed, the tooltip won't keep interfering with the window where it was last shown. Change-Id: I87bf9f8dda2fbcc5d1b83d1b83a66a6b9e718eb6 Task-number: QTBUG-55347 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickToolTip: fix destruction of the shared tooltipJ-P Nurmi2016-08-191-1/+12
| | | | | | | | | | | | | | | | | | | | | | Make the QML engine the parent of the shared tooltip instance, and make sure the instances are per engine. This ensures that the shared tooltip gets properly destructed when the associated QML engine is destructed. The same technique is used for the global styles in QQuickStyleAttached. Change-Id: I08dcb4f9bc6ddafb7449afe43362e560c0952e88 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickPopup: don't keep a reference to a destroyed parentJ-P Nurmi2016-08-184-16/+15
| | | | | | | | | | | | | | | | | | | | | | Move the itemDestroyed() listener from QQuickPopupPositioner, which is only active while the popup is visible, to QQuickPopupPrivate instead. This way the popup gets a notification when the parent gets destroyed while the popup is hidden. Task-number: QTBUG-55347 Change-Id: Ic72206cc05996c23062e814799a030c369fc6288 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickDrawerPrivate: remove unused QQuickItemChangeListener inheritanceJ-P Nurmi2016-08-181-2/+1
| | | | | | | | | | Change-Id: I96ebc8ccd0c6bb05a4725cd42a65224411823b82 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * qquickpopup_p.h: add missing override keywordsJ-P Nurmi2016-08-181-4/+4
| | | | | | | | | | Change-Id: I3ee830e88fd9621ffa4f81b2106c33c06ca7d1e9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-177-4/+30
|\| | | | | | | Change-Id: I8172f493c5747db2c9e728b026ff267bff2e3427
| * Doc: add an example how to create a flickable tab barJ-P Nurmi2016-08-111-0/+12
| | | | | | | | | | | | Change-Id: Iad89f8d46b44ca2634d3f8ecd52431654ae5d7ac Task-number: QTBUG-55129 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * TextArea & TextField: set IBeamCursorJ-P Nurmi2016-08-112-0/+6
| | | | | | | | | | Change-Id: Iba3f5c0847a57420e9a8f85c589496c4e698a01e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * TabBar: cull tabs outside the barJ-P Nurmi2016-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | Same as a055629 for SwipeView, and 9cf30f1 for Menu. This hides the tabs until they become visible in the bar. Hiding them explicitly is not an option, because then they will never show up. This technique is used in QQuickItemView::initItem() and FxViewItem::setVisible(). Task-number: QTBUG-55129 Change-Id: I84a9e0acf6109dfff72130f7a2bf1e5e992829d8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Dial: fix stepSize handlingMitch Curtis2016-08-101-2/+8
| | | | | | | | | | | | | | | | | | | | | | As was done in for Slider in c4c803ce4: The correct formula for calculating the "range" or "span" is to-from, not from+(to-from), which is used in the formula for calculating value. Task-number: QTBUG-55228 Change-Id: Ic5463ef5ac5566efc5996aadd9ae39ec108d778f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * QQuickRangeSlider: fix snapPosition()J-P Nurmi2016-08-101-1/+1
| | | | | | | | | | | | | | | | | | The correct formula for calculating the "range" or "span" is to-from, not from+(to-from), which is used in the formula for calculating value. Task-number: QTBUG-55015 Change-Id: Ie30f7e86a10b606a59a171a4667772e446beaf39 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix popups to appear above QtQuick.Dialogs 1.xJ-P Nurmi2016-08-102-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a plain QML Window, the Z-value of the popup item must be higher than the Z-value of the DefaultWindowDecoration in QtQuick.Dialogs 1.x. When using an ApplicationWindow, the same applies to the window overlay. NOTE: The correct Z-value of DefaultWindowDecoration is 1000000, not 10000! (qtquickcontrols/src/dialogs/qml/DefaultWindowDecoration.qml) Task-number: QTBUG-55004 Change-Id: Ib5d068ee2c633884f95ba519f77b6ec082220461 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Doc: SwipeDelegate: move methods out of property groupsJ-P Nurmi2016-08-131-9/+12
| | | | | | | | | | | | | | | | | | This is the same as 49b79522 for RangeSlider. QDoc doesn't support documenting methods inside a property group. Move them to the top level and use 'see also' to link between the group and method. Change-Id: I6af44fa44e107b62cedb38f60c04582ab4bbd299 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add ComboBox::flatJ-P Nurmi2016-08-112-1/+37
| | | | | | | | | | | | | | | | | | [ChangeLog][ComboBox] Added a flat property that provides more suitable looks for using ComboBox in a ToolBar. Task-number: QTBUG-54935 Change-Id: Id458a078486aeac5d542a57f3ed247d63d25e95c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-08-095-5/+11
|\| | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickpage.cpp Change-Id: I4c8b62fb1d7c20c6d3c870eb47e0402a20051098
| * ComboBox: ensure an update of the current text on data changeJ-P Nurmi2016-08-091-0/+6
| | | | | | | | | | | | Task-number: QTBUG-55118 Change-Id: I4edcd660a35d8b8719fc4c09719332d088859ffc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Page: take header & footer visibility into account in relayout()J-P Nurmi2016-08-091-2/+2
| | | | | | | | | | | | Task-number: QTBUG-55143 Change-Id: I4176d0f8902ee417fd5cb938b0f0902d480e80f6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * AppWindow: take header & footer visibility into account in relayout()J-P Nurmi2016-08-091-2/+2
| | | | | | | | | | | | Task-number: QTBUG-55143 Change-Id: I2acf8ca720df33a0417d850b5b0410ec9166dc89 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Add SwipeDelegate to Delegate Controls documentationMitch Curtis2016-08-081-0/+1
| | | | | | | | | | | | Task-number: QTBUG-55174 Change-Id: I28397af09d6d4134a59449c76f15ec9a65cd9b4e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-033-0/+26
|\| | | | | | | | | | | | | | | | | | | | | | | Also update expected line numbers in tst_swipedelegate. Conflicts: .qmake.conf src/quicktemplates2/qquicktextarea.cpp src/quicktemplates2/qquicktextarea_p.h tests/auto/controls/data/tst_swipedelegate.qml Change-Id: I36323e3a633c1c750d23014e56a7c881963a1a30
| * SwipeDelegate: warn about horizontally anchoring background/contentItemMitch Curtis2016-08-021-0/+16
| | | | | | | | | | | | | | | | | | SwipeDelegate must have control over the x positions of these items in order to move them during swipes. Task-number: QTBUG-55040 Change-Id: Ie1e91fa4705cffe7573205279feff9bab048acd5 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Flickable TextArea: don't intercept input events outside visual boundsJ-P Nurmi2016-07-222-0/+10
| | | | | | | | | | | | Task-number: QTBUG-54897 Change-Id: I4e5cd0e175fa5dc2399bb80150ac538912a5b542 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add MenuSeparatorMitch Curtis2016-07-253-0/+157
| | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Added MenuSeparator to visually distinguish between groups of items in a menu. Change-Id: I7a52910b19633ed1188c90ca56c92346a28d4d5c Task-number: QTBUG-54862 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-07-223-32/+54
|\| | | | | | | Change-Id: I82c2b8d97d639e24147118a2ca6276ae70195b45
| * Fix overlay event processing order for popupsJ-P Nurmi2016-07-221-14/+34
| | | | | | | | | | | | | | It should follow the stacking order of popups. Change-Id: Id5664496c60e99bdf0aa4b2dc6a2c94dba2c756a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix hover event handling for drawer overlaysJ-P Nurmi2016-07-222-2/+6
| | | | | | | | | | | | | | | | | | | | Closed drawers sit visible at the window edge to be able to pull them out. Don't block hover events when drawers are fully closed ie. when their overlays are fully translucent. Task-number: QTBUG-53419 Change-Id: I5bdbed5a2cf3ad6972634432ac79f7fbe5054b98 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Don't leak hover events through modal overlaysJ-P Nurmi2016-07-221-0/+6
| | | | | | | | | | | | Task-number: QTBUG-53419 Change-Id: I5c1ce684cff7954f9c011e991e3924741ad44367 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Don't leak hover events through popupsJ-P Nurmi2016-07-221-0/+5
| | | | | | | | | | | | Task-number: QTBUG-53419 Change-Id: Ia3e23538bfba09454c9b473d8394814890ada150 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Popups: fix overlay visibilityJ-P Nurmi2016-07-221-17/+4
| | | | | | | | | | | | | | | | | | | | Make sure popup overlay dimmers gets destroyed when popups are closed, and thus, re-parented out of the window overlay. The window overlay item is hidden when there are no child items, so this fixes the issue that the window overlay item was left visible after closing popups. Change-Id: Id2ffe43b706ffcc5cda83abd75354ef04f893745 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | QQuickTumbler: change asserts to if-checksJ-P Nurmi2016-07-221-5/+3
| | | | | | | | | | | | | | The asserts made qmlplugindump crash when run for QtQuick.Templates. Change-Id: Ic18424555963640af806050f1e243e3b9bcfe993 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add ToolSeparatorMitch Curtis2016-07-213-0/+238
| | | | | | | | | | | | | | | | | | | | ToolSeparator is used to visually distinguish between groups of items in a toolbar by separating them with a line. It can be used in horizontal or vertical toolbars. Task-number: QTBUG-54862 Change-Id: Ie68e680510428ad19e7f80268063af07b61100eb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Tumbler: don't crash if attached to a non-ItemJ-P Nurmi2016-07-202-14/+16
| | | | | | | | | | Change-Id: I84702195fa09af53697c987efd8c87afd429f3c4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-07-202-2/+3
|\| | | | | | | Change-Id: Idf19dd882ba3015be2afda6988cac1e95a4912fa
| * Doc: minor language correctionNico Vertriest2016-07-191-2/+2
| | | | | | | | | | Change-Id: Iec9a8126cf424925fbe74d1f4dfb6a1d55fc2e64 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickStackView: claim QObject ownership for dynamically created itemsJ-P Nurmi2016-07-181-0/+1
| | | | | | | | | | | | Change-Id: I08030cab226c3e1f602e922fa1cad0a260e0c0ad Task-number: QTBUG-54552 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add DialogJ-P Nurmi2016-07-185-0/+582
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Added Dialog to provide convenience for handling dialog popups. Dialog integrates with DialogButtonBox, and provides convenient accepted() and rejected() signals. Task-number: QTBUG-51090 Change-Id: I776516738b82c0e5726769c054d6f2a956fb616d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | StackView: don't crash if attached to a non-ItemJ-P Nurmi2016-07-182-12/+13
| | | | | | | | | | Change-Id: Ifa7ef9b0960494df917f9f60bf8d94cbee0f4661 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SwipeView: don't crash if attached to a non-ItemJ-P Nurmi2016-07-182-17/+16
| | | | | | | | | | Change-Id: I381d84c45cf6cd9b1209fd0d5c7441a9f7707664 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | ToolTip: don't leak memory if attached to a non-ItemJ-P Nurmi2016-07-182-8/+7
| | | | | | | | | | | | | | | | | | Previously, it was casting the attachee object to an item and passing it as a parent to the QObject constructor. When attached to a non-Item, it passed a null pointer as a parent. Change-Id: I45933e39e3080ab8e010fa3f7257fdffce4db685 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-07-159-15/+113
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickswipedelegate.cpp tests/auto/controls/data/tst_swipedelegate.qml tests/auto/controls/data/tst_textarea.qml tests/auto/controls/data/tst_textfield.qml Change-Id: I244f4ead4d14238c41db0bd965d7a2938f2ea8fc
| * SwipeDelegate: vertically resize contentItem when swipe is completeMitch Curtis2016-07-151-4/+8
| | | | | | | | | | | | | | | | Otherwise the delegate's text doesn't change with height animations. Task-number: QTBUG-54780 Change-Id: I4e253b807e4765732a80100fca102b6650527948 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Doc: special notes for Component and url in StackView::push/replace()J-P Nurmi2016-07-131-0/+16
| | | | | | | | | | | | | | Adapted from Component::createObject() docs. Change-Id: I53e44cfbcb4e4f1cc407e09d4ee90724526c9411 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * SwipeDelegate: reposition contentItem, background on width changesMitch Curtis2016-07-122-7/+43
| | | | | | | | | | | | Change-Id: I6af4f1a4517e79f2e34b0bbca401b0eefd0c6ff4 Task-number: QTBUG-54660 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Document which controls consume mouse/touch eventsMitch Curtis2016-07-111-0/+6
| | | | | | | | | | | | Change-Id: I284b0d84363a172b2f11093b01157d00db69103a Task-number: QTBUG-54658 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * SwipeDelegate: document which items can be used in left/right/behindMitch Curtis2016-07-111-0/+6
| | | | | | | | | | | | Task-number: QTBUG-54658 Change-Id: Ie8bb1fa6669c7dd1cd18199d01c773a1854edad4 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Drawer: fix dragMargin handlingJ-P Nurmi2016-07-111-4/+6
| | | | | | | | | | | | Change-Id: I7549509aef9a88af7e6a449bae52da273b0253d0 Task-number: QTBUG-54629 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>