QtWidgets tests: Don't call the empty function QApplication::syncX()
Change-Id: I2c732afd43586209cf5a2b72caac53e34abb9090 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>bb10
parent
f57a3c0ba3
commit
90d74f8602
|
|
@ -328,7 +328,6 @@ void tst_QDialog::showFullScreen()
|
|||
QVERIFY(sizeGrip);
|
||||
#endif
|
||||
|
||||
qApp->syncX();
|
||||
dialog.showFullScreen();
|
||||
QVERIFY(dialog.isFullScreen());
|
||||
QVERIFY(dialog.isVisible());
|
||||
|
|
@ -336,7 +335,6 @@ void tst_QDialog::showFullScreen()
|
|||
QVERIFY(!sizeGrip->isVisible());
|
||||
#endif
|
||||
|
||||
qApp->syncX();
|
||||
dialog.showNormal();
|
||||
QVERIFY(!dialog.isFullScreen());
|
||||
QVERIFY(dialog.isVisible());
|
||||
|
|
@ -344,32 +342,26 @@ void tst_QDialog::showFullScreen()
|
|||
QVERIFY(sizeGrip->isVisible());
|
||||
#endif
|
||||
|
||||
qApp->syncX();
|
||||
dialog.showFullScreen();
|
||||
QVERIFY(dialog.isFullScreen());
|
||||
QVERIFY(dialog.isVisible());
|
||||
|
||||
qApp->syncX();
|
||||
dialog.hide();
|
||||
QVERIFY(dialog.isFullScreen());
|
||||
QVERIFY(!dialog.isVisible());
|
||||
|
||||
qApp->syncX();
|
||||
dialog.show();
|
||||
QVERIFY(dialog.isFullScreen());
|
||||
QVERIFY(dialog.isVisible());
|
||||
|
||||
qApp->syncX();
|
||||
dialog.hide();
|
||||
QVERIFY(dialog.isFullScreen());
|
||||
QVERIFY(!dialog.isVisible());
|
||||
|
||||
qApp->syncX();
|
||||
dialog.showFullScreen();
|
||||
QVERIFY(dialog.isFullScreen());
|
||||
QVERIFY(dialog.isVisible());
|
||||
|
||||
qApp->syncX();
|
||||
dialog.hide();
|
||||
QVERIFY(dialog.isFullScreen());
|
||||
QVERIFY(!dialog.isVisible());
|
||||
|
|
|
|||
|
|
@ -1068,7 +1068,6 @@ void tst_QFiledialog::focus()
|
|||
|
||||
// make sure the tests work with focus follows mouse
|
||||
QCursor::setPos(fd.geometry().center());
|
||||
QApplication::syncX();
|
||||
|
||||
QList<QWidget*> treeView = qFindChildren<QWidget*>(&fd, "fileNameEdit");
|
||||
QCOMPARE(treeView.count(), 1);
|
||||
|
|
|
|||
|
|
@ -1048,7 +1048,6 @@ void tst_QAbstractItemView::setItemDelegate()
|
|||
v.show();
|
||||
#ifdef Q_WS_X11
|
||||
QCursor::setPos(v.geometry().center());
|
||||
QApplication::syncX();
|
||||
#endif
|
||||
QApplication::setActiveWindow(&v);
|
||||
QVERIFY(QTest::qWaitForWindowActive(&v));
|
||||
|
|
|
|||
|
|
@ -316,7 +316,6 @@ void tst_QApplication::alert()
|
|||
widget.activateWindow();
|
||||
QApplication::setActiveWindow(&widget);
|
||||
app.alert(&widget, 200);
|
||||
app.syncX();
|
||||
}
|
||||
|
||||
void tst_QApplication::multiple_data()
|
||||
|
|
|
|||
|
|
@ -610,7 +610,6 @@ void tst_QShortcut::disabledItems()
|
|||
{
|
||||
clearAllShortcuts();
|
||||
mainW->activateWindow();
|
||||
qApp->syncX();
|
||||
QTest::qWait(100);
|
||||
|
||||
/* Testing Disabled Shortcuts
|
||||
|
|
@ -1072,7 +1071,6 @@ void tst_QShortcut::context()
|
|||
// Changing focus to 'other2' should make the Focus context there work
|
||||
other2->activateWindow();
|
||||
other2->setFocus(); // ###
|
||||
qApp->syncX();
|
||||
QTRY_COMPARE(qApp->activeWindow(), other2->window());
|
||||
QCOMPARE(qApp->focusWidget(), (QWidget *)other2);
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,6 @@ void tst_QStackedLayout::init()
|
|||
// make sure the tests work with focus follows mouse
|
||||
QCursor::setPos(testWidget->geometry().center());
|
||||
testWidget->activateWindow();
|
||||
QApplication::syncX();
|
||||
QTest::qWait(250);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -294,7 +294,6 @@ void tst_QMenuBar::initSimpleMenubar()
|
|||
connect(pm2, SIGNAL(triggered(QAction*)), this, SLOT(onActivated(QAction*)));
|
||||
|
||||
mb->show();
|
||||
qApp->syncX();
|
||||
qApp->processEvents();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue