aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-05-30 19:42:14 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-05-30 19:42:14 +0200
commit7d592bcbfb604b1179004e311aa6a972fab6707c (patch)
tree92d7ea1e139c3d264dd75dc527c2113e279db9f6
parentf57f2d9e45b177232b76bde07ff96ef3e43fe5b1 (diff)
parent44dd55be23138f0a6495b08818acaaa0ff68b086 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/quicktemplates2/qquickrangeslider.cpp Change-Id: I7eb990cfdc91173f86552841ba16536b35ea09cf
-rw-r--r--examples/quickcontrols2/chattutorial/chapter4-models/chapter4-models.pro2
-rw-r--r--examples/quickcontrols2/chattutorial/chapter5-styling/chapter5-styling.pro2
-rw-r--r--src/imports/controls/material/qquickmaterialripple.cpp2
-rw-r--r--src/quickcontrols2/configure.json6
-rw-r--r--src/quicktemplates2/configure.json3
-rw-r--r--src/quicktemplates2/qquickabstractbutton.cpp2
-rw-r--r--src/quicktemplates2/qquickbuttongroup.cpp2
-rw-r--r--src/quicktemplates2/qquickcombobox.cpp20
-rw-r--r--src/quicktemplates2/qquickcontainer.cpp4
-rw-r--r--src/quicktemplates2/qquickdial.cpp4
-rw-r--r--src/quicktemplates2/qquickdrawer.cpp2
-rw-r--r--src/quicktemplates2/qquickpage.cpp4
-rw-r--r--src/quicktemplates2/qquickpopup.cpp2
-rw-r--r--src/quicktemplates2/qquickrangeslider.cpp2
-rw-r--r--src/quicktemplates2/qquickscrollbar.cpp6
-rw-r--r--src/quicktemplates2/qquickslider.cpp6
-rw-r--r--src/quicktemplates2/qquickspinbox.cpp6
-rw-r--r--src/quicktemplates2/qquickstackview.cpp12
-rw-r--r--src/quicktemplates2/qquickswipedelegate.cpp14
-rw-r--r--src/quicktemplates2/qquickswipeview.cpp8
-rw-r--r--src/quicktemplates2/qquicktabbar.cpp4
-rw-r--r--src/quicktemplates2/qquicktextarea.cpp8
-rw-r--r--src/quicktemplates2/qquicktextfield.cpp8
-rw-r--r--src/quicktemplates2/qquicktumbler.cpp4
-rw-r--r--tests/auto/controls/data/tst_tooltip.qml6
-rw-r--r--tests/auto/popup/data/closeOnEscapeWithNestedPopups.qml112
-rw-r--r--tests/auto/popup/tst_popup.cpp68
27 files changed, 251 insertions, 68 deletions
diff --git a/examples/quickcontrols2/chattutorial/chapter4-models/chapter4-models.pro b/examples/quickcontrols2/chattutorial/chapter4-models/chapter4-models.pro
index 75d37ca3..2a2d955b 100644
--- a/examples/quickcontrols2/chattutorial/chapter4-models/chapter4-models.pro
+++ b/examples/quickcontrols2/chattutorial/chapter4-models/chapter4-models.pro
@@ -3,8 +3,6 @@ TEMPLATE = app
QT += qml quick sql
CONFIG += c++11
-!qtConfig(sql-sqlite): QTPLUGIN += qsqlite
-
HEADERS += sqlcontactmodel.h \
sqlconversationmodel.h
diff --git a/examples/quickcontrols2/chattutorial/chapter5-styling/chapter5-styling.pro b/examples/quickcontrols2/chattutorial/chapter5-styling/chapter5-styling.pro
index 007d23b3..e798fe3c 100644
--- a/examples/quickcontrols2/chattutorial/chapter5-styling/chapter5-styling.pro
+++ b/examples/quickcontrols2/chattutorial/chapter5-styling/chapter5-styling.pro
@@ -3,8 +3,6 @@ TEMPLATE = app
QT += qml quick sql
CONFIG += c++11
-!qtConfig(sql-sqlite): QTPLUGIN += qsqlite
-
HEADERS += sqlcontactmodel.h \
sqlconversationmodel.h
diff --git a/src/imports/controls/material/qquickmaterialripple.cpp b/src/imports/controls/material/qquickmaterialripple.cpp
index ac2fbc06..615d131b 100644
--- a/src/imports/controls/material/qquickmaterialripple.cpp
+++ b/src/imports/controls/material/qquickmaterialripple.cpp
@@ -207,7 +207,7 @@ void QQuickMaterialRippleBackgroundNode::sync(QQuickItem *item)
QMatrix4x4 matrix;
if (qFuzzyIsNull(ripple->clipRadius())) {
- matrix.translate((w - sz) / 2, (h - sz) / 2);
+ matrix.translate(qRound((w - sz) / 2), qRound((h - sz) / 2));
rectNode->setRect(QRectF(0, 0, sz, sz));
rectNode->setRadius(sz / 2);
} else {
diff --git a/src/quickcontrols2/configure.json b/src/quickcontrols2/configure.json
index 121f3f49..6cf0dc5f 100644
--- a/src/quickcontrols2/configure.json
+++ b/src/quickcontrols2/configure.json
@@ -22,13 +22,15 @@
},
"quickcontrols2-material": {
"label": "Material",
- "purpose": "Provides a Qt Quick Controls 2 style based on the Material Design guidelines",
+ "purpose": "Provides a style based on the Material Design guidelines.",
+ "section": "Quick Controls 2",
"condition": "features.quickcontrols2-default",
"output": [ "privateFeature" ]
},
"quickcontrols2-universal": {
"label": "Universal",
- "purpose": "Provides a Qt Quick Controls 2 style based on the Universal Design guidelines",
+ "purpose": "Provides a style based on the Universal Design guidelines.",
+ "section": "Quick Controls 2",
"condition": "features.quickcontrols2-default",
"output": [ "privateFeature" ]
}
diff --git a/src/quicktemplates2/configure.json b/src/quicktemplates2/configure.json
index 9bd5e311..45899e1f 100644
--- a/src/quicktemplates2/configure.json
+++ b/src/quicktemplates2/configure.json
@@ -4,7 +4,8 @@
"features": {
"quicktemplates2-hover": {
"label": "Hover support",
- "purpose": "Provides support for hover effects in Qt Quick Templates 2",
+ "purpose": "Provides support for hover effects.",
+ "section": "Quick Templates 2",
"output": [ "privateFeature" ]
}
},
diff --git a/src/quicktemplates2/qquickabstractbutton.cpp b/src/quicktemplates2/qquickabstractbutton.cpp
index 350a196e..2542c2c4 100644
--- a/src/quicktemplates2/qquickabstractbutton.cpp
+++ b/src/quicktemplates2/qquickabstractbutton.cpp
@@ -145,7 +145,7 @@ static const int AUTO_REPEAT_INTERVAL = 100;
*/
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlsignal QtQuick.Controls::AbstractButton::toggled()
This signal is emitted when a checkable button is interactively toggled by the user.
diff --git a/src/quicktemplates2/qquickbuttongroup.cpp b/src/quicktemplates2/qquickbuttongroup.cpp
index 705224d6..2d4b898f 100644
--- a/src/quicktemplates2/qquickbuttongroup.cpp
+++ b/src/quicktemplates2/qquickbuttongroup.cpp
@@ -125,7 +125,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlsignal QtQuick.Controls::ButtonGroup::clicked(AbstractButton button)
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
This signal is emitted when a \a button in the group has been clicked.
diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp
index f511045a..7ba68f81 100644
--- a/src/quicktemplates2/qquickcombobox.cpp
+++ b/src/quicktemplates2/qquickcombobox.cpp
@@ -161,7 +161,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlsignal void QtQuick.Controls::ComboBox::accepted()
This signal is emitted when the \uicontrol Return or \uicontrol Enter key is pressed
@@ -781,7 +781,7 @@ QQmlInstanceModel *QQuickComboBox::delegateModel() const
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty bool QtQuick.Controls::ComboBox::editable
This property holds whether the combo box is editable.
@@ -830,7 +830,7 @@ void QQuickComboBox::setEditable(bool editable)
}
/*!
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\qmlproperty bool QtQuick.Controls::ComboBox::flat
This property holds whether the combo box button is flat.
@@ -860,7 +860,7 @@ void QQuickComboBox::setFlat(bool flat)
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty bool QtQuick.Controls::ComboBox::down
This property holds whether the combo box button is visually down.
@@ -1028,7 +1028,7 @@ void QQuickComboBox::resetDisplayText()
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty string QtQuick.Controls::ComboBox::editText
This property holds the text in the text field of an editable combo box.
@@ -1197,7 +1197,7 @@ void QQuickComboBox::setPopup(QQuickPopup *popup)
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty Validator QtQuick.Controls::ComboBox::validator
This property holds an input text validator for an editable combo box.
@@ -1246,7 +1246,7 @@ void QQuickComboBox::setValidator(QValidator *validator)
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty flags QtQuick.Controls::ComboBox::inputMethodHints
Provides hints to the input method about the expected content of the combo box and how it
@@ -1273,7 +1273,7 @@ void QQuickComboBox::setInputMethodHints(Qt::InputMethodHints hints)
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty bool QtQuick.Controls::ComboBox::inputMethodComposing
\readonly
@@ -1290,7 +1290,7 @@ bool QQuickComboBox::isInputMethodComposing() const
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty bool QtQuick.Controls::ComboBox::acceptableInput
\readonly
@@ -1385,7 +1385,7 @@ void QQuickComboBox::decrementCurrentIndex()
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlmethod void QtQuick.Controls::ComboBox::selectAll()
Selects all the text in the editable text field of the combo box.
diff --git a/src/quicktemplates2/qquickcontainer.cpp b/src/quicktemplates2/qquickcontainer.cpp
index 54e03c81..42423ff3 100644
--- a/src/quicktemplates2/qquickcontainer.cpp
+++ b/src/quicktemplates2/qquickcontainer.cpp
@@ -648,7 +648,7 @@ void QQuickContainer::setCurrentIndex(int index)
/*!
\qmlmethod void QtQuick.Controls::Container::incrementCurrentIndex()
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
Increments the current index of the container.
@@ -666,7 +666,7 @@ void QQuickContainer::incrementCurrentIndex()
/*!
\qmlmethod void QtQuick.Controls::Container::decrementCurrentIndex()
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
Decrements the current index of the container.
diff --git a/src/quicktemplates2/qquickdial.cpp b/src/quicktemplates2/qquickdial.cpp
index 98ca8186..7e740ade 100644
--- a/src/quicktemplates2/qquickdial.cpp
+++ b/src/quicktemplates2/qquickdial.cpp
@@ -78,7 +78,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlsignal QtQuick.Controls::Dial::moved()
This signal is emitted when the dial has been interactively moved
@@ -514,7 +514,7 @@ void QQuickDial::setPressed(bool pressed)
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty bool QtQuick.Controls::Dial::live
This property holds whether the dial provides live updates for the \l value
diff --git a/src/quicktemplates2/qquickdrawer.cpp b/src/quicktemplates2/qquickdrawer.cpp
index 94b8aea7..030fc98e 100644
--- a/src/quicktemplates2/qquickdrawer.cpp
+++ b/src/quicktemplates2/qquickdrawer.cpp
@@ -638,7 +638,7 @@ void QQuickDrawer::resetDragMargin()
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty bool QtQuick.Controls::Drawer::interactive
This property holds whether the drawer is interactive. A non-interactive
diff --git a/src/quicktemplates2/qquickpage.cpp b/src/quicktemplates2/qquickpage.cpp
index 6b0b3a38..6137a7e8 100644
--- a/src/quicktemplates2/qquickpage.cpp
+++ b/src/quicktemplates2/qquickpage.cpp
@@ -234,7 +234,7 @@ void QQuickPage::setFooter(QQuickItem *footer)
/*!
\qmlproperty real QtQuick.Controls::Page::contentWidth
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
This property holds the content width. It is used for calculating the total
implicit width of the page.
@@ -259,7 +259,7 @@ void QQuickPage::setContentWidth(qreal width)
/*!
\qmlproperty real QtQuick.Controls::Page::contentHeight
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
This property holds the content height. It is used for calculating the total
implicit height of the page.
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index 23d3ad2c..735038b4 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -953,7 +953,7 @@ qreal QQuickPopup::availableHeight() const
}
/*!
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\qmlproperty real QtQuick.Controls::Popup::spacing
This property holds the spacing.
diff --git a/src/quicktemplates2/qquickrangeslider.cpp b/src/quicktemplates2/qquickrangeslider.cpp
index f1e8a01e..96f6a5a3 100644
--- a/src/quicktemplates2/qquickrangeslider.cpp
+++ b/src/quicktemplates2/qquickrangeslider.cpp
@@ -829,7 +829,7 @@ bool QQuickRangeSlider::isVertical() const
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty bool QtQuick.Controls::RangeSlider::live
This property holds whether the slider provides live updates for the \l first.value
diff --git a/src/quicktemplates2/qquickscrollbar.cpp b/src/quicktemplates2/qquickscrollbar.cpp
index 128bca6f..0c96cb64 100644
--- a/src/quicktemplates2/qquickscrollbar.cpp
+++ b/src/quicktemplates2/qquickscrollbar.cpp
@@ -460,7 +460,7 @@ void QQuickScrollBar::setOrientation(Qt::Orientation orientation)
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty enumeration QtQuick.Controls::ScrollBar::snapMode
This property holds the snap mode.
@@ -500,7 +500,7 @@ void QQuickScrollBar::setSnapMode(SnapMode mode)
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty bool QtQuick.Controls::ScrollBar::interactive
This property holds whether the scroll bar is interactive. The default value is \c true.
@@ -530,7 +530,7 @@ void QQuickScrollBar::resetInteractive()
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty enumeration QtQuick.Controls::ScrollBar::policy
This property holds the policy of the scroll bar. The default policy is \c ScrollBar.AsNeeded.
diff --git a/src/quicktemplates2/qquickslider.cpp b/src/quicktemplates2/qquickslider.cpp
index 2e337c3a..671a9ef7 100644
--- a/src/quicktemplates2/qquickslider.cpp
+++ b/src/quicktemplates2/qquickslider.cpp
@@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlsignal QtQuick.Controls::Slider::moved()
This signal is emitted when the slider has been interactively moved
@@ -430,7 +430,7 @@ void QQuickSlider::setSnapMode(SnapMode mode)
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty bool QtQuick.Controls::Slider::live
This property holds whether the slider provides live updates for the \l value
@@ -562,7 +562,7 @@ void QQuickSlider::setHandle(QQuickItem *handle)
}
/*!
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\qmlmethod real QtQuick.Controls::Slider::valueAt(real position)
Returns the value for the given \a position.
diff --git a/src/quicktemplates2/qquickspinbox.cpp b/src/quicktemplates2/qquickspinbox.cpp
index d6ad106a..fb77ddee 100644
--- a/src/quicktemplates2/qquickspinbox.cpp
+++ b/src/quicktemplates2/qquickspinbox.cpp
@@ -94,7 +94,7 @@ static const int AUTO_REPEAT_INTERVAL = 100;
*/
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlsignal QtQuick.Controls::SpinBox::valueModified()
This signal is emitted when the spin box value has been interactively
@@ -670,7 +670,7 @@ QQuickSpinButton *QQuickSpinBox::down() const
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty flags QtQuick.Controls::SpinBox::inputMethodHints
This property provides hints to the input method about the expected content
@@ -697,7 +697,7 @@ void QQuickSpinBox::setInputMethodHints(Qt::InputMethodHints hints)
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty bool QtQuick.Controls::SpinBox::inputMethodComposing
\readonly
diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp
index 3767d143..856e2b7e 100644
--- a/src/quicktemplates2/qquickstackview.cpp
+++ b/src/quicktemplates2/qquickstackview.cpp
@@ -1163,7 +1163,7 @@ QQuickStackView::Status QQuickStackViewAttached::status() const
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlattachedproperty bool QtQuick.Controls::StackView::visible
This attached property holds the visibility of the item it's attached to.
@@ -1212,7 +1212,7 @@ void QQuickStackViewAttached::resetVisible()
/*!
\qmlattachedsignal QtQuick.Controls::StackView::activated()
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
This attached signal is emitted when the item it's attached to is activated in the stack.
@@ -1221,7 +1221,7 @@ void QQuickStackViewAttached::resetVisible()
/*!
\qmlattachedsignal QtQuick.Controls::StackView::deactivated()
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
This attached signal is emitted when the item it's attached to is deactivated in the stack.
@@ -1230,7 +1230,7 @@ void QQuickStackViewAttached::resetVisible()
/*!
\qmlattachedsignal QtQuick.Controls::StackView::activating()
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
This attached signal is emitted when the item it's attached to is in the process of being
activated in the stack.
@@ -1240,7 +1240,7 @@ void QQuickStackViewAttached::resetVisible()
/*!
\qmlattachedsignal QtQuick.Controls::StackView::deactivating()
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
This attached signal is emitted when the item it's attached to is in the process of being
dectivated in the stack.
@@ -1250,7 +1250,7 @@ void QQuickStackViewAttached::resetVisible()
/*!
\qmlattachedsignal QtQuick.Controls::StackView::removed()
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
This attached signal is emitted when the item it's attached to has been
removed from the stack. It can be used to safely destroy an Item that was
diff --git a/src/quicktemplates2/qquickswipedelegate.cpp b/src/quicktemplates2/qquickswipedelegate.cpp
index b17236bc..8e0cf3fe 100644
--- a/src/quicktemplates2/qquickswipedelegate.cpp
+++ b/src/quicktemplates2/qquickswipedelegate.cpp
@@ -959,7 +959,7 @@ QQuickSwipeDelegate::QQuickSwipeDelegate(QQuickItem *parent)
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlmethod void QtQuick.Controls::SwipeDelegate::swipe.open(enumeration side)
This method sets the \c position of the swipe so that it opens
@@ -980,7 +980,7 @@ QQuickSwipeDelegate::QQuickSwipeDelegate(QQuickItem *parent)
*/
/*!
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\qmlmethod void QtQuick.Controls::SwipeDelegate::swipe.close()
This method sets the \c position of the swipe to \c 0. Any animations
@@ -991,7 +991,7 @@ QQuickSwipeDelegate::QQuickSwipeDelegate(QQuickItem *parent)
*/
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlsignal void QtQuick.Controls::SwipeDelegate::swipe.opened()
This signal is emitted when the delegate has been swiped open
@@ -1005,7 +1005,7 @@ QQuickSwipeDelegate::QQuickSwipeDelegate(QQuickItem *parent)
*/
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlsignal void QtQuick.Controls::SwipeDelegate::swipe.closed()
This signal is emitted when the delegate has been swiped to closed
@@ -1019,7 +1019,7 @@ QQuickSwipeDelegate::QQuickSwipeDelegate(QQuickItem *parent)
*/
/*!
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\qmlsignal void QtQuick.Controls::SwipeDelegate::swipe.completed()
This signal is emitted when \c swipe.complete becomes \c true.
@@ -1252,7 +1252,7 @@ public:
};
/*!
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\qmlattachedsignal QtQuick.Controls::SwipeDelegate::clicked()
This signal can be attached to a non-interactive item declared in
@@ -1287,7 +1287,7 @@ QQuickSwipeDelegateAttached::QQuickSwipeDelegateAttached(QObject *object)
}
/*!
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\qmlattachedproperty bool QtQuick.Controls::SwipeDelegate::pressed
\readonly
diff --git a/src/quicktemplates2/qquickswipeview.cpp b/src/quicktemplates2/qquickswipeview.cpp
index 8770294b..6e4ed545 100644
--- a/src/quicktemplates2/qquickswipeview.cpp
+++ b/src/quicktemplates2/qquickswipeview.cpp
@@ -183,7 +183,7 @@ QQuickSwipeView::QQuickSwipeView(QQuickItem *parent)
}
/*!
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\qmlproperty bool QtQuick.Controls::SwipeView::interactive
This property describes whether the user can interact with the SwipeView.
@@ -208,7 +208,7 @@ void QQuickSwipeView::setInteractive(bool interactive)
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty enumeration QtQuick.Controls::SwipeView::orientation
This property holds the orientation.
@@ -331,7 +331,7 @@ QAccessible::Role QQuickSwipeView::accessibleRole() const
/*!
\qmlattachedproperty bool QtQuick.Controls::SwipeView::isNextItem
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\readonly
This attached property is \c true if this child is the next item.
@@ -341,7 +341,7 @@ QAccessible::Role QQuickSwipeView::accessibleRole() const
/*!
\qmlattachedproperty bool QtQuick.Controls::SwipeView::isPreviousItem
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\readonly
This attached property is \c true if this child is the previous item.
diff --git a/src/quicktemplates2/qquicktabbar.cpp b/src/quicktemplates2/qquicktabbar.cpp
index f6c65d2d..e7cec7ff 100644
--- a/src/quicktemplates2/qquicktabbar.cpp
+++ b/src/quicktemplates2/qquicktabbar.cpp
@@ -293,7 +293,7 @@ void QQuickTabBar::setPosition(Position position)
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty real QtQuick.Controls::TabBar::contentWidth
This property holds the content width. It is used for calculating the total
@@ -334,7 +334,7 @@ void QQuickTabBar::resetContentWidth()
}
/*!
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
\qmlproperty real QtQuick.Controls::TabBar::contentHeight
This property holds the content height. It is used for calculating the total
diff --git a/src/quicktemplates2/qquicktextarea.cpp b/src/quicktemplates2/qquicktextarea.cpp
index 0df65cac..5bcb78af 100644
--- a/src/quicktemplates2/qquicktextarea.cpp
+++ b/src/quicktemplates2/qquicktextarea.cpp
@@ -110,7 +110,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlsignal QtQuick.Controls::TextArea::pressed(MouseEvent event)
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
This signal is emitted when the text area is pressed by the user.
The \l {MouseEvent}{event} parameter provides information about the press,
@@ -121,7 +121,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlsignal QtQuick.Controls::TextArea::released(MouseEvent event)
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
This signal is emitted when the text area is released by the user.
The \l {MouseEvent}{event} parameter provides information about the release,
@@ -560,7 +560,7 @@ void QQuickTextArea::setFocusReason(Qt::FocusReason reason)
}
/*!
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\qmlproperty bool QtQuick.Controls::TextArea::hovered
\readonly
@@ -593,7 +593,7 @@ void QQuickTextArea::setHovered(bool hovered)
}
/*!
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\qmlproperty bool QtQuick.Controls::TextArea::hoverEnabled
This property determines whether the text area accepts hover events. The default value is \c true.
diff --git a/src/quicktemplates2/qquicktextfield.cpp b/src/quicktemplates2/qquicktextfield.cpp
index 7322522b..20fe498b 100644
--- a/src/quicktemplates2/qquicktextfield.cpp
+++ b/src/quicktemplates2/qquicktextfield.cpp
@@ -91,7 +91,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlsignal QtQuick.Controls::TextField::pressed(MouseEvent event)
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
This signal is emitted when the text field is pressed by the user.
The \l {MouseEvent}{event} parameter provides information about the press,
@@ -102,7 +102,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlsignal QtQuick.Controls::TextField::released(MouseEvent event)
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
This signal is emitted when the text field is released by the user.
The \l {MouseEvent}{event} parameter provides information about the release,
@@ -429,7 +429,7 @@ void QQuickTextField::setFocusReason(Qt::FocusReason reason)
}
/*!
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\qmlproperty bool QtQuick.Controls::TextField::hovered
\readonly
@@ -462,7 +462,7 @@ void QQuickTextField::setHovered(bool hovered)
}
/*!
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
\qmlproperty bool QtQuick.Controls::TextField::hoverEnabled
This property determines whether the text field accepts hover events. The default value is \c false.
diff --git a/src/quicktemplates2/qquicktumbler.cpp b/src/quicktemplates2/qquicktumbler.cpp
index 05e4612d..5cdd140d 100644
--- a/src/quicktemplates2/qquicktumbler.cpp
+++ b/src/quicktemplates2/qquicktumbler.cpp
@@ -409,7 +409,7 @@ void QQuickTumbler::setVisibleItemCount(int visibleItemCount)
/*!
\qmlproperty bool QtQuick.Controls::Tumbler::wrap
- \since QtQuick.Controls 2.1
+ \since QtQuick.Controls 2.1 (Qt 5.8)
This property determines whether or not the tumbler wraps around when it
reaches the top or bottom.
@@ -441,7 +441,7 @@ void QQuickTumbler::resetWrap()
/*!
\qmlproperty bool QtQuick.Controls::Tumbler::moving
- \since QtQuick.Controls 2.2
+ \since QtQuick.Controls 2.2 (Qt 5.9)
This property describes whether the tumbler is currently moving, due to
the user either dragging or flicking it.
diff --git a/tests/auto/controls/data/tst_tooltip.qml b/tests/auto/controls/data/tst_tooltip.qml
index 4f1831ce..66fb50c1 100644
--- a/tests/auto/controls/data/tst_tooltip.qml
+++ b/tests/auto/controls/data/tst_tooltip.qml
@@ -121,6 +121,11 @@ TestCase {
var item2 = createTemporaryObject(mouseArea, testCase)
verify(item2)
+ // Reset the properties to the expected default values, in case
+ // we're not the first test that uses attached properties to be run.
+ var sharedTip = ToolTip.toolTip
+ sharedTip[data.property] = data.defaultValue
+
compare(item1.ToolTip[data.property], data.defaultValue)
compare(item2.ToolTip[data.property], data.defaultValue)
@@ -130,7 +135,6 @@ TestCase {
var spy2 = signalSpy.createObject(item2, {target: item2.ToolTip, signalName: data.signalName})
verify(spy2.valid)
- var sharedTip = ToolTip.toolTip
sharedSpy.signalName = data.signalName
verify(sharedSpy.valid)
sharedSpy.clear()
diff --git a/tests/auto/popup/data/closeOnEscapeWithNestedPopups.qml b/tests/auto/popup/data/closeOnEscapeWithNestedPopups.qml
new file mode 100644
index 00000000..53dae0f9
--- /dev/null
+++ b/tests/auto/popup/data/closeOnEscapeWithNestedPopups.qml
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.9
+import QtQuick.Controls 2.2
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ header: ToolBar {
+ ToolButton {
+ objectName: "optionsToolButton"
+ text: "Options"
+ onClicked: optionsMenu.open()
+
+ Menu {
+ id: optionsMenu
+ objectName: "optionsMenu"
+ x: parent.width - width
+ transformOrigin: Menu.TopRight
+
+ MenuItem {
+ objectName: "settingsMenuItem"
+ text: "Settings"
+ onTriggered: settingsDialog.open()
+ }
+ }
+ }
+ }
+
+ Shortcut {
+ sequence: "Esc"
+ enabled: stackView.depth > 1
+ onActivated: stackView.pop()
+ }
+
+ Component {
+ id: itemComponent
+
+ Item {}
+ }
+
+ StackView {
+ id: stackView
+ objectName: "stackView"
+ anchors.fill: parent
+ initialItem: Item {
+ objectName: "initialStackViewItem"
+ }
+
+ Component.onCompleted: push(itemComponent)
+ }
+
+ Dialog {
+ id: settingsDialog
+ objectName: "settingsDialog"
+ modal: true
+
+ contentItem: ComboBox {
+ objectName: "comboBox"
+ model: 10
+ }
+ }
+}
diff --git a/tests/auto/popup/tst_popup.cpp b/tests/auto/popup/tst_popup.cpp
index 9001c3ee..1b4f0aca 100644
--- a/tests/auto/popup/tst_popup.cpp
+++ b/tests/auto/popup/tst_popup.cpp
@@ -41,10 +41,12 @@
#include <QtGui/qpa/qwindowsysteminterface.h>
#include <QtQuickTemplates2/private/qquickapplicationwindow_p.h>
+#include <QtQuickTemplates2/private/qquickcombobox_p.h>
#include <QtQuickTemplates2/private/qquickoverlay_p.h>
#include <QtQuickTemplates2/private/qquickpopup_p.h>
#include <QtQuickTemplates2/private/qquickbutton_p.h>
#include <QtQuickTemplates2/private/qquickslider_p.h>
+#include <QtQuickTemplates2/private/qquickstackview_p.h>
using namespace QQuickVisualTestUtil;
@@ -76,6 +78,7 @@ private slots:
void grabber();
void cursorShape();
void componentComplete();
+ void closeOnEscapeWithNestedPopups();
};
void tst_popup::initTestCase()
@@ -838,6 +841,71 @@ void tst_popup::componentComplete()
QVERIFY(qmlPopup->isComponentComplete());
}
+void tst_popup::closeOnEscapeWithNestedPopups()
+{
+ // Tests the scenario in the Gallery example, where there are nested popups that should
+ // close in the correct order when the Escape key is pressed.
+ QQuickApplicationHelper helper(this, QStringLiteral("closeOnEscapeWithNestedPopups.qml"));
+ QQuickApplicationWindow *window = helper.appWindow;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ // The stack view should have two items, and it should pop the second when escape is pressed
+ // and it has focus.
+ QQuickStackView *stackView = window->findChild<QQuickStackView*>("stackView");
+ QVERIFY(stackView);
+ QCOMPARE(stackView->depth(), 2);
+
+ QQuickItem *optionsToolButton = window->findChild<QQuickItem*>("optionsToolButton");
+ QVERIFY(optionsToolButton);
+
+ // Click on the options tool button. The settings menu should pop up.
+ const QPoint optionsToolButtonCenter = optionsToolButton->mapToScene(
+ QPointF(optionsToolButton->width() / 2, optionsToolButton->height() / 2)).toPoint();
+ QTest::mouseClick(window, Qt::LeftButton, Qt::NoModifier, optionsToolButtonCenter);
+
+ QQuickPopup *optionsMenu = window->findChild<QQuickPopup*>("optionsMenu");
+ QVERIFY(optionsMenu);
+ QTRY_VERIFY(optionsMenu->isVisible());
+
+ QQuickItem *settingsMenuItem = window->findChild<QQuickItem*>("settingsMenuItem");
+ QVERIFY(settingsMenuItem);
+
+ // Click on the settings menu item. The settings dialog should pop up.
+ const QPoint settingsMenuItemCenter = settingsMenuItem->mapToScene(
+ QPointF(settingsMenuItem->width() / 2, settingsMenuItem->height() / 2)).toPoint();
+ QTest::mouseClick(window, Qt::LeftButton, Qt::NoModifier, settingsMenuItemCenter);
+
+ QQuickPopup *settingsDialog = window->contentItem()->findChild<QQuickPopup*>("settingsDialog");
+ QVERIFY(settingsDialog);
+ QTRY_VERIFY(settingsDialog->isVisible());
+
+ QQuickComboBox *comboBox = window->contentItem()->findChild<QQuickComboBox*>("comboBox");
+ QVERIFY(comboBox);
+
+ // Click on the combo box button. The combo box popup should pop up.
+ const QPoint comboBoxCenter = comboBox->mapToScene(
+ QPointF(comboBox->width() / 2, comboBox->height() / 2)).toPoint();
+ QTest::mouseClick(window, Qt::LeftButton, Qt::NoModifier, comboBoxCenter);
+ QTRY_VERIFY(comboBox->popup()->isVisible());
+
+ // Close the combo box popup with the escape key. The settings dialog should still be visible.
+ QTest::keyClick(window, Qt::Key_Escape);
+ QTRY_VERIFY(!comboBox->popup()->isVisible());
+ QVERIFY(settingsDialog->isVisible());
+
+ // Close the settings dialog with the escape key.
+ QTest::keyClick(window, Qt::Key_Escape);
+ QTRY_VERIFY(!settingsDialog->isVisible());
+
+ // The stack view should still have two items.
+ QCOMPARE(stackView->depth(), 2);
+
+ // Remove one by pressing the Escape key (the Shortcut should be activated).
+ QTest::keyClick(window, Qt::Key_Escape);
+ QCOMPARE(stackView->depth(), 1);
+}
+
QTEST_MAIN(tst_popup)
#include "tst_popup.moc"