From a3dddf0471452448003cfe6c6802e3ccaf565b5d Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 7 Jan 2016 15:52:08 +0100 Subject: Fix style inheritance for popups Change-Id: I7bc36cb68e8d668fff2270e018de7eb1c71ccd20 Task-number: QTBUG-50347 Reviewed-by: Mitch Curtis --- tests/auto/universal/data/tst_universal.qml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'tests/auto/universal') diff --git a/tests/auto/universal/data/tst_universal.qml b/tests/auto/universal/data/tst_universal.qml index 5c29f33c..6e70f011 100644 --- a/tests/auto/universal/data/tst_universal.qml +++ b/tests/auto/universal/data/tst_universal.qml @@ -94,6 +94,19 @@ TestCase { } } + Component { + id: menu + Item { + Universal.accent: Universal.Red + property alias menu: popup + Menu { + id: popup + Universal.theme: Universal.Dark + MenuItem { } + } + } + } + function test_defaults() { var control = button.createObject(testCase) verify(control) @@ -223,6 +236,21 @@ TestCase { control.destroy() } + function test_menu() { + var container = menu.createObject(testCase) + verify(container) + verify(container.menu) + var child = container.menu.itemAt(0) + verify(child) + compare(container.Universal.theme, Universal.Light) + compare(container.menu.Universal.theme, Universal.Dark) + compare(child.Universal.theme, Universal.Dark) + compare(container.Universal.accent, "#e51400") // Red + compare(container.menu.Universal.accent, "#e51400") // Red + compare(child.Universal.accent, "#e51400") // Red + container.destroy() + } + function test_colors() { var control = button.createObject(testCase) verify(control) -- cgit v1.2.3