diff options
| author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-09-16 15:29:09 +0200 |
|---|---|---|
| committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-09-16 15:29:09 +0200 |
| commit | e9fffaa5e11c941e363114412b562d67c97ee145 (patch) | |
| tree | 5713e73ac6aa25cd95941ab98b697625fb035e97 | |
| parent | 13d66e8ae27761abfd0b81577c2aa2c7ab3e39c5 (diff) | |
| parent | 6a7a824b970d12471f9219c84a57eb91231c59fe (diff) | |
Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts:
.qmake.conf
src/controls/Styles/Base/ComboBoxStyle.qml
Change-Id: Iaf45bc77be0bd80d21af49a5663dc9fba3caa0da
| -rw-r--r-- | src/controls/Private/Style.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/BusyIndicatorStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/ButtonStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/CalendarStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/CheckBoxStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/ComboBoxStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/GroupBoxStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/ProgressBarStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/RadioButtonStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/ScrollViewStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/SliderStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/SpinBoxStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/TabViewStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/TableViewStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/TextAreaStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/Styles/Base/TextFieldStyle.qml | 2 | ||||
| -rw-r--r-- | src/controls/TableView.qml | 4 | ||||
| -rw-r--r-- | tests/auto/controls/data/tst_tableview.qml | 29 |
18 files changed, 48 insertions, 17 deletions
diff --git a/src/controls/Private/Style.qml b/src/controls/Private/Style.qml index 534975176..519ea9585 100644 --- a/src/controls/Private/Style.qml +++ b/src/controls/Private/Style.qml @@ -48,6 +48,6 @@ import QtQuick.Controls.Private 1.0 */ AbstractStyle { - /*! The control attached to this style */ + /*! The control this style is attached to. */ readonly property Item control: __control } diff --git a/src/controls/Styles/Base/BusyIndicatorStyle.qml b/src/controls/Styles/Base/BusyIndicatorStyle.qml index ce8550db0..7e6e75f8a 100644 --- a/src/controls/Styles/Base/BusyIndicatorStyle.qml +++ b/src/controls/Styles/Base/BusyIndicatorStyle.qml @@ -72,7 +72,7 @@ import QtQuick.Controls.Private 1.0 Style { id: indicatorstyle - /*! The \l BusyIndicator attached to this style. */ + /*! The \l BusyIndicator this style is attached to. */ readonly property BusyIndicator control: __control /*! This defines the appearance of the busy indicator. */ diff --git a/src/controls/Styles/Base/ButtonStyle.qml b/src/controls/Styles/Base/ButtonStyle.qml index 566f93e5e..426e7f612 100644 --- a/src/controls/Styles/Base/ButtonStyle.qml +++ b/src/controls/Styles/Base/ButtonStyle.qml @@ -76,7 +76,7 @@ import QtQuick.Controls.Private 1.0 Style { id: buttonstyle - /*! The \l {QtQuick.Controls::}{Button} attached to this style. */ + /*! The \l {QtQuick.Controls::}{Button} this style is attached to. */ readonly property Button control: __control /*! The padding between the background and the label components. */ diff --git a/src/controls/Styles/Base/CalendarStyle.qml b/src/controls/Styles/Base/CalendarStyle.qml index bb1c6970b..a25222fe7 100644 --- a/src/controls/Styles/Base/CalendarStyle.qml +++ b/src/controls/Styles/Base/CalendarStyle.qml @@ -125,7 +125,7 @@ Style { id: calendarStyle /*! - The Calendar attached to this style. + The Calendar this style is attached to. */ readonly property Calendar control: __control diff --git a/src/controls/Styles/Base/CheckBoxStyle.qml b/src/controls/Styles/Base/CheckBoxStyle.qml index c8592b76d..5702ca754 100644 --- a/src/controls/Styles/Base/CheckBoxStyle.qml +++ b/src/controls/Styles/Base/CheckBoxStyle.qml @@ -76,7 +76,7 @@ import QtQuick.Controls.Private 1.0 Style { id: checkboxStyle - /*! The \l CheckBox attached to this style. */ + /*! The \l CheckBox this style is attached to. */ readonly property CheckBox control: __control /*! This defines the text label. */ diff --git a/src/controls/Styles/Base/ComboBoxStyle.qml b/src/controls/Styles/Base/ComboBoxStyle.qml index f7236ba74..92154d0a3 100644 --- a/src/controls/Styles/Base/ComboBoxStyle.qml +++ b/src/controls/Styles/Base/ComboBoxStyle.qml @@ -94,7 +94,7 @@ Style { */ property color selectedTextColor: SystemPaletteSingleton.highlightedText(control.enabled) - /*! The \l ComboBox attached to this style. */ + /*! The \l ComboBox this style is attached to. */ readonly property ComboBox control: __control /*! The padding between the background and the label components. */ diff --git a/src/controls/Styles/Base/GroupBoxStyle.qml b/src/controls/Styles/Base/GroupBoxStyle.qml index 545ca07b7..2adc18d0f 100644 --- a/src/controls/Styles/Base/GroupBoxStyle.qml +++ b/src/controls/Styles/Base/GroupBoxStyle.qml @@ -50,7 +50,7 @@ import QtQuick.Controls.Private 1.0 */ Style { - /*! The \l GroupBox attached to this style. */ + /*! The \l GroupBox this style is attached to. */ readonly property GroupBox control: __control /*! The margin from the content item to the groupbox. */ diff --git a/src/controls/Styles/Base/ProgressBarStyle.qml b/src/controls/Styles/Base/ProgressBarStyle.qml index ec3798849..88f043040 100644 --- a/src/controls/Styles/Base/ProgressBarStyle.qml +++ b/src/controls/Styles/Base/ProgressBarStyle.qml @@ -111,7 +111,7 @@ import QtQuick.Controls.Private 1.0 Style { id: progressBarStyle - /*! The \l ProgressBar attached to this style. */ + /*! The \l ProgressBar this style is attached to. */ readonly property ProgressBar control: __control /*! A value in the range [0-1] indicating the current progress. */ diff --git a/src/controls/Styles/Base/RadioButtonStyle.qml b/src/controls/Styles/Base/RadioButtonStyle.qml index 86b7c816b..3fda616a6 100644 --- a/src/controls/Styles/Base/RadioButtonStyle.qml +++ b/src/controls/Styles/Base/RadioButtonStyle.qml @@ -75,7 +75,7 @@ import QtQuick.Controls.Private 1.0 Style { id: radiobuttonStyle - /*! The \l RadioButton attached to this style. */ + /*! The \l RadioButton this style is attached to. */ readonly property RadioButton control: __control /*! This defines the text label. */ diff --git a/src/controls/Styles/Base/ScrollViewStyle.qml b/src/controls/Styles/Base/ScrollViewStyle.qml index 20fc5a192..e8d10995e 100644 --- a/src/controls/Styles/Base/ScrollViewStyle.qml +++ b/src/controls/Styles/Base/ScrollViewStyle.qml @@ -51,7 +51,7 @@ import QtQuick.Controls.Private 1.0 Style { id: root - /*! The \l ScrollView attached to this style. */ + /*! The \l ScrollView this style is attached to. */ readonly property ScrollView control: __control /*! This property controls the frame border padding of the scrollView. */ diff --git a/src/controls/Styles/Base/SliderStyle.qml b/src/controls/Styles/Base/SliderStyle.qml index 1e2750fb7..a4c4f0eaa 100644 --- a/src/controls/Styles/Base/SliderStyle.qml +++ b/src/controls/Styles/Base/SliderStyle.qml @@ -82,7 +82,7 @@ import QtQuick.Controls.Private 1.0 Style { id: styleitem - /*! The \l Slider attached to this style. */ + /*! The \l Slider this style is attached to. */ readonly property Slider control: __control padding { top: 0 ; left: 0 ; right: 0 ; bottom: 0 } diff --git a/src/controls/Styles/Base/SpinBoxStyle.qml b/src/controls/Styles/Base/SpinBoxStyle.qml index e369cb7fd..03863173d 100644 --- a/src/controls/Styles/Base/SpinBoxStyle.qml +++ b/src/controls/Styles/Base/SpinBoxStyle.qml @@ -66,7 +66,7 @@ import QtQuick.Controls.Private 1.0 Style { id: spinboxStyle - /*! The \l SpinBox attached to this style. */ + /*! The \l SpinBox this style is attached to. */ readonly property SpinBox control: __control /*! The content margins of the text field. */ diff --git a/src/controls/Styles/Base/TabViewStyle.qml b/src/controls/Styles/Base/TabViewStyle.qml index 44c6ca72d..35491ad37 100644 --- a/src/controls/Styles/Base/TabViewStyle.qml +++ b/src/controls/Styles/Base/TabViewStyle.qml @@ -81,7 +81,7 @@ import QtQuick.Controls.Private 1.0 Style { - /*! The \l ScrollView attached to this style. */ + /*! The \l ScrollView this style is attached to. */ readonly property TabView control: __control /*! This property holds whether the user can move the tabs. diff --git a/src/controls/Styles/Base/TableViewStyle.qml b/src/controls/Styles/Base/TableViewStyle.qml index b59a38cac..602049c44 100644 --- a/src/controls/Styles/Base/TableViewStyle.qml +++ b/src/controls/Styles/Base/TableViewStyle.qml @@ -54,7 +54,7 @@ import QtQuick.Controls.Private 1.0 ScrollViewStyle { id: root - /*! The \l TableView attached to this style. */ + /*! The \l TableView this style is attached to. */ readonly property TableView control: __control /*! The text color. */ diff --git a/src/controls/Styles/Base/TextAreaStyle.qml b/src/controls/Styles/Base/TextAreaStyle.qml index 9f655bc46..a8dace6a5 100644 --- a/src/controls/Styles/Base/TextAreaStyle.qml +++ b/src/controls/Styles/Base/TextAreaStyle.qml @@ -64,7 +64,7 @@ import QtQuick.Controls.Private 1.0 ScrollViewStyle { id: style - /*! The \l TextArea attached to this style. */ + /*! The \l TextArea this style is attached to. */ readonly property TextArea control: __control /*! The current font. */ diff --git a/src/controls/Styles/Base/TextFieldStyle.qml b/src/controls/Styles/Base/TextFieldStyle.qml index 167e09c9d..ca6395140 100644 --- a/src/controls/Styles/Base/TextFieldStyle.qml +++ b/src/controls/Styles/Base/TextFieldStyle.qml @@ -68,7 +68,7 @@ import QtQuick.Controls.Private 1.0 Style { id: style - /*! The \l TextField attached to this style. */ + /*! The \l TextField this style is attached to. */ readonly property TextField control: __control /*! The content margins of the text field. */ diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml index aa02e1f81..41d0ca483 100644 --- a/src/controls/TableView.qml +++ b/src/controls/TableView.qml @@ -833,9 +833,11 @@ ScrollView { root.activated(currentRow); } - delegate: Item { + delegate: FocusScope { id: rowItemContainer + activeFocusOnTab: false + property Item rowItem // We recycle instantiated row items to speed up list scrolling diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml index 40eb58432..b802e7ff2 100644 --- a/tests/auto/controls/data/tst_tableview.qml +++ b/tests/auto/controls/data/tst_tableview.qml @@ -280,6 +280,7 @@ TestCase { table.selection.selectAll() compare(table.selection.__ranges.length, 1) verify(rangeTest([[0,49]], table)) + table.destroy() } function test_selectionCount() { @@ -300,6 +301,7 @@ TestCase { compare(table.selection.count, 100) table.model = 50 compare(table.selection.count, 0) + table.destroy() } function test_selectionForeach() { @@ -363,6 +365,7 @@ TestCase { table.selection.select(0) table.selection.forEach(addEven) compare(iteration, 50) + table.destroy() } function test_selectionContains() { @@ -383,6 +386,7 @@ TestCase { verify(!table.selection.contains(6)) verify(!table.selection.contains(7)) verify(table.selection.contains(8)) + table.destroy() } function test_initializedStyleData() { @@ -400,6 +404,7 @@ TestCase { waitForRendering(table) compare(table.items, [0, 1, 2]); compare(table.rows, [0, 1, 2]); + table.destroy() } @@ -882,6 +887,13 @@ TestCase { return undefined // no matching child found } + Component { + id: textFieldDelegate + TextField { + objectName: "delegate-" + styleData.row + "-" + styleData.column + } + } + function test_activeFocusOnTab() { if (!SystemInfo.tabAllWidgets) skip("This function doesn't support NOT iterating all.") @@ -933,6 +945,23 @@ TestCase { verify(control.control1.activeFocus) verify(!control.control2.activeFocus) verify(!control.control3.activeFocus) + + control.control2.itemDelegate = textFieldDelegate + + keyPress(Qt.Key_Tab) + verify(!control.control1.activeFocus) + verify(control.control2.activeFocus) + verify(!control.control3.activeFocus) + + for (var row = 0; row < 3; ++row) { + for (var col = 0; col < 2; ++col) { + keyPress(Qt.Key_Tab) + var delegate = findAChild(control.control2.__currentRowItem, "delegate-" + row + "-" + col) + verify(delegate) + verify(delegate.activeFocus) + } + } + control.destroy() } } |
