Skip to content

Commit

Permalink
QtWidgets tests: Don't call the empty function QApplication::syncX()
Browse files Browse the repository at this point in the history
Change-Id: I2c732afd43586209cf5a2b72caac53e34abb9090
Reviewed-by: Friedemann Kleint <[email protected]>
  • Loading branch information
dbzhang800 authored and The Qt Project committed Mar 27, 2013
1 parent f57a3c0 commit 90d74f8
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 15 deletions.
8 changes: 0 additions & 8 deletions tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,48 +328,40 @@ void tst_QDialog::showFullScreen()
QVERIFY(sizeGrip);
#endif

qApp->syncX();
dialog.showFullScreen();
QVERIFY(dialog.isFullScreen());
QVERIFY(dialog.isVisible());
#ifndef QT_NO_SIZEGRIP
QVERIFY(!sizeGrip->isVisible());
#endif

qApp->syncX();
dialog.showNormal();
QVERIFY(!dialog.isFullScreen());
QVERIFY(dialog.isVisible());
#ifndef QT_NO_SIZEGRIP
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());
Expand Down
1 change: 0 additions & 1 deletion tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ void tst_QApplication::alert()
widget.activateWindow();
QApplication::setActiveWindow(&widget);
app.alert(&widget, 200);
app.syncX();
}

void tst_QApplication::multiple_data()
Expand Down
2 changes: 0 additions & 2 deletions tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,6 @@ void tst_QShortcut::disabledItems()
{
clearAllShortcuts();
mainW->activateWindow();
qApp->syncX();
QTest::qWait(100);

/* Testing Disabled Shortcuts
Expand Down Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
1 change: 0 additions & 1 deletion tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ void tst_QMenuBar::initSimpleMenubar()
connect(pm2, SIGNAL(triggered(QAction*)), this, SLOT(onActivated(QAction*)));

mb->show();
qApp->syncX();
qApp->processEvents();
}

Expand Down

0 comments on commit 90d74f8

Please sign in to comment.