diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-25 11:47:46 +0100 |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-25 11:56:06 +0100 |
commit | b463bd91f5e19ec597990ea736ee51a4baaca338 (patch) | |
tree | 21021d062724228cdc32ea44cb98f0fc28f3715d /tests/auto/qmenubar/tst_qmenubar.cpp | |
parent | 931a81a116dd453b1714f0faa2be42bddcd066aa (diff) | |
download | qt4-tools-b463bd91f5e19ec597990ea736ee51a4baaca338.tar.gz |
stabilize tests on X11
Diffstat (limited to 'tests/auto/qmenubar/tst_qmenubar.cpp')
-rw-r--r-- | tests/auto/qmenubar/tst_qmenubar.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/qmenubar/tst_qmenubar.cpp b/tests/auto/qmenubar/tst_qmenubar.cpp index 7fbb76019c..aa6caae430 100644 --- a/tests/auto/qmenubar/tst_qmenubar.cpp +++ b/tests/auto/qmenubar/tst_qmenubar.cpp @@ -168,7 +168,7 @@ private slots: void task256322_highlight(); void menubarSizeHint(); void taskQTBUG4965_escapeEaten(); - + #if defined(QT3_SUPPORT) void indexBasedInsertion_data(); void indexBasedInsertion(); @@ -1360,7 +1360,7 @@ tst_QMenuBar::allowActiveAndDisabled() // disabled menu items are added QMenu fileMenu("&File"); - // Task 241043 : check that second menu is activated + // Task 241043 : check that second menu is activated // if all items are disabled QAction *act = fileMenu.addAction("Disabled"); act->setEnabled(false); @@ -1388,7 +1388,7 @@ tst_QMenuBar::allowActiveAndDisabled() QCOMPARE(mb->activeAction()->text(), fileMenu.title()); else QCOMPARE(mb->activeAction()->text(), fileMenu.title()); - + mb->hide(); #endif //Q_WS_MAC } @@ -1603,7 +1603,7 @@ void tst_QMenuBar::menubarSizeHint() virtual int pixelMetric(PixelMetric metric, const QStyleOption * option = 0, const QWidget * widget = 0 ) const { // I chose strange values (prime numbers to be more sure that the size of the menubar is correct) - switch (metric) + switch (metric) { case QStyle::PM_MenuBarItemSpacing: return 7; @@ -1621,7 +1621,7 @@ void tst_QMenuBar::menubarSizeHint() QMenuBar mb; mb.setNativeMenuBar(false); //we can't check the geometry of native menubars - + mb.setStyle(&style); //this is a list of arbitrary strings so that we check the geometry QStringList list = QStringList() << "trer" << "ezrfgtgvqd" << "sdgzgzerzerzer" << "eerzertz" << "er"; @@ -1675,7 +1675,7 @@ void tst_QMenuBar::taskQTBUG4965_escapeEaten() QAction *first = menubar.addMenu(&menu); menu.addAction("quit", &menubar, SLOT(close()), QKeySequence("ESC")); menubar.show(); - menubar.setActiveWindow(); + QApplication::setActiveWindow(&menubar); QTest::qWaitForWindowShown(&menubar); menubar.setActiveAction(first); QTRY_VERIFY(menu.isVisible()); |