diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-01-12 13:21:56 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-01-15 10:31:22 +0000 |
commit | fa99c0caa212e02472c2facb1a104358f077aa08 (patch) | |
tree | e1f40101ee663965e5a196f7afd8cc14337d1b16 /tests | |
parent | 589d52b3b64a4b5221738a28df08be2eae4d12b2 (diff) |
MenuItem: use deferred execution for the arrow
Task-number: QTBUG-50992
Change-Id: Ifb41a8caf6b406249d6da4783c546816d9b51581
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
5 files changed, 22 insertions, 4 deletions
diff --git a/tests/auto/customization/data/styles/identified/MenuItem.qml b/tests/auto/customization/data/styles/identified/MenuItem.qml index cd4d53fb..40c293cd 100644 --- a/tests/auto/customization/data/styles/identified/MenuItem.qml +++ b/tests/auto/customization/data/styles/identified/MenuItem.qml @@ -49,12 +49,17 @@ ****************************************************************************/ import QtQuick 2.9 -import QtQuick.Templates 2.2 as T +import QtQuick.Templates 2.3 as T T.MenuItem { id: control objectName: "menuitem-identified" + arrow: Item { + id: arrow + objectName: "menuitem-arrow-identified" + } + indicator: Item { id: indicator objectName: "menuitem-indicator-identified" diff --git a/tests/auto/customization/data/styles/incomplete/MenuItem.qml b/tests/auto/customization/data/styles/incomplete/MenuItem.qml index 10c43105..708ec628 100644 --- a/tests/auto/customization/data/styles/incomplete/MenuItem.qml +++ b/tests/auto/customization/data/styles/incomplete/MenuItem.qml @@ -49,12 +49,16 @@ ****************************************************************************/ import QtQuick 2.9 -import QtQuick.Templates 2.2 as T +import QtQuick.Templates 2.3 as T T.MenuItem { id: control objectName: "menuitem-incomplete" + arrow: Item { + objectName: "menuitem-arrow-incomplete" + } + indicator: Item { objectName: "menuitem-indicator-incomplete" } diff --git a/tests/auto/customization/data/styles/override/MenuItem.qml b/tests/auto/customization/data/styles/override/MenuItem.qml index 6a96376e..2259e739 100644 --- a/tests/auto/customization/data/styles/override/MenuItem.qml +++ b/tests/auto/customization/data/styles/override/MenuItem.qml @@ -55,6 +55,10 @@ Simple.MenuItem { id: control objectName: "menuitem-override" + arrow: Item { + objectName: "menuitem-arrow-override" + } + indicator: Item { objectName: "menuitem-indicator-override" } diff --git a/tests/auto/customization/data/styles/simple/MenuItem.qml b/tests/auto/customization/data/styles/simple/MenuItem.qml index 3a72081a..cb915170 100644 --- a/tests/auto/customization/data/styles/simple/MenuItem.qml +++ b/tests/auto/customization/data/styles/simple/MenuItem.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick 2.9 -import QtQuick.Templates 2.2 as T +import QtQuick.Templates 2.3 as T T.MenuItem { id: control @@ -58,6 +58,11 @@ T.MenuItem { implicitWidth: Math.max(contentItem.implicitWidth + indicator.implicitWidth, background.implicitWidth) implicitHeight: Math.max(contentItem.implicitHeight, indicator.implicitHeight, background.implicitHeight) + arrow: Text { + objectName: "menuitem-arrow-simple" + text: control.mirrored ? "<" : ">" + } + indicator: Text { objectName: "menuitem-indicator-simple" text: control.checked ? "V" : "" diff --git a/tests/auto/customization/tst_customization.cpp b/tests/auto/customization/tst_customization.cpp index 3608a710..cd939bcc 100644 --- a/tests/auto/customization/tst_customization.cpp +++ b/tests/auto/customization/tst_customization.cpp @@ -74,7 +74,7 @@ static const ControlInfo ControlInfos[] = { { "Menu", QStringList() << "background" << "contentItem" }, { "MenuBar", QStringList() << "background" << "contentItem" }, { "MenuBarItem", QStringList() << "background" << "contentItem" }, - { "MenuItem", QStringList() << "background" << "contentItem" << "indicator" }, + { "MenuItem", QStringList() << "arrow" << "background" << "contentItem" << "indicator" }, { "MenuSeparator", QStringList() << "background" << "contentItem" }, { "Page", QStringList() << "background" << "contentItem" }, { "PageIndicator", QStringList() << "background" << "contentItem" }, |