summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qmenubar
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2016-12-05 14:38:12 -0800
committerJani Heikkinen <jani.heikkinen@qt.io>2016-12-08 05:09:14 +0000
commit093e1111ef68a8a83e42d5d82fc9d5c93d47071b (patch)
treebe0b0797b8b0235c0cfc59efd2da53eb88cb3eab /tests/auto/widgets/widgets/qmenubar
parentb2f78b796b5b73d4f0732975ffd66f8aa392c001 (diff)
QCocoaMenu: Don't rely on tags when we can get the actual NSMenuItem
-[NSMenu itemWithTag:] clearly states that it'll return the first item with that tag. Furthermore, when and item has been synced more than once, it could be that more than one such item exists in the same menu (e.g. lately changing the role of Edit->Copy). Change-Id: I95a4f0a151659ae273ba03a3cab4a720b781fc3a Task-number: QTBUG-57404 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'tests/auto/widgets/widgets/qmenubar')
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
index 2c20d03066..d863f70125 100644
--- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
@@ -1560,11 +1560,10 @@ void tst_QMenuBar::QTBUG_57404_existingMenuItemException()
QVERIFY(QTest::qWaitForWindowExposed(&mw2));
QTest::qWait(100);
- QTest::ignoreMessage(QtWarningMsg, "Menu item \"&Copy\" already in menu \"Edit\"");
mw2.close();
mw1.activateWindow();
QTest::qWait(100);
- // No crash, all fine.
+ // No crash, all fine. Ideally, there should be only one warning.
}
#endif // Q_OS_MACOS