Commit Graph

16 Commits

Author SHA1 Message Date
J-P Nurmi a5b1488696 ToolTip: don't leak memory if attached to a non-Item
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>
2016-07-18 09:53:53 +00:00
J-P Nurmi 09706e8f9f Popup: expose flip API
[ChangeLog][Popup] Added allowVerticalFlip and allowHorizontalFlip
properties to control whether flipping is allowed to fit a popup
inside the window.

Change-Id: Id14a8846a1e2d07e98207da7c2b2765c202dbaf9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-07-09 10:37:34 +00:00
J-P Nurmi 1db5df5a73 Merge remote-tracking branch 'origin/5.7' into dev
Change-Id: Ifff470774347041d1638fb1da277a8cc11a00db6
2016-07-09 08:26:10 +02:00
J-P Nurmi 7af626e08c Bump up all controls and templates imports to version 2.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>
2016-07-08 07:37:33 +00:00
Mitch Curtis 2f5a6875c3 Improve ToolTip documentation
- Link to "Delay and Timeout" section from property docs
so that users can easily learn more about these.
- Be more consistent with wording.

Change-Id: I70ad8eb2cda43d6faac0b322fc32be61ea3696df
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-07-04 08:04:58 +00:00
J-P Nurmi 5038dc286b Doc: add missing \since 5.7 tags
Change-Id: Ie4680c5dfadc95278215b688f4fc28577f557933
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2016-05-25 14:49:27 +00:00
Nikita Krupenko 0535acbddd Use ToolTip font from theme
Change-Id: I9a95bcd02a48528bc3e3315c7aa730a2d43bb002
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-04-26 12:10:36 +00:00
J-P Nurmi 99fa43b370 Promote QQuickToolTip's repositioning code to QQuickPopup
QQuickToolTip already had repositioning implemented for both horizontal
and vertical directions. Promote that code up to QQuickPopup so that
QQuickMenu gets properly repositioned when used as a context menu.

As special cases, QQuickComboBox enables vertical flipping for its
popup, and QQuickToolTip enables both. In the QQuickPopup base class,
both are disabled by default.

Task-number: QTBUG-52608
Change-Id: Ia8f835321222d4841a6f79434822b33f057d13fc
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2016-04-25 03:48:09 +00:00
J-P Nurmi 86388843ec Doc: add "Popup Controls" group page
Change-Id: I863b49f9dad875922a3a4262881e6cd8a32f4b18
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2016-04-25 03:47:42 +00:00
J-P Nurmi fd1ae8164c Doc: cleanup remaining "labs" references
Change-Id: I5b0015476c3ceef8f82b00d99b084b1ce3bfaa6f
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-04-21 19:30:49 +00:00
J-P Nurmi 523542d524 Doc: rename Qt.labs.controls 1.0 to QtQuick.Controls 2.0
Change-Id: Id6c476424fa359d222f027584278346fc0984069
Task-number: QTBUG-52549
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-04-21 18:08:46 +00:00
J-P Nurmi 1ef2c051ec import Qt.labs.controls 1.0 => QtQuick.Controls 2.0
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>
2016-04-21 15:48:05 +00:00
J-P Nurmi 0fe0283308 ToolTip: use QQmlInfo and don't crash with non-Items
Before:

    ToolTip must be attached to an Item QObject(0x239c3e0)
    The program has unexpectedly finished.

After:

    qrc:/main.qml:8:5: QML QtObject: ToolTip must be attached to an Item

Change-Id: I9a2bf317a13eb7408fc5851087457bbfbeca9f3f
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2016-04-15 09:24:53 +00:00
J-P Nurmi 32a957f31a Templates: update license headers
This file is part of the Qt Quick Templates 2 module of the Qt Toolkit.

Change-Id: I39ef9cbb00f55a32b7a43f11ffbdfbb40b84e124
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2016-04-14 06:18:27 +00:00
J-P Nurmi 5570ade79f Doc: add 2-suffix to the image assets and snippets
Change-Id: Ib8050cb3baefe07d28c7e2dcec64af155d2d7c9b
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2016-04-13 19:11:26 +00:00
J-P Nurmi a60c8e60d5 Templates: rename the C++ module to qtquicktemplates2
Change-Id: I146da903b46f5c2caf865e37291c25376b49021a
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2016-04-13 15:28:11 +00:00