summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-06 10:01:43 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-06 10:53:46 (GMT)
commit00b8ac87e4f6bb8b185799cf9e01427c9975005c (patch)
tree8af64a709aa8fdf39a40e57a3dcd3faebba5de1e /tests/auto
parentcbc229081a9df67a577b4bea61ad6aac52d470cb (diff)
downloadQt-00b8ac87e4f6bb8b185799cf9e01427c9975005c.zip
Qt-00b8ac87e4f6bb8b185799cf9e01427c9975005c.tar.gz
Qt-00b8ac87e4f6bb8b185799cf9e01427c9975005c.tar.bz2
QMenu: fix multi column autotest for styles which don't support it
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp7
1 files changed, 7 insertions, 0 deletions
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);
}