aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/customization/tst_customization.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-12-19 12:53:44 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-12-20 13:36:18 +0000
commit4367be99cc89c733b8667a30c8a82dac21ba08bb (patch)
tree4085b1332ff2720d5e0f63a144aef0071e1cabbe /tests/auto/customization/tst_customization.cpp
parentaaedef9fec97329b7ca5568670de571f5b8e8df8 (diff)
Make tst_customization easier to maintain
Maintain the tested controls and delegates in a single array that can be re-used for testing all styles without repetitive and error-prone hand-written data rows. For this to work, the structure of the tested styles must match. The "incomplete" and "override" styles filled in all possible delegates, whereas the "simple" style filled in only the normally used delegates. The test styles have now been synced with the structure of our built- in styles. For example, Dials and Sliders don't normally have a content item, and CheckBoxes and RadioButtons don't normally have a background. Change-Id: I48a26ee170f66882c55b54a282f2e4b3a3875f9a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/customization/tst_customization.cpp')
-rw-r--r--tests/auto/customization/tst_customization.cpp265
1 files changed, 69 insertions, 196 deletions
diff --git a/tests/auto/customization/tst_customization.cpp b/tests/auto/customization/tst_customization.cpp
index 34c56785..10525e9e 100644
--- a/tests/auto/customization/tst_customization.cpp
+++ b/tests/auto/customization/tst_customization.cpp
@@ -46,6 +46,64 @@
using namespace QQuickVisualTestUtil;
+struct ControlInfo
+{
+ QString type;
+ QStringList delegates;
+};
+
+static const ControlInfo ControlInfos[] = {
+ { "AbstractButton", QStringList() << "background" << "contentItem" << "indicator" },
+ { "ApplicationWindow", QStringList() << "background" },
+ { "BusyIndicator", QStringList() << "background" << "contentItem" },
+ { "Button", QStringList() << "background" << "contentItem" },
+ { "CheckBox", QStringList() << "contentItem" << "indicator" },
+ { "CheckDelegate", QStringList() << "background" << "contentItem" << "indicator" },
+ { "ComboBox", QStringList() << "background" << "contentItem" << "indicator" }, // popup not created until needed
+ { "Container", QStringList() << "background" << "contentItem" },
+ { "Control", QStringList() << "background" << "contentItem" },
+ { "DelayButton", QStringList() << "background" << "contentItem" },
+ { "Dial", QStringList() << "background" << "handle" },
+ { "Dialog", QStringList() << "background" << "contentItem" },
+ { "DialogButtonBox", QStringList() << "background" << "contentItem" },
+ { "Drawer", QStringList() << "background" << "contentItem" },
+ { "Frame", QStringList() << "background" << "contentItem" },
+ { "GroupBox", QStringList() << "background" << "contentItem" << "label" },
+ { "ItemDelegate", QStringList() << "background" << "contentItem" },
+ { "Label", QStringList() << "background" },
+ { "Menu", QStringList() << "background" << "contentItem" },
+ { "MenuItem", QStringList() << "background" << "contentItem" << "indicator" },
+ { "MenuSeparator", QStringList() << "background" << "contentItem" },
+ { "Page", QStringList() << "background" << "contentItem" },
+ { "PageIndicator", QStringList() << "background" << "contentItem" },
+ { "Pane", QStringList() << "background" << "contentItem" },
+ { "Popup", QStringList() << "background" << "contentItem" },
+ { "ProgressBar", QStringList() << "background" << "contentItem" },
+ { "RadioButton", QStringList() << "contentItem" << "indicator" },
+ { "RadioDelegate", QStringList() << "background" << "contentItem" << "indicator" },
+ { "RangeSlider", QStringList() << "background" << "first.handle" << "second.handle" },
+ { "RoundButton", QStringList() << "background" << "contentItem" },
+ { "ScrollBar", QStringList() << "background" << "contentItem" },
+ { "ScrollIndicator", QStringList() << "background" << "contentItem" },
+ { "ScrollView", QStringList() << "background" },
+ { "Slider", QStringList() << "background" << "handle" },
+ { "SpinBox", QStringList() << "background" << "contentItem" << "up.indicator" << "down.indicator" },
+ { "StackView", QStringList() << "background" << "contentItem" },
+ { "SwipeDelegate", QStringList() << "background" << "contentItem" },
+ { "SwipeView", QStringList() << "background" << "contentItem" },
+ { "Switch", QStringList() << "contentItem" << "indicator" },
+ { "SwitchDelegate", QStringList() << "background" << "contentItem" << "indicator" },
+ { "TabBar", QStringList() << "background" << "contentItem" },
+ { "TabButton", QStringList() << "background" << "contentItem" },
+ { "TextField", QStringList() << "background" },
+ { "TextArea", QStringList() << "background" },
+ { "ToolBar", QStringList() << "background" << "contentItem" },
+ { "ToolButton", QStringList() << "background" << "contentItem" },
+ { "ToolSeparator", QStringList() << "background" << "contentItem" },
+ { "ToolTip", QStringList() << "background" << "contentItem" },
+ { "Tumbler", QStringList() << "background" << "contentItem" }
+};
+
class tst_customization : public QQmlDataTest
{
Q_OBJECT
@@ -140,208 +198,20 @@ void tst_customization::creation_data()
QTest::addColumn<QStringList>("delegates");
// the "empty" style does not contain any delegates
- QTest::newRow("empty:AbstractButton") << "empty" << "AbstractButton"<< QStringList();
- QTest::newRow("empty:ApplicationWindow") << "empty" << "ApplicationWindow"<< QStringList();
- QTest::newRow("empty:BusyIndicator") << "empty" << "BusyIndicator"<< QStringList();
- QTest::newRow("empty:Button") << "empty" << "Button"<< QStringList();
- QTest::newRow("empty:CheckBox") << "empty" << "CheckBox" << QStringList();
- QTest::newRow("empty:CheckDelegate") << "empty" << "CheckDelegate" << QStringList();
- QTest::newRow("empty:ComboBox") << "empty" << "ComboBox" << QStringList();
- QTest::newRow("empty:Container") << "empty" << "Container"<< QStringList();
- QTest::newRow("empty:Control") << "empty" << "Control"<< QStringList();
- QTest::newRow("empty:DelayButton") << "empty" << "DelayButton"<< QStringList();
- QTest::newRow("empty:Dial") << "empty" << "Dial" << QStringList();
- QTest::newRow("empty:Dialog") << "empty" << "Dialog" << QStringList();
- QTest::newRow("empty:DialogButtonBox") << "empty" << "DialogButtonBox" << QStringList();
- QTest::newRow("empty:Drawer") << "empty" << "Drawer" << QStringList();
- QTest::newRow("empty:Frame") << "empty" << "Frame"<< QStringList();
- QTest::newRow("empty:GroupBox") << "empty" << "GroupBox"<< QStringList();
- QTest::newRow("empty:ItemDelegate") << "empty" << "ItemDelegate" << QStringList();
- QTest::newRow("empty:Label") << "empty" << "Label"<< QStringList();
- QTest::newRow("empty:Menu") << "empty" << "Menu" << QStringList();
- QTest::newRow("empty:MenuItem") << "empty" << "MenuItem"<< QStringList();
- QTest::newRow("empty:MenuSeparator") << "empty" << "MenuSeparator"<< QStringList();
- QTest::newRow("empty:Page") << "empty" << "Page"<< QStringList();
- QTest::newRow("empty:PageIndicator") << "empty" << "PageIndicator"<< QStringList();
- QTest::newRow("empty:Pane") << "empty" << "Pane"<< QStringList();
- QTest::newRow("empty:Popup") << "empty" << "Popup" << QStringList();
- QTest::newRow("empty:ProgressBar") << "empty" << "ProgressBar"<< QStringList();
- QTest::newRow("empty:RadioButton") << "empty" << "RadioButton" << QStringList();
- QTest::newRow("empty:RadioDelegate") << "empty" << "RadioDelegate" << QStringList();
- QTest::newRow("empty:RangeSlider") << "empty" << "RangeSlider" << QStringList();
- QTest::newRow("empty:RoundButton") << "empty" << "RoundButton" << QStringList();
- QTest::newRow("empty:ScrollBar") << "empty" << "ScrollBar"<< QStringList();
- QTest::newRow("empty:ScrollIndicator") << "empty" << "ScrollIndicator"<< QStringList();
- QTest::newRow("empty:ScrollView") << "empty" << "ScrollView"<< QStringList();
- QTest::newRow("empty:Slider") << "empty" << "Slider" << QStringList();
- QTest::newRow("empty:SpinBox") << "empty" << "SpinBox" << QStringList();
- QTest::newRow("empty:StackView") << "empty" << "StackView" << QStringList();
- QTest::newRow("empty:SwipeDelegate") << "empty" << "SwipeDelegate" << QStringList();
- QTest::newRow("empty:SwipeView") << "empty" << "SwipeView" << QStringList();
- QTest::newRow("empty:Switch") << "empty" << "Switch" << QStringList();
- QTest::newRow("empty:SwitchDelegate") << "empty" << "SwitchDelegate" << QStringList();
- QTest::newRow("empty:TabBar") << "empty" << "TabBar"<< QStringList();
- QTest::newRow("empty:TabButton") << "empty" << "TabButton"<< QStringList();
- QTest::newRow("empty:TextField") << "empty" << "TextField"<< QStringList();
- QTest::newRow("empty:TextArea") << "empty" << "TextArea"<< QStringList();
- QTest::newRow("empty:ToolBar") << "empty" << "ToolBar"<< QStringList();
- QTest::newRow("empty:ToolButton") << "empty" << "ToolButton"<< QStringList();
- QTest::newRow("empty:ToolSeparator") << "empty" << "ToolSeparator"<< QStringList();
- QTest::newRow("empty:ToolTip") << "empty" << "ToolTip"<< QStringList();
- // QTest::newRow("empty:Tumbler") << "empty" << "Tumbler"<< QStringList(); // ### TODO: fix crash with contentItem-less Tumbler
+ for (const ControlInfo &control : ControlInfos)
+ QTest::newRow(qPrintable("empty:" + control.type)) << "empty" << control.type << QStringList();
// the "incomplete" style is missing bindings to the delegates (must be created regardless)
- QTest::newRow("incomplete:AbstractButton") << "incomplete" << "AbstractButton" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("incomplete:ApplicationWindow") << "incomplete" << "ApplicationWindow" << (QStringList() << "background");
- QTest::newRow("incomplete:BusyIndicator") << "incomplete" << "BusyIndicator" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:Button") << "incomplete" << "Button" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:CheckBox") << "incomplete" << "CheckBox" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("incomplete:CheckDelegate") << "incomplete" << "CheckDelegate" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("incomplete:ComboBox") << "incomplete" << "ComboBox" << (QStringList() << "background" << "contentItem" << "indicator"); // popup not created until needed
- QTest::newRow("incomplete:Container") << "incomplete" << "Container" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:Control") << "incomplete" << "Control" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:DelayButton") << "incomplete" << "DelayButton" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:Dial") << "incomplete" << "Dial" << (QStringList() << "background" << "contentItem" << "handle");
- QTest::newRow("incomplete:Dialog") << "incomplete" << "Dialog" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:DialogButtonBox") << "incomplete" << "DialogButtonBox" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:Drawer") << "incomplete" << "Drawer" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:Frame") << "incomplete" << "Frame"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:GroupBox") << "incomplete" << "GroupBox"<< (QStringList() << "background" << "contentItem" << "label");
- QTest::newRow("incomplete:ItemDelegate") << "incomplete" << "ItemDelegate" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:Label") << "incomplete" << "Label" << (QStringList() << "background");
- QTest::newRow("incomplete:Menu") << "incomplete" << "Menu" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:MenuItem") << "incomplete" << "MenuItem" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("incomplete:MenuSeparator") << "incomplete" << "MenuSeparator" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:Page") << "incomplete" << "Page" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:PageIndicator") << "incomplete" << "PageIndicator" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:Pane") << "incomplete" << "Pane" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:Popup") << "incomplete" << "Popup" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:ProgressBar") << "incomplete" << "ProgressBar" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:RadioButton") << "incomplete" << "RadioButton" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("incomplete:RadioDelegate") << "incomplete" << "RadioDelegate" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("incomplete:RangeSlider") << "incomplete" << "RangeSlider" << (QStringList() << "background" << "contentItem" << "first.handle" << "second.handle");
- QTest::newRow("incomplete:RoundButton") << "incomplete" << "RoundButton" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:ScrollBar") << "incomplete" << "ScrollBar" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:ScrollIndicator") << "incomplete" << "ScrollIndicator" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:ScrollView") << "incomplete" << "ScrollView" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:Slider") << "incomplete" << "Slider" << (QStringList() << "background" << "contentItem" << "handle");
- QTest::newRow("incomplete:SpinBox") << "incomplete" << "SpinBox" << (QStringList() << "background" << "contentItem" << "up.indicator" << "down.indicator");
- QTest::newRow("incomplete:StackView") << "incomplete" << "StackView" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:SwipeDelegate") << "incomplete" << "SwipeDelegate" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:SwipeView") << "incomplete" << "SwipeView" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:Switch") << "incomplete" << "Switch" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("incomplete:SwitchDelegate") << "incomplete" << "SwitchDelegate" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("incomplete:TabBar") << "incomplete" << "TabBar"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:TabButton") << "incomplete" << "TabButton"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:TextField") << "incomplete" << "TextField" << (QStringList() << "background");
- QTest::newRow("incomplete:TextArea") << "incomplete" << "TextArea" << (QStringList() << "background");
- QTest::newRow("incomplete:ToolBar") << "incomplete" << "ToolBar"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:ToolButton") << "incomplete" << "ToolButton"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:ToolSeparator") << "incomplete" << "ToolSeparator"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:ToolTip") << "incomplete" << "ToolTip" << (QStringList() << "background" << "contentItem");
- QTest::newRow("incomplete:Tumbler") << "incomplete" << "Tumbler"<< (QStringList() << "background" << "contentItem");
+ for (const ControlInfo &control : ControlInfos)
+ QTest::newRow(qPrintable("incomplete:" + control.type)) << "incomplete" << control.type << control.delegates;
// the "simple" style simulates a proper style and contains bindings to/in delegates
- QTest::newRow("simple:AbstractButton") << "simple" << "AbstractButton" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("simple:ApplicationWindow") << "simple" << "ApplicationWindow" << (QStringList() << "background");
- QTest::newRow("simple:BusyIndicator") << "simple" << "BusyIndicator" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:Button") << "simple" << "Button" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:CheckBox") << "simple" << "CheckBox" << (QStringList() << "contentItem" << "indicator");
- QTest::newRow("simple:CheckDelegate") << "simple" << "CheckDelegate" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("simple:ComboBox") << "simple" << "ComboBox" << (QStringList() << "background" << "contentItem" << "indicator"); // popup not created until needed
- QTest::newRow("simple:Container") << "simple" << "Container" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:Control") << "simple" << "Control" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:DelayButton") << "simple" << "DelayButton" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:Dial") << "simple" << "Dial" << (QStringList() << "background" << "handle");
- QTest::newRow("simple:Dialog") << "simple" << "Dialog" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:DialogButtonBox") << "simple" << "DialogButtonBox" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:Drawer") << "simple" << "Drawer" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:Frame") << "simple" << "Frame"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:GroupBox") << "simple" << "GroupBox"<< (QStringList() << "background" << "contentItem" << "label");
- QTest::newRow("simple:ItemDelegate") << "simple" << "ItemDelegate" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:Label") << "simple" << "Label" << (QStringList() << "background");
- QTest::newRow("simple:Menu") << "simple" << "Menu" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:MenuItem") << "simple" << "MenuItem" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("simple:MenuSeparator") << "simple" << "MenuSeparator" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:Page") << "simple" << "Page" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:PageIndicator") << "simple" << "PageIndicator" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:Pane") << "simple" << "Pane" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:Popup") << "simple" << "Popup" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:ProgressBar") << "simple" << "ProgressBar" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:RadioButton") << "simple" << "RadioButton" << (QStringList() << "contentItem" << "indicator");
- QTest::newRow("simple:RadioDelegate") << "simple" << "RadioDelegate" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("simple:RangeSlider") << "simple" << "RangeSlider" << (QStringList() << "background" << "first.handle" << "second.handle");
- QTest::newRow("simple:RoundButton") << "simple" << "RoundButton" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:ScrollBar") << "simple" << "ScrollBar" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:ScrollIndicator") << "simple" << "ScrollIndicator" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:ScrollView") << "simple" << "ScrollView" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:Slider") << "simple" << "Slider" << (QStringList() << "background" << "handle");
- QTest::newRow("simple:SpinBox") << "simple" << "SpinBox" << (QStringList() << "background" << "contentItem" << "up.indicator" << "down.indicator");
- QTest::newRow("simple:StackView") << "simple" << "StackView" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:SwipeDelegate") << "simple" << "SwipeDelegate" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:SwipeView") << "simple" << "SwipeView" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:Switch") << "simple" << "Switch" << (QStringList() << "contentItem" << "indicator");
- QTest::newRow("simple:SwitchDelegate") << "simple" << "SwitchDelegate" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("simple:TabBar") << "simple" << "TabBar"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:TabButton") << "simple" << "TabButton"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:TextField") << "simple" << "TextField" << (QStringList() << "background");
- QTest::newRow("simple:TextArea") << "simple" << "TextArea" << (QStringList() << "background");
- QTest::newRow("simple:ToolBar") << "simple" << "ToolBar"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:ToolButton") << "simple" << "ToolButton"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:ToolSeparator") << "simple" << "ToolSeparator"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:ToolTip") << "simple" << "ToolTip" << (QStringList() << "background" << "contentItem");
- QTest::newRow("simple:Tumbler") << "simple" << "Tumbler"<< (QStringList() << "background" << "contentItem");
+ for (const ControlInfo &control : ControlInfos)
+ QTest::newRow(qPrintable("simple:" + control.type)) << "simple" << control.type << control.delegates;
// the "override" style overrides all delegates in the "simple" style
- QTest::newRow("override:AbstractButton") << "override" << "AbstractButton" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("override:ApplicationWindow") << "override" << "ApplicationWindow" << (QStringList() << "background");
- QTest::newRow("override:BusyIndicator") << "override" << "BusyIndicator" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:Button") << "override" << "Button" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:CheckBox") << "override" << "CheckBox" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("override:CheckDelegate") << "override" << "CheckDelegate" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("override:ComboBox") << "override" << "ComboBox" << (QStringList() << "background" << "contentItem" << "indicator"); // popup not created until needed
- QTest::newRow("override:Container") << "override" << "Container" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:Control") << "override" << "Control" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:DelayButton") << "override" << "DelayButton" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:Dial") << "override" << "Dial" << (QStringList() << "background" << "contentItem" << "handle");
- QTest::newRow("override:Dialog") << "override" << "Dialog" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:DialogButtonBox") << "override" << "DialogButtonBox" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:Drawer") << "override" << "Drawer" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:Frame") << "override" << "Frame"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("override:GroupBox") << "override" << "GroupBox"<< (QStringList() << "background" << "contentItem" << "label");
- QTest::newRow("override:ItemDelegate") << "override" << "ItemDelegate" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:Label") << "override" << "Label" << (QStringList() << "background");
- QTest::newRow("override:Menu") << "override" << "Menu" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:MenuItem") << "override" << "MenuItem" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("override:MenuSeparator") << "override" << "MenuSeparator" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:Page") << "override" << "Page" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:PageIndicator") << "override" << "PageIndicator" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:Pane") << "override" << "Pane" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:Popup") << "override" << "Popup" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:ProgressBar") << "override" << "ProgressBar" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:RadioButton") << "override" << "RadioButton" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("override:RadioDelegate") << "override" << "RadioDelegate" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("override:RangeSlider") << "override" << "RangeSlider" << (QStringList() << "background" << "contentItem" << "first.handle" << "second.handle");
- QTest::newRow("override:RoundButton") << "override" << "RoundButton" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:ScrollBar") << "override" << "ScrollBar" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:ScrollIndicator") << "override" << "ScrollIndicator" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:ScrollView") << "override" << "ScrollView" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:Slider") << "override" << "Slider" << (QStringList() << "background" << "contentItem" << "handle");
- QTest::newRow("override:SpinBox") << "override" << "SpinBox" << (QStringList() << "background" << "contentItem" << "up.indicator" << "down.indicator");
- QTest::newRow("override:StackView") << "override" << "StackView" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:SwipeDelegate") << "override" << "SwipeDelegate" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:SwipeView") << "override" << "SwipeView" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:Switch") << "override" << "Switch" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("override:SwitchDelegate") << "override" << "SwitchDelegate" << (QStringList() << "background" << "contentItem" << "indicator");
- QTest::newRow("override:TabBar") << "override" << "TabBar"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("override:TabButton") << "override" << "TabButton"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("override:TextField") << "override" << "TextField" << (QStringList() << "background");
- QTest::newRow("override:TextArea") << "override" << "TextArea" << (QStringList() << "background");
- QTest::newRow("override:ToolBar") << "override" << "ToolBar"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("override:ToolButton") << "override" << "ToolButton"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("override:ToolSeparator") << "override" << "ToolSeparator"<< (QStringList() << "background" << "contentItem");
- QTest::newRow("override:ToolTip") << "override" << "ToolTip" << (QStringList() << "background" << "contentItem");
- QTest::newRow("override:Tumbler") << "override" << "Tumbler"<< (QStringList() << "background" << "contentItem");
+ for (const ControlInfo &control : ControlInfos)
+ QTest::newRow(qPrintable("override:" + control.type)) << "override" << control.type << control.delegates;
}
void tst_customization::creation()
@@ -350,6 +220,9 @@ void tst_customization::creation()
QFETCH(QString, type);
QFETCH(QStringList, delegates);
+ if (!qstrcmp(QTest::currentDataTag(), "empty:Tumbler"))
+ QSKIP("TODO: fix crash with contentItem-less Tumbler");
+
QQuickStyle::setStyle(testFile("styles/" + style));
QString error;