aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add MenuSeparator and ToolSeparator to Differences doc pageMitch Curtis2016-08-241-0/+6
| | | | | Change-Id: Ica132eeac20a5d276abfb7d74eba07d638ba288e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Remove 'No hover effects' note from qtquickcontrols2-differences.qdocMitch Curtis2016-08-241-3/+1
| | | | | | | This is no longer true. Change-Id: I70b36cfaf96be1d332e801499ca23de144df76ac Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-08-2315-111/+176
|\ | | | | | | | | | | | | | | | | | | | | 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>
| * Document that style attributes set in QML have precedence over settingsMitch Curtis2016-08-192-2/+4
| | | | | | | | | | Change-Id: I88fbebfc672d4c8d398a45b5dfe0c61fa307a9e7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Universal: document the attached style propertiesMitch Curtis2016-08-192-0/+10
| | | | | | | | | | Change-Id: I390d3f9107f9e38e755f98060f74d63becba60cb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Universal: ensure setting background/foreground worksMitch Curtis2016-08-191-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add HasGlobalForeground and HasGlobalBackground. These are set to true when a foreground/background color is specified via settings (qtquickcontrols2.conf file or environment variables), and then used to initialize each attached style object's m_hasForeground and m_hasBackground property. - Add tst_qquickuniversalstyleconf auto test to ensure that global settings are respected. Task-number: QTBUG-55366 Change-Id: I7a8b219506f9528c4ae323bd890b418ba056ed23 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Universal: rename DefaultX variables to GlobalXMitch Curtis2016-08-191-20/+20
| | | | | | | | | | | | | | | | | | For example, DefaultAccent will become GlobalAccent. This better reflects the reality that these are not true defaults because they can be overridden by settings and makes it easier to read the code. Change-Id: I2a7afa3ec8fd6db620d054b6e1f6860b2d3e1d02 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Material: document the attached style propertiesMitch Curtis2016-08-192-0/+15
| | | | | | | | | | Change-Id: I8349ec366c75b9480533bb9b61a3748e09e9560e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Material: ensure setting background/foreground worksMitch Curtis2016-08-191-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add hasGlobalForeground and hasGlobalBackground. These are set to true when a foreground/background color is specified via settings (qtquickcontrols2.conf file or environment variables), and then used to initialize each attached style object's m_hasForeground and m_hasBackground property. - Add tst_qquickmaterialstyleconf auto test to ensure that global settings are respected. Change-Id: I436773e355c6d470215fb9cfe8fbff402d2979d9 Task-number: QTBUG-55366 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Material: rename defaultX variables to globalXMitch Curtis2016-08-191-43/+43
| | | | | | | | | | | | | | | | | | For example, defaultPrimary will become globalPrimary. This better reflects the reality that these are not true defaults because they can be overridden by settings and makes it easier to read the code. Change-Id: Idf09e5b0c6a2d91663730c00e3d32f2be49e15c6 Reviewed-by: J-P Nurmi <jpnurmi@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>
| * ComboBox: make delegates respect the popup widthJ-P Nurmi2016-08-183-3/+3
| | | | | | | | | | | | Task-number: QTBUG-55050 Change-Id: I25e84d15ebb61f88cc92ab570471969ec5971c10 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-1712-18/+94
|\| | | | | | | Change-Id: I8172f493c5747db2c9e728b026ff267bff2e3427
| * Doc: add an example how to create a flickable tab barJ-P Nurmi2016-08-113-0/+62
| | | | | | | | | | | | 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>
| * Universal: fix editors in dark themeJ-P Nurmi2016-08-112-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | There is no reason to force ChromeDisabledLowColor when having active focus. ChromeDisabledLowColor is the same color than light theme's BaseHighColor. Universal's foreground color is mapped to BaseHighColor, so we can simply use Universal.foreground to retain the old behavior _and_ get a working foreground color when explicitly turned to a dark editor. Task-number: QTBUG-52738 Change-Id: I2687a3df17985c5ad897f8fd80d808fa27ea918d 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>
| * Material: fix multiple BusyIndicator instancesJ-P Nurmi2016-08-101-10/+12
| | | | | | | | | | | | | | | | | | | | Cannot use local static variables to store the values of the last round, because the values must be stored per instance, not shared between all busy indicators. Task-number: QTBUG-54472 Change-Id: Ibb088b077ff8e23b1376e04a0329f001211574f7 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>
* | Platform: widget-based fallbacks no longer need to check availabilityJ-P Nurmi2016-08-166-143/+80
| | | | | | | | | | | | | | | | | | | | | | It is done in qwidgetplatform_p.h createWidget() outside QT_WIDGETS_LIB guards so you get the important warnings even in -no-widgets builds. Now that the widget platform instances are created only when really available, they can unconditionally instantiate the respective widget, which simplifies the code quite a bit. Change-Id: I7430f8e803050e43edb3af3a139b0508445f6a37 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform: offload widget fallback creation to qwidgetplatform_p.hJ-P Nurmi2016-08-155-53/+65
| | | | | | | | | | Change-Id: If51b359fa44a539c236e1a070e69451c75e190f7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform: align logging outputJ-P Nurmi2016-08-154-4/+9
| | | | | | | | | | Change-Id: I3438e1da864f6d7c710e4770f12aa2596f091a9d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform dialogs: handle QPlatformTheme::usePlatformNativeDialog()J-P Nurmi2016-08-151-1/+2
| | | | | | | | | | Change-Id: Iee7c700666d866ac28b8102a17ee86121af1af4e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform: fix Menu logging outputJ-P Nurmi2016-08-151-2/+1
| | | | | | | | | | | | | | It should be _after_ the potential widget-instance creation. Change-Id: I7534a5914aeb96b441807945030a1ea1d8370378 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform dialogs: respect Qt::AA_DontUseNativeDialogsJ-P Nurmi2016-08-155-5/+9
| | | | | | | | | | Change-Id: I107d51c9e3a874b92c627735dc88c7d296ec799f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform dialogs: cleanup creationJ-P Nurmi2016-08-1512-111/+58
| | | | | | | | | | | | | | | | Now that we know the type and whether it should be native, it can be all done in the base class to reduce a lot of code duplication. Change-Id: I7d7d7057fa499df75b72914d2b505bfa0288048d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Add QQuickPlatformDialog::useNativeDialog()J-P Nurmi2016-08-1511-5/+37
| | | | | | | | | | Change-Id: Id1699a6045eb9066a80ebdbb3cb5d3a01e58a36f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform dialogs: pass the dialog type to QQuickPlatformDialog ctorJ-P Nurmi2016-08-157-7/+16
| | | | | | | | | | Change-Id: I42b5e403e6cb16e607d9ce0d0e9f624b150bec03 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform dialogs: revise the names of the protected helper methodsJ-P Nurmi2016-08-1512-31/+31
| | | | | | | | | | Change-Id: I4b65c7623a34d016243e626146437d2fa20fd93b Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform: add Dialog::done(int) and Dialog::resultJ-P Nurmi2016-08-145-43/+72
| | | | | | | | | | | | | | A more generic replacement for MessageDialog.clickedButton. Change-Id: I060f70a48ab258485e3155188e483c4cf24210e0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform dialogs: apply the optionsJ-P Nurmi2016-08-1412-13/+24
| | | | | | | | | | Change-Id: I6bccfebcbb32dcafeea0814d88f7882857a62a85 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform dialogs: respect (undocumented) DontUseNativeDialogJ-P Nurmi2016-08-144-4/+12
| | | | | | | | | | Change-Id: I56ad5025fb873261ccd96e82e4c9fff0731ddf92 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform dialogs: postpone the platform handle creation furtherJ-P Nurmi2016-08-141-2/+0
| | | | | | | | | | | | | | | | It is no longer necessary to force the creation when accessing the handle, because all places where it is used have a fallback member. Change-Id: I7051b79e12c48aff0065a5a478c9c6c0c3ad2559 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform dialogs: make properties independent of the platform instanceJ-P Nurmi2016-08-144-2/+6
| | | | | | | | | | | | | | | | This allows us to postpone to creation further, and even re-create the instance on the fly later, without losing information. Change-Id: I116d332d10d637bbc393ee31ec1bc8b0cd156835 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Platform: set DontUseNativeDialog on the QtWidgets-based fallbacksJ-P Nurmi2016-08-143-3/+3
| | | | | | | | | | | | | | | | Make sure the widget-based fallback implementation will never call back to the platform plugin. Change-Id: I860e61d23a34edcd0a8f85aabbd8d9c86ceac9ad Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | File|FolderDialog: fill in and use the initial values in the optionsJ-P Nurmi2016-08-142-8/+7
| | | | | | | | | | Change-Id: I5805e03327cea6cba8083f636e061b561e87f215 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | FileDialog: add missing selectedNameFilter-propertyJ-P Nurmi2016-08-143-0/+30
| | | | | | | | | | Change-Id: If31d657e29a9cc3049af5cd3cf39d68979ff2db0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | FileDialog: add missing folder-propertyJ-P Nurmi2016-08-143-0/+29
| | | | | | | | | | Change-Id: I60d60072f1cc6a876228e647b1d6db943e303ea2 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | FileDialog: replace file(s)Selected() with declarative propertiesJ-P Nurmi2016-08-143-50/+127
| | | | | | | | | | | | | | Follow the same convention that ColorDialog, FontDialog and FolderDialog. Change-Id: I960d4fc1ba275ab997f2a079a799d2b90796eca3 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | FolderDialog: replace folderSelected() with a declarative propertyJ-P Nurmi2016-08-143-46/+60
| | | | | | | | | | | | | | Follow the same convention that ColorDialog and FontDialog. Change-Id: I49834daf908aadf145949c0b749c6c066f63fd83 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | FontDialog: replace fontSelected() with a declarative propertyJ-P Nurmi2016-08-144-20/+57
| | | | | | | | | | | | | | This is consistent with the QML FontDialog from QtQuick Dialogs 1. Change-Id: I14a5a313be5ba9a9e0fb1645fe272cf9c2cdd389 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>