From 00b8ac87e4f6bb8b185799cf9e01427c9975005c Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 6 Aug 2009 12:01:43 +0200 Subject: QMenu: fix multi column autotest for styles which don't support it --- tests/auto/qmenu/tst_qmenu.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp index 6ba6466..8ff2b5c 100644 --- a/tests/auto/qmenu/tst_qmenu.cpp +++ b/tests/auto/qmenu/tst_qmenu.cpp @@ -692,6 +692,12 @@ void tst_QMenu::task250673_activeMultiColumnSubMenuPosition() }; QMenu sub; + + if (sub.style()->styleHint(QStyle::SH_Menu_Scrollable, 0, &sub)) { + //the style prevents the menus from getting columns + QSKIP("the style doesn't support multiple columns, it makes the menu scrollable", SkipSingle); + } + sub.addAction("Sub-Item1"); QAction *subAction = sub.addAction("Sub-Item2"); @@ -703,6 +709,7 @@ void tst_QMenu::task250673_activeMultiColumnSubMenuPosition() uint i = 2; while (main.columnCount() < 2) { main.addAction(QString("Item %1").arg(i)); + qDebug() << "adding action" << i; ++i; Q_ASSERT(i<1000); } -- cgit v0.12