Ensure result of all QTest::qWaitFor are verified
The qWaitFor functions themselves can not trigger a test failure, as that will not result in the test function exiting early, so every single call to qWaitFor needs to be wrapped in a QVERIFY. Change-Id: Id15a1549f31d06cdbf788e1d84ea431c28636ec8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
7bbb9a8ce8
commit
08e083e682
@ -110,7 +110,7 @@ namespace QTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef QT_GUI_LIB
|
#ifdef QT_GUI_LIB
|
||||||
inline static bool qWaitForWindowActive(QWindow *window, int timeout = 5000)
|
Q_REQUIRED_RESULT inline static bool qWaitForWindowActive(QWindow *window, int timeout = 5000)
|
||||||
{
|
{
|
||||||
bool becameActive = qWaitFor([&]() { return window->isActive(); }, timeout);
|
bool becameActive = qWaitFor([&]() { return window->isActive(); }, timeout);
|
||||||
|
|
||||||
@ -131,21 +131,21 @@ namespace QTest
|
|||||||
return window->isActive();
|
return window->isActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static bool qWaitForWindowExposed(QWindow *window, int timeout = 5000)
|
Q_REQUIRED_RESULT inline static bool qWaitForWindowExposed(QWindow *window, int timeout = 5000)
|
||||||
{
|
{
|
||||||
return qWaitFor([&]() { return window->isExposed(); }, timeout);
|
return qWaitFor([&]() { return window->isExposed(); }, timeout);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef QT_WIDGETS_LIB
|
#ifdef QT_WIDGETS_LIB
|
||||||
inline static bool qWaitForWindowActive(QWidget *widget, int timeout = 5000)
|
Q_REQUIRED_RESULT inline static bool qWaitForWindowActive(QWidget *widget, int timeout = 5000)
|
||||||
{
|
{
|
||||||
if (QWindow *window = widget->window()->windowHandle())
|
if (QWindow *window = widget->window()->windowHandle())
|
||||||
return qWaitForWindowActive(window, timeout);
|
return qWaitForWindowActive(window, timeout);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static bool qWaitForWindowExposed(QWidget *widget, int timeout = 5000)
|
Q_REQUIRED_RESULT inline static bool qWaitForWindowExposed(QWidget *widget, int timeout = 5000)
|
||||||
{
|
{
|
||||||
if (QWindow *window = widget->window()->windowHandle())
|
if (QWindow *window = widget->window()->windowHandle())
|
||||||
return qWaitForWindowExposed(window, timeout);
|
return qWaitForWindowExposed(window, timeout);
|
||||||
@ -155,7 +155,8 @@ namespace QTest
|
|||||||
|
|
||||||
#if QT_DEPRECATED_SINCE(5, 0)
|
#if QT_DEPRECATED_SINCE(5, 0)
|
||||||
# ifdef QT_WIDGETS_LIB
|
# ifdef QT_WIDGETS_LIB
|
||||||
QT_DEPRECATED inline static bool qWaitForWindowShown(QWidget *widget, int timeout = 5000)
|
|
||||||
|
QT_DEPRECATED Q_REQUIRED_RESULT inline static bool qWaitForWindowShown(QWidget *widget, int timeout = 5000)
|
||||||
{
|
{
|
||||||
return qWaitForWindowExposed(widget, timeout);
|
return qWaitForWindowExposed(widget, timeout);
|
||||||
}
|
}
|
||||||
|
@ -3893,7 +3893,7 @@ void tst_QSortFilterProxyModel::hierarchyFilterInvalidation()
|
|||||||
view.setCurrentIndex(proxy.index(2, 0).child(0, 0));
|
view.setCurrentIndex(proxy.index(2, 0).child(0, 0));
|
||||||
|
|
||||||
view.show();
|
view.show();
|
||||||
QTest::qWaitForWindowExposed(&view);
|
QVERIFY(QTest::qWaitForWindowExposed(&view));
|
||||||
|
|
||||||
proxy.setMode(true);
|
proxy.setMode(true);
|
||||||
}
|
}
|
||||||
@ -3950,7 +3950,7 @@ void tst_QSortFilterProxyModel::simpleFilterInvalidation()
|
|||||||
view.setModel(&proxy);
|
view.setModel(&proxy);
|
||||||
|
|
||||||
view.show();
|
view.show();
|
||||||
QTest::qWaitForWindowExposed(&view);
|
QVERIFY(QTest::qWaitForWindowExposed(&view));
|
||||||
|
|
||||||
proxy.setMode(true);
|
proxy.setMode(true);
|
||||||
model.insertRow(0, new QStandardItem("extra"));
|
model.insertRow(0, new QStandardItem("extra"));
|
||||||
|
@ -227,7 +227,7 @@ void tst_QGuiApplication::focusObject()
|
|||||||
QOpenGLContext context;
|
QOpenGLContext context;
|
||||||
context.create();
|
context.create();
|
||||||
context.makeCurrent(&window1);
|
context.makeCurrent(&window1);
|
||||||
QTest::qWaitForWindowExposed(&window1); // Buffer swap only succeeds with exposed window
|
QVERIFY(QTest::qWaitForWindowExposed(&window1)); // Buffer swap only succeeds with exposed window
|
||||||
context.swapBuffers(&window1);
|
context.swapBuffers(&window1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -392,7 +392,7 @@ void tst_QGuiApplication::changeFocusWindow()
|
|||||||
QOpenGLContext context;
|
QOpenGLContext context;
|
||||||
context.create();
|
context.create();
|
||||||
context.makeCurrent(&window1);
|
context.makeCurrent(&window1);
|
||||||
QTest::qWaitForWindowExposed(&window1); // Buffer swap only succeeds with exposed window
|
QVERIFY(QTest::qWaitForWindowExposed(&window1)); // Buffer swap only succeeds with exposed window
|
||||||
context.swapBuffers(&window1);
|
context.swapBuffers(&window1);
|
||||||
#endif
|
#endif
|
||||||
FocusChangeWindow window2;
|
FocusChangeWindow window2;
|
||||||
@ -406,7 +406,7 @@ void tst_QGuiApplication::changeFocusWindow()
|
|||||||
#if defined(Q_OS_QNX) // We either need to create a eglSurface or a create a backing store
|
#if defined(Q_OS_QNX) // We either need to create a eglSurface or a create a backing store
|
||||||
// and then post the window in order for screen to show the window
|
// and then post the window in order for screen to show the window
|
||||||
context.makeCurrent(&window2);
|
context.makeCurrent(&window2);
|
||||||
QTest::qWaitForWindowExposed(&window2); // Buffer swap only succeeds with exposed window
|
QVERIFY(QTest::qWaitForWindowExposed(&window2)); // Buffer swap only succeeds with exposed window
|
||||||
context.swapBuffers(&window2);
|
context.swapBuffers(&window2);
|
||||||
#endif
|
#endif
|
||||||
QVERIFY(QTest::qWaitForWindowExposed(&window1));
|
QVERIFY(QTest::qWaitForWindowExposed(&window1));
|
||||||
|
@ -62,7 +62,7 @@ void tst_QOpenGLWindow::create()
|
|||||||
w.resize(640, 480);
|
w.resize(640, 480);
|
||||||
w.show();
|
w.show();
|
||||||
|
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
|
|
||||||
QVERIFY(w.isValid());
|
QVERIFY(w.isValid());
|
||||||
}
|
}
|
||||||
@ -111,7 +111,7 @@ void tst_QOpenGLWindow::basic()
|
|||||||
w.reset();
|
w.reset();
|
||||||
w.resize(640, 480);
|
w.resize(640, 480);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
|
|
||||||
// Check that the virtuals are invoked.
|
// Check that the virtuals are invoked.
|
||||||
QCOMPARE(w.initCount, 1);
|
QCOMPARE(w.initCount, 1);
|
||||||
@ -170,7 +170,7 @@ void tst_QOpenGLWindow::painter()
|
|||||||
PainterWindow w;
|
PainterWindow w;
|
||||||
w.resize(400, 400);
|
w.resize(400, 400);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
|
|
||||||
QCOMPARE(w.img.size(), w.size() * w.devicePixelRatio());
|
QCOMPARE(w.img.size(), w.size() * w.devicePixelRatio());
|
||||||
QVERIFY(w.img.pixel(QPoint(5, 5) * w.devicePixelRatio()) == qRgb(0, 0, 255));
|
QVERIFY(w.img.pixel(QPoint(5, 5) * w.devicePixelRatio()) == qRgb(0, 0, 255));
|
||||||
@ -212,7 +212,7 @@ void tst_QOpenGLWindow::partial()
|
|||||||
PartialPainterWindow w(u);
|
PartialPainterWindow w(u);
|
||||||
w.resize(800, 400);
|
w.resize(800, 400);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
|
|
||||||
// Add a couple of small blue rects.
|
// Add a couple of small blue rects.
|
||||||
for (int i = 0; i < 10; ++i) {
|
for (int i = 0; i < 10; ++i) {
|
||||||
@ -285,7 +285,7 @@ void tst_QOpenGLWindow::underOver()
|
|||||||
PaintUnderOverWindow w;
|
PaintUnderOverWindow w;
|
||||||
w.resize(400, 400);
|
w.resize(400, 400);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
|
|
||||||
// under -> paint -> over -> under -> paint -> ... is the only acceptable sequence
|
// under -> paint -> over -> under -> paint -> ... is the only acceptable sequence
|
||||||
QCOMPARE(w.m_state, PaintUnderOverWindow::PaintOver);
|
QCOMPARE(w.m_state, PaintUnderOverWindow::PaintOver);
|
||||||
|
@ -46,7 +46,7 @@ void tst_QRasterWindow::create()
|
|||||||
w.resize(640, 480);
|
w.resize(640, 480);
|
||||||
w.show();
|
w.show();
|
||||||
|
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
}
|
}
|
||||||
|
|
||||||
class PainterWindow : public QRasterWindow
|
class PainterWindow : public QRasterWindow
|
||||||
@ -70,7 +70,7 @@ void tst_QRasterWindow::basic()
|
|||||||
w.reset();
|
w.reset();
|
||||||
w.resize(400, 400);
|
w.resize(400, 400);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));;
|
||||||
|
|
||||||
QVERIFY(w.paintCount >= 1);
|
QVERIFY(w.paintCount >= 1);
|
||||||
|
|
||||||
|
@ -490,7 +490,7 @@ void tst_QWindow::positioning()
|
|||||||
window.showNormal();
|
window.showNormal();
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
|
|
||||||
QTest::qWaitForWindowExposed(&window);
|
QVERIFY(QTest::qWaitForWindowExposed(&window));
|
||||||
|
|
||||||
QMargins originalMargins = window.frameMargins();
|
QMargins originalMargins = window.frameMargins();
|
||||||
|
|
||||||
@ -1483,7 +1483,7 @@ void tst_QWindow::activateAndClose()
|
|||||||
window.showNormal();
|
window.showNormal();
|
||||||
#if defined(Q_OS_QNX) // We either need to create a eglSurface or a create a backing store
|
#if defined(Q_OS_QNX) // We either need to create a eglSurface or a create a backing store
|
||||||
// and then post the window in order for screen to show the window
|
// and then post the window in order for screen to show the window
|
||||||
QTest::qWaitForWindowExposed(&window);
|
QVERIFY(QTest::qWaitForWindowExposed(&window));
|
||||||
QOpenGLContext context;
|
QOpenGLContext context;
|
||||||
context.create();
|
context.create();
|
||||||
context.makeCurrent(&window);
|
context.makeCurrent(&window);
|
||||||
|
@ -1413,7 +1413,7 @@ void tst_QOpenGL::glxContextWrap()
|
|||||||
window->setSurfaceType(QWindow::OpenGLSurface);
|
window->setSurfaceType(QWindow::OpenGLSurface);
|
||||||
window->setGeometry(0, 0, 10, 10);
|
window->setGeometry(0, 0, 10, 10);
|
||||||
window->show();
|
window->show();
|
||||||
QTest::qWaitForWindowExposed(window);
|
QVERIFY(QTest::qWaitForWindowExposed(window));
|
||||||
|
|
||||||
QPlatformNativeInterface *nativeIf = QGuiApplicationPrivate::instance()->platformIntegration()->nativeInterface();
|
QPlatformNativeInterface *nativeIf = QGuiApplicationPrivate::instance()->platformIntegration()->nativeInterface();
|
||||||
QVERIFY(nativeIf);
|
QVERIFY(nativeIf);
|
||||||
@ -1457,7 +1457,7 @@ void tst_QOpenGL::wglContextWrap()
|
|||||||
window->setSurfaceType(QWindow::OpenGLSurface);
|
window->setSurfaceType(QWindow::OpenGLSurface);
|
||||||
window->setGeometry(0, 0, 256, 256);
|
window->setGeometry(0, 0, 256, 256);
|
||||||
window->show();
|
window->show();
|
||||||
QTest::qWaitForWindowExposed(window.data());
|
QVERIFY(QTest::qWaitForWindowExposed(window.data()));
|
||||||
|
|
||||||
QVariant v = ctx->nativeHandle();
|
QVariant v = ctx->nativeHandle();
|
||||||
QVERIFY(!v.isNull());
|
QVERIFY(!v.isNull());
|
||||||
|
@ -116,7 +116,7 @@ void tst_QVulkan::vulkanPlainWindow()
|
|||||||
w.setVulkanInstance(&inst);
|
w.setVulkanInstance(&inst);
|
||||||
w.resize(1024, 768);
|
w.resize(1024, 768);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
|
|
||||||
QCOMPARE(w.vulkanInstance(), &inst);
|
QCOMPARE(w.vulkanInstance(), &inst);
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ void tst_QVulkan::vulkanWindow()
|
|||||||
QVERIFY(!w.isValid());
|
QVERIFY(!w.isValid());
|
||||||
w.resize(1024, 768);
|
w.resize(1024, 768);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
QVERIFY(!w.isValid());
|
QVERIFY(!w.isValid());
|
||||||
|
|
||||||
// Now set it. A simple hide - show should be enough to correct, this, no
|
// Now set it. A simple hide - show should be enough to correct, this, no
|
||||||
@ -194,7 +194,7 @@ void tst_QVulkan::vulkanWindow()
|
|||||||
if (pdevs.isEmpty())
|
if (pdevs.isEmpty())
|
||||||
QSKIP("No Vulkan physical devices; skip");
|
QSKIP("No Vulkan physical devices; skip");
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
QVERIFY(w.isValid());
|
QVERIFY(w.isValid());
|
||||||
QCOMPARE(w.vulkanInstance(), &inst);
|
QCOMPARE(w.vulkanInstance(), &inst);
|
||||||
QVulkanInfoVector<QVulkanExtension> exts = w.supportedDeviceExtensions();
|
QVulkanInfoVector<QVulkanExtension> exts = w.supportedDeviceExtensions();
|
||||||
@ -208,7 +208,7 @@ void tst_QVulkan::vulkanWindow()
|
|||||||
// supported lists can be queried before expose too
|
// supported lists can be queried before expose too
|
||||||
QVERIFY(w.supportedDeviceExtensions() == exts);
|
QVERIFY(w.supportedDeviceExtensions() == exts);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
QVERIFY(w.isValid());
|
QVERIFY(w.isValid());
|
||||||
QVERIFY(w.flags().testFlag(QVulkanWindow::PersistentResources));
|
QVERIFY(w.flags().testFlag(QVulkanWindow::PersistentResources));
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ void tst_QVulkan::vulkanWindowRenderer()
|
|||||||
w.setVulkanInstance(&inst);
|
w.setVulkanInstance(&inst);
|
||||||
w.resize(1024, 768);
|
w.resize(1024, 768);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
|
|
||||||
if (w.availablePhysicalDevices().isEmpty())
|
if (w.availablePhysicalDevices().isEmpty())
|
||||||
QSKIP("No Vulkan physical devices; skip");
|
QSKIP("No Vulkan physical devices; skip");
|
||||||
@ -389,7 +389,7 @@ void tst_QVulkan::vulkanWindowGrab()
|
|||||||
w.setVulkanInstance(&inst);
|
w.setVulkanInstance(&inst);
|
||||||
w.resize(1024, 768);
|
w.resize(1024, 768);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
|
|
||||||
if (w.availablePhysicalDevices().isEmpty())
|
if (w.availablePhysicalDevices().isEmpty())
|
||||||
QSKIP("No Vulkan physical devices; skip");
|
QSKIP("No Vulkan physical devices; skip");
|
||||||
|
@ -2142,7 +2142,7 @@ void tst_QGL::textureCleanup()
|
|||||||
QGLWidget w;
|
QGLWidget w;
|
||||||
w.resize(200,200);
|
w.resize(200,200);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
w.makeCurrent();
|
w.makeCurrent();
|
||||||
|
|
||||||
// Test pixmaps which have been loaded via QPixmapCache are removed from the texture cache
|
// Test pixmaps which have been loaded via QPixmapCache are removed from the texture cache
|
||||||
|
@ -523,7 +523,7 @@ public:
|
|||||||
GLWidgetWrapper() {
|
GLWidgetWrapper() {
|
||||||
widget.resize(150, 150);
|
widget.resize(150, 150);
|
||||||
widget.show();
|
widget.show();
|
||||||
QTest::qWaitForWindowExposed(&widget);
|
QVERIFY(QTest::qWaitForWindowExposed(&widget));
|
||||||
widget.doneCurrent();
|
widget.doneCurrent();
|
||||||
}
|
}
|
||||||
QPaintDevice *realPaintDevice() { return &widget; }
|
QPaintDevice *realPaintDevice() { return &widget; }
|
||||||
|
@ -356,7 +356,7 @@ void tst_QAccessibility::customWidget()
|
|||||||
{
|
{
|
||||||
QtTestAccessibleWidget* widget = new QtTestAccessibleWidget(0, "Heinz");
|
QtTestAccessibleWidget* widget = new QtTestAccessibleWidget(0, "Heinz");
|
||||||
widget->show();
|
widget->show();
|
||||||
QTest::qWaitForWindowExposed(widget);
|
QVERIFY(QTest::qWaitForWindowExposed(widget));
|
||||||
// By default we create QAccessibleWidget
|
// By default we create QAccessibleWidget
|
||||||
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(widget);
|
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(widget);
|
||||||
QVERIFY(iface != 0);
|
QVERIFY(iface != 0);
|
||||||
@ -372,7 +372,7 @@ void tst_QAccessibility::customWidget()
|
|||||||
QAccessible::installFactory(QtTestAccessibleWidgetIface::ifaceFactory);
|
QAccessible::installFactory(QtTestAccessibleWidgetIface::ifaceFactory);
|
||||||
QtTestAccessibleWidget* widget = new QtTestAccessibleWidget(0, "Heinz");
|
QtTestAccessibleWidget* widget = new QtTestAccessibleWidget(0, "Heinz");
|
||||||
widget->show();
|
widget->show();
|
||||||
QTest::qWaitForWindowExposed(widget);
|
QVERIFY(QTest::qWaitForWindowExposed(widget));
|
||||||
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(widget);
|
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(widget);
|
||||||
QVERIFY(iface != 0);
|
QVERIFY(iface != 0);
|
||||||
QVERIFY(iface->isValid());
|
QVERIFY(iface->isValid());
|
||||||
@ -1753,7 +1753,7 @@ void tst_QAccessibility::textEditTest()
|
|||||||
}
|
}
|
||||||
|
|
||||||
edit.show();
|
edit.show();
|
||||||
QTest::qWaitForWindowExposed(&edit);
|
QVERIFY(QTest::qWaitForWindowExposed(&edit));
|
||||||
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&edit);
|
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&edit);
|
||||||
QCOMPARE(iface->text(QAccessible::Value), edit.toPlainText());
|
QCOMPARE(iface->text(QAccessible::Value), edit.toPlainText());
|
||||||
QVERIFY(iface->state().focusable);
|
QVERIFY(iface->state().focusable);
|
||||||
@ -2165,7 +2165,7 @@ void tst_QAccessibility::lineEditTest()
|
|||||||
QLineEdit le(QStringLiteral("My characters have geometries."), toplevel);
|
QLineEdit le(QStringLiteral("My characters have geometries."), toplevel);
|
||||||
// characterRect()
|
// characterRect()
|
||||||
le.show();
|
le.show();
|
||||||
QTest::qWaitForWindowExposed(&le);
|
QVERIFY(QTest::qWaitForWindowExposed(&le));
|
||||||
QAccessibleInterface *iface(QAccessible::queryAccessibleInterface(&le));
|
QAccessibleInterface *iface(QAccessible::queryAccessibleInterface(&le));
|
||||||
QAccessibleTextInterface* textIface = iface->textInterface();
|
QAccessibleTextInterface* textIface = iface->textInterface();
|
||||||
QVERIFY(textIface);
|
QVERIFY(textIface);
|
||||||
@ -3075,7 +3075,7 @@ void tst_QAccessibility::tableTest()
|
|||||||
|
|
||||||
tableView->resize(600,600);
|
tableView->resize(600,600);
|
||||||
tableView->show();
|
tableView->show();
|
||||||
QTest::qWaitForWindowExposed(tableView);
|
QVERIFY(QTest::qWaitForWindowExposed(tableView));
|
||||||
|
|
||||||
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(tableView);
|
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(tableView);
|
||||||
QCOMPARE(verifyHierarchy(iface), 0);
|
QCOMPARE(verifyHierarchy(iface), 0);
|
||||||
@ -3449,7 +3449,7 @@ void tst_QAccessibility::dockWidgetTest()
|
|||||||
|
|
||||||
mw->resize(600,400);
|
mw->resize(600,400);
|
||||||
mw->show();
|
mw->show();
|
||||||
QTest::qWaitForWindowExposed(mw);
|
QVERIFY(QTest::qWaitForWindowExposed(mw));
|
||||||
|
|
||||||
QAccessibleInterface *accMainWindow = QAccessible::queryAccessibleInterface(mw);
|
QAccessibleInterface *accMainWindow = QAccessible::queryAccessibleInterface(mw);
|
||||||
// 4 children: menu bar, dock1, dock2, and central widget
|
// 4 children: menu bar, dock1, dock2, and central widget
|
||||||
@ -3632,7 +3632,7 @@ void tst_QAccessibility::labelTest()
|
|||||||
window->resize(320, 200);
|
window->resize(320, 200);
|
||||||
window->show();
|
window->show();
|
||||||
|
|
||||||
QTest::qWaitForWindowExposed(window);
|
QVERIFY(QTest::qWaitForWindowExposed(window));
|
||||||
#if defined(Q_OS_UNIX)
|
#if defined(Q_OS_UNIX)
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
#endif
|
#endif
|
||||||
|
@ -63,7 +63,7 @@ public:
|
|||||||
{
|
{
|
||||||
layout()->addWidget(widget);
|
layout()->addWidget(widget);
|
||||||
widget->show();
|
widget->show();
|
||||||
QTest::qWaitForWindowExposed(widget);
|
QVERIFY(QTest::qWaitForWindowExposed(widget));
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearChildren()
|
void clearChildren()
|
||||||
@ -182,7 +182,7 @@ void tst_QAccessibilityLinux::initTestCase()
|
|||||||
m_window = new AccessibleTestWindow();
|
m_window = new AccessibleTestWindow();
|
||||||
m_window->show();
|
m_window->show();
|
||||||
|
|
||||||
QTest::qWaitForWindowExposed(m_window);
|
QVERIFY(QTest::qWaitForWindowExposed(m_window));
|
||||||
registerDbus();
|
registerDbus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ public:
|
|||||||
{
|
{
|
||||||
layout()->addWidget(widget);
|
layout()->addWidget(widget);
|
||||||
widget->show();
|
widget->show();
|
||||||
QTest::qWaitForWindowExposed(widget);
|
QVERIFY(QTest::qWaitForWindowExposed(widget));
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearChildren()
|
void clearChildren()
|
||||||
@ -84,7 +84,7 @@ void tst_QAccessibilityMac::init()
|
|||||||
m_window->show();
|
m_window->show();
|
||||||
m_window->resize(400, 400);
|
m_window->resize(400, 400);
|
||||||
|
|
||||||
QTest::qWaitForWindowExposed(m_window);
|
QVERIFY(QTest::qWaitForWindowExposed(m_window));
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QAccessibilityMac::cleanup()
|
void tst_QAccessibilityMac::cleanup()
|
||||||
|
@ -367,7 +367,7 @@ void tst_QFileDialog2::task143519_deleteAndRenameActionBehavior()
|
|||||||
fd.selectFile(ctx.file.fileName());
|
fd.selectFile(ctx.file.fileName());
|
||||||
fd.show();
|
fd.show();
|
||||||
|
|
||||||
QTest::qWaitForWindowActive(&fd);
|
QVERIFY(QTest::qWaitForWindowActive(&fd));
|
||||||
|
|
||||||
// grab some internals:
|
// grab some internals:
|
||||||
QAction *rm = fd.findChild<QAction*>("qt_delete_action");
|
QAction *rm = fd.findChild<QAction*>("qt_delete_action");
|
||||||
|
@ -594,7 +594,7 @@ void tst_QMessageBox::detailsText()
|
|||||||
box.setDetailedText(text);
|
box.setDetailedText(text);
|
||||||
QCOMPARE(box.detailedText(), text);
|
QCOMPARE(box.detailedText(), text);
|
||||||
box.show();
|
box.show();
|
||||||
QTest::qWaitForWindowExposed(&box);
|
QVERIFY(QTest::qWaitForWindowExposed(&box));
|
||||||
// QTBUG-39334, the box should now have the default "Ok" button as well as
|
// QTBUG-39334, the box should now have the default "Ok" button as well as
|
||||||
// the "Show Details.." button.
|
// the "Show Details.." button.
|
||||||
QCOMPARE(box.findChildren<QAbstractButton *>().size(), 2);
|
QCOMPARE(box.findChildren<QAbstractButton *>().size(), 2);
|
||||||
@ -647,7 +647,7 @@ void tst_QMessageBox::expandDetails_QTBUG_32473()
|
|||||||
// that the window manager is also done manipulating the first QMessageBox.
|
// that the window manager is also done manipulating the first QMessageBox.
|
||||||
QWidget fleece;
|
QWidget fleece;
|
||||||
fleece.show();
|
fleece.show();
|
||||||
QTest::qWaitForWindowExposed(&fleece);
|
QVERIFY(QTest::qWaitForWindowExposed(&fleece));
|
||||||
if (geom.topLeft() == box.geometry().topLeft())
|
if (geom.topLeft() == box.geometry().topLeft())
|
||||||
QTest::qWait(500);
|
QTest::qWait(500);
|
||||||
QCOMPARE(geom.topLeft(), box.geometry().topLeft());
|
QCOMPARE(geom.topLeft(), box.geometry().topLeft());
|
||||||
|
@ -11419,7 +11419,7 @@ void tst_QGraphicsItem::doNotMarkFullUpdateIfNotInScene()
|
|||||||
item2->setParentItem(item);
|
item2->setParentItem(item);
|
||||||
scene.addItem(item);
|
scene.addItem(item);
|
||||||
view.show();
|
view.show();
|
||||||
QTest::qWaitForWindowActive(view.windowHandle());
|
QVERIFY(QTest::qWaitForWindowActive(view.windowHandle()));
|
||||||
view.activateWindow();
|
view.activateWindow();
|
||||||
QTRY_VERIFY(view.isActiveWindow());
|
QTRY_VERIFY(view.isActiveWindow());
|
||||||
QTRY_VERIFY(view.repaints >= 1);
|
QTRY_VERIFY(view.repaints >= 1);
|
||||||
|
@ -824,7 +824,7 @@ void tst_QGraphicsProxyWidget::focusOutEvent()
|
|||||||
QApplication::setActiveWindow(&view);
|
QApplication::setActiveWindow(&view);
|
||||||
view.activateWindow();
|
view.activateWindow();
|
||||||
view.setFocus();
|
view.setFocus();
|
||||||
QTest::qWaitForWindowActive(&view);
|
QVERIFY(QTest::qWaitForWindowActive(&view));
|
||||||
QTRY_VERIFY(view.isVisible());
|
QTRY_VERIFY(view.isVisible());
|
||||||
QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
|
QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view);
|
||||||
|
|
||||||
|
@ -688,7 +688,7 @@ void tst_QGraphicsView::openGLViewport()
|
|||||||
view.setViewport(glw);
|
view.setViewport(glw);
|
||||||
|
|
||||||
view.show();
|
view.show();
|
||||||
QTest::qWaitForWindowExposed(&view);
|
QVERIFY(QTest::qWaitForWindowExposed(&view));
|
||||||
QTRY_VERIFY(spy1.count() > 0);
|
QTRY_VERIFY(spy1.count() > 0);
|
||||||
QTRY_VERIFY(spy2.count() >= spy1.count());
|
QTRY_VERIFY(spy2.count() >= spy1.count());
|
||||||
spy1.clear();
|
spy1.clear();
|
||||||
|
@ -1815,7 +1815,7 @@ void tst_QAbstractItemView::shiftSelectionAfterChangingModelContents()
|
|||||||
view.setModel(&proxyModel);
|
view.setModel(&proxyModel);
|
||||||
view.setSelectionMode(QAbstractItemView::ExtendedSelection);
|
view.setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||||
view.show();
|
view.show();
|
||||||
QTest::qWaitForWindowExposed(&view);
|
QVERIFY(QTest::qWaitForWindowExposed(&view));
|
||||||
|
|
||||||
// Click "C"
|
// Click "C"
|
||||||
QTest::mouseClick(view.viewport(), Qt::LeftButton, Qt::NoModifier, view.visualRect(indexC).center());
|
QTest::mouseClick(view.viewport(), Qt::LeftButton, Qt::NoModifier, view.visualRect(indexC).center());
|
||||||
@ -1929,7 +1929,7 @@ void tst_QAbstractItemView::QTBUG48968_reentrant_updateEditorGeometries()
|
|||||||
tree.setRootIsDecorated(false);
|
tree.setRootIsDecorated(false);
|
||||||
QObject::connect(&tree, SIGNAL(doubleClicked(QModelIndex)), &tree, SLOT(setRootIndex(QModelIndex)));
|
QObject::connect(&tree, SIGNAL(doubleClicked(QModelIndex)), &tree, SLOT(setRootIndex(QModelIndex)));
|
||||||
tree.show();
|
tree.show();
|
||||||
QTest::qWaitForWindowActive(&tree);
|
QVERIFY(QTest::qWaitForWindowActive(&tree));
|
||||||
|
|
||||||
// Trigger editing idx
|
// Trigger editing idx
|
||||||
QModelIndex idx = m->index(1, 0);
|
QModelIndex idx = m->index(1, 0);
|
||||||
@ -2171,7 +2171,7 @@ void tst_QAbstractItemView::testClickToSelect()
|
|||||||
SetSelectionTestView view;
|
SetSelectionTestView view;
|
||||||
view.setModel(&model);
|
view.setModel(&model);
|
||||||
view.show();
|
view.show();
|
||||||
QTest::qWaitForWindowExposed(&view);
|
QVERIFY(QTest::qWaitForWindowExposed(&view));
|
||||||
|
|
||||||
QSignalSpy spy(&view, &SetSelectionTestView::setSelectionCalled);
|
QSignalSpy spy(&view, &SetSelectionTestView::setSelectionCalled);
|
||||||
|
|
||||||
|
@ -2163,7 +2163,7 @@ void tst_QListView::draggablePaintPairs()
|
|||||||
view.setModel(&model);
|
view.setModel(&model);
|
||||||
|
|
||||||
view.show();
|
view.show();
|
||||||
QTest::qWaitForWindowExposed(&view);
|
QVERIFY(QTest::qWaitForWindowExposed(&view));
|
||||||
|
|
||||||
QModelIndex expectedIndex = model.index(row, 0);
|
QModelIndex expectedIndex = model.index(row, 0);
|
||||||
QListViewPrivate *privateClass = static_cast<QListViewPrivate *>(QListViewPrivate::get(&view));
|
QListViewPrivate *privateClass = static_cast<QListViewPrivate *>(QListViewPrivate::get(&view));
|
||||||
@ -2207,7 +2207,7 @@ void tst_QListView::taskQTBUG_21804_hiddenItemsAndScrollingWithKeys()
|
|||||||
lv.setSpacing(spacing);
|
lv.setSpacing(spacing);
|
||||||
lv.setModel(&model);
|
lv.setModel(&model);
|
||||||
lv.show();
|
lv.show();
|
||||||
QTest::qWaitForWindowExposed(&lv);
|
QVERIFY(QTest::qWaitForWindowExposed(&lv));
|
||||||
|
|
||||||
// hide every odd number row
|
// hide every odd number row
|
||||||
for (int i = 1; i < model.rowCount(); i+=2)
|
for (int i = 1; i < model.rowCount(); i+=2)
|
||||||
@ -2279,7 +2279,7 @@ void tst_QListView::spacing()
|
|||||||
lv.setModel(&model);
|
lv.setModel(&model);
|
||||||
lv.setSpacing(spacing);
|
lv.setSpacing(spacing);
|
||||||
lv.show();
|
lv.show();
|
||||||
QTest::qWaitForWindowExposed(&lv);
|
QVERIFY(QTest::qWaitForWindowExposed(&lv));
|
||||||
|
|
||||||
// check size and position of first two items
|
// check size and position of first two items
|
||||||
QRect item1 = lv.visualRect(lv.model()->index(0, 0));
|
QRect item1 = lv.visualRect(lv.model()->index(0, 0));
|
||||||
@ -2310,7 +2310,7 @@ void tst_QListView::testScrollToWithHidden()
|
|||||||
lv.setSpacing(5);
|
lv.setSpacing(5);
|
||||||
|
|
||||||
lv.showNormal();
|
lv.showNormal();
|
||||||
QTest::qWaitForWindowExposed(&lv);
|
QVERIFY(QTest::qWaitForWindowExposed(&lv));
|
||||||
|
|
||||||
QCOMPARE(lv.verticalScrollBar()->value(), 0);
|
QCOMPARE(lv.verticalScrollBar()->value(), 0);
|
||||||
|
|
||||||
@ -2455,7 +2455,7 @@ void tst_QListView::horizontalScrollingByVerticalWheelEvents()
|
|||||||
|
|
||||||
lv.resize(300, 300);
|
lv.resize(300, 300);
|
||||||
lv.show();
|
lv.show();
|
||||||
QTest::qWaitForWindowExposed(&lv);
|
QVERIFY(QTest::qWaitForWindowExposed(&lv));
|
||||||
|
|
||||||
QPoint globalPos = lv.geometry().center();
|
QPoint globalPos = lv.geometry().center();
|
||||||
QPoint pos = lv.viewport()->geometry().center();
|
QPoint pos = lv.viewport()->geometry().center();
|
||||||
|
@ -4238,7 +4238,7 @@ void tst_QTreeView::testInitialFocus()
|
|||||||
treeWidget.header()->hideSection(0); // make sure we skip hidden section(s)
|
treeWidget.header()->hideSection(0); // make sure we skip hidden section(s)
|
||||||
treeWidget.header()->swapSections(1, 2); // make sure that we look for first visual index (and not first logical)
|
treeWidget.header()->swapSections(1, 2); // make sure that we look for first visual index (and not first logical)
|
||||||
treeWidget.show();
|
treeWidget.show();
|
||||||
QTest::qWaitForWindowExposed(&treeWidget);
|
QVERIFY(QTest::qWaitForWindowExposed(&treeWidget));
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
QCOMPARE(treeWidget.currentIndex().column(), 2);
|
QCOMPARE(treeWidget.currentIndex().column(), 2);
|
||||||
}
|
}
|
||||||
@ -4261,7 +4261,7 @@ void tst_QTreeView::quickExpandCollapse()
|
|||||||
QVERIFY(rootIndex.isValid());
|
QVERIFY(rootIndex.isValid());
|
||||||
|
|
||||||
tree.show();
|
tree.show();
|
||||||
QTest::qWaitForWindowExposed(&tree);
|
QVERIFY(QTest::qWaitForWindowExposed(&tree));
|
||||||
|
|
||||||
const QAbstractItemView::State initialState = tree.state();
|
const QAbstractItemView::State initialState = tree.state();
|
||||||
|
|
||||||
@ -4455,7 +4455,7 @@ void tst_QTreeView::statusTip()
|
|||||||
QSize(500, 500)));
|
QSize(500, 500)));
|
||||||
mw.show();
|
mw.show();
|
||||||
qApp->setActiveWindow(&mw);
|
qApp->setActiveWindow(&mw);
|
||||||
QTest::qWaitForWindowActive(&mw);
|
QVERIFY(QTest::qWaitForWindowActive(&mw));
|
||||||
// Ensure it is moved away first and then moved to the relevant section
|
// Ensure it is moved away first and then moved to the relevant section
|
||||||
QTest::mouseMove(mw.windowHandle(), view->mapTo(&mw, view->rect().bottomLeft() + QPoint(20, 20)));
|
QTest::mouseMove(mw.windowHandle(), view->mapTo(&mw, view->rect().bottomLeft() + QPoint(20, 20)));
|
||||||
QPoint centerPoint = view->viewport()->mapTo(&mw, view->visualRect(model.index(0, 0)).center());
|
QPoint centerPoint = view->viewport()->mapTo(&mw, view->visualRect(model.index(0, 0)).center());
|
||||||
|
@ -160,7 +160,7 @@ void tst_QBoxLayout::sizeHint()
|
|||||||
lay1->addLayout(lay2);
|
lay1->addLayout(lay2);
|
||||||
window.setLayout(lay1);
|
window.setLayout(lay1);
|
||||||
window.show();
|
window.show();
|
||||||
QTest::qWaitForWindowExposed(&window);
|
QVERIFY(QTest::qWaitForWindowExposed(&window));
|
||||||
label->setText("foooooooo baaaaaaar");
|
label->setText("foooooooo baaaaaaar");
|
||||||
QSize sh = lay1->sizeHint();
|
QSize sh = lay1->sizeHint();
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
@ -181,7 +181,7 @@ void tst_QBoxLayout::sizeConstraints()
|
|||||||
lay->setSizeConstraint(QLayout::SetFixedSize);
|
lay->setSizeConstraint(QLayout::SetFixedSize);
|
||||||
window.setLayout(lay);
|
window.setLayout(lay);
|
||||||
window.show();
|
window.show();
|
||||||
QTest::qWaitForWindowExposed(&window);
|
QVERIFY(QTest::qWaitForWindowExposed(&window));
|
||||||
QSize sh = window.sizeHint();
|
QSize sh = window.sizeHint();
|
||||||
delete lay->takeAt(1);
|
delete lay->takeAt(1);
|
||||||
QVERIFY(sh.width() >= window.sizeHint().width() &&
|
QVERIFY(sh.width() >= window.sizeHint().width() &&
|
||||||
@ -228,7 +228,7 @@ void tst_QBoxLayout::setStyleShouldChangeSpacing()
|
|||||||
style1->hspacing = 6;
|
style1->hspacing = 6;
|
||||||
window.setStyle(style1.data());
|
window.setStyle(style1.data());
|
||||||
window.show();
|
window.show();
|
||||||
QTest::qWaitForWindowExposed(&window);
|
QVERIFY(QTest::qWaitForWindowExposed(&window));
|
||||||
|
|
||||||
int spacing = pb2->geometry().left() - pb1->geometry().right() - 1;
|
int spacing = pb2->geometry().left() - pb1->geometry().right() - 1;
|
||||||
QCOMPARE(spacing, 6);
|
QCOMPARE(spacing, 6);
|
||||||
|
@ -2299,7 +2299,7 @@ void tst_QWidget::resizeEvent()
|
|||||||
wParent.resize(200, 200);
|
wParent.resize(200, 200);
|
||||||
ResizeWidget wChild(&wParent);
|
ResizeWidget wChild(&wParent);
|
||||||
wParent.show();
|
wParent.show();
|
||||||
QTest::qWaitForWindowExposed(&wParent);
|
QVERIFY(QTest::qWaitForWindowExposed(&wParent));
|
||||||
QCOMPARE (wChild.m_resizeEventCount, 1); // initial resize event before paint
|
QCOMPARE (wChild.m_resizeEventCount, 1); // initial resize event before paint
|
||||||
wParent.hide();
|
wParent.hide();
|
||||||
QSize safeSize(640,480);
|
QSize safeSize(640,480);
|
||||||
@ -2315,7 +2315,7 @@ void tst_QWidget::resizeEvent()
|
|||||||
ResizeWidget wTopLevel;
|
ResizeWidget wTopLevel;
|
||||||
wTopLevel.resize(200, 200);
|
wTopLevel.resize(200, 200);
|
||||||
wTopLevel.show();
|
wTopLevel.show();
|
||||||
QTest::qWaitForWindowExposed(&wTopLevel);
|
QVERIFY(QTest::qWaitForWindowExposed(&wTopLevel));
|
||||||
QCOMPARE (wTopLevel.m_resizeEventCount, 1); // initial resize event before paint for toplevels
|
QCOMPARE (wTopLevel.m_resizeEventCount, 1); // initial resize event before paint for toplevels
|
||||||
wTopLevel.hide();
|
wTopLevel.hide();
|
||||||
QSize safeSize(640,480);
|
QSize safeSize(640,480);
|
||||||
@ -2324,7 +2324,7 @@ void tst_QWidget::resizeEvent()
|
|||||||
wTopLevel.resize(safeSize);
|
wTopLevel.resize(safeSize);
|
||||||
QCOMPARE (wTopLevel.m_resizeEventCount, 1);
|
QCOMPARE (wTopLevel.m_resizeEventCount, 1);
|
||||||
wTopLevel.show();
|
wTopLevel.show();
|
||||||
QTest::qWaitForWindowExposed(&wTopLevel);
|
QVERIFY(QTest::qWaitForWindowExposed(&wTopLevel));
|
||||||
QCOMPARE (wTopLevel.m_resizeEventCount, 2);
|
QCOMPARE (wTopLevel.m_resizeEventCount, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -851,7 +851,7 @@ void tst_QWidget_window::QTBUG_50561_QCocoaBackingStore_paintDevice_crash()
|
|||||||
QMainWindow w;
|
QMainWindow w;
|
||||||
w.addToolBar(new QToolBar(&w));
|
w.addToolBar(new QToolBar(&w));
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
|
|
||||||
// Simulate window system close
|
// Simulate window system close
|
||||||
QCloseEvent *e = new QCloseEvent;
|
QCloseEvent *e = new QCloseEvent;
|
||||||
@ -907,7 +907,8 @@ void tst_QWidget_window::setWindowState()
|
|||||||
w.show();
|
w.show();
|
||||||
QCOMPARE(w.windowState(), state);
|
QCOMPARE(w.windowState(), state);
|
||||||
QCOMPARE(w.windowHandle()->windowStates(), state);
|
QCOMPARE(w.windowHandle()->windowStates(), state);
|
||||||
QTest::qWaitForWindowExposed(&w);
|
if (!(state & Qt::WindowMinimized))
|
||||||
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
QTRY_COMPARE(w.windowState(), state);
|
QTRY_COMPARE(w.windowState(), state);
|
||||||
QCOMPARE(w.windowHandle()->windowStates(), state);
|
QCOMPARE(w.windowHandle()->windowStates(), state);
|
||||||
|
|
||||||
@ -925,7 +926,7 @@ void tst_QWidget_window::nativeShow()
|
|||||||
QWidget w;
|
QWidget w;
|
||||||
w.winId();
|
w.winId();
|
||||||
w.windowHandle()->setVisible(true);
|
w.windowHandle()->setVisible(true);
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
QVERIFY(w.isVisible());
|
QVERIFY(w.isVisible());
|
||||||
|
|
||||||
// ... and that we can hide it
|
// ... and that we can hide it
|
||||||
|
@ -2261,7 +2261,7 @@ void tst_QComboBox::task190351_layout()
|
|||||||
listCombo.setCurrentIndex(70);
|
listCombo.setCurrentIndex(70);
|
||||||
listCombo.showPopup();
|
listCombo.showPopup();
|
||||||
QTRY_VERIFY(listCombo.view());
|
QTRY_VERIFY(listCombo.view());
|
||||||
QTest::qWaitForWindowExposed(listCombo.view());
|
QVERIFY(QTest::qWaitForWindowExposed(listCombo.view()));
|
||||||
QTRY_VERIFY(listCombo.view()->isVisible());
|
QTRY_VERIFY(listCombo.view()->isVisible());
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
|
|
||||||
@ -2408,7 +2408,7 @@ void tst_QComboBox::task248169_popupWithMinimalSize()
|
|||||||
QTRY_VERIFY(comboBox.isVisible());
|
QTRY_VERIFY(comboBox.isVisible());
|
||||||
comboBox.showPopup();
|
comboBox.showPopup();
|
||||||
QTRY_VERIFY(comboBox.view());
|
QTRY_VERIFY(comboBox.view());
|
||||||
QTest::qWaitForWindowExposed(comboBox.view());
|
QVERIFY(QTest::qWaitForWindowExposed(comboBox.view()));
|
||||||
QTRY_VERIFY(comboBox.view()->isVisible());
|
QTRY_VERIFY(comboBox.view()->isVisible());
|
||||||
|
|
||||||
#if defined QT_BUILD_INTERNAL
|
#if defined QT_BUILD_INTERNAL
|
||||||
@ -3254,12 +3254,12 @@ void tst_QComboBox::task_QTBUG_49831_scrollerNotActivated()
|
|||||||
box.setModel(&model);
|
box.setModel(&model);
|
||||||
box.setCurrentIndex(500);
|
box.setCurrentIndex(500);
|
||||||
box.show();
|
box.show();
|
||||||
QTest::qWaitForWindowExposed(&box);
|
QVERIFY(QTest::qWaitForWindowExposed(&box));
|
||||||
QTest::mouseMove(&box, QPoint(5, 5), 100);
|
QTest::mouseMove(&box, QPoint(5, 5), 100);
|
||||||
box.showPopup();
|
box.showPopup();
|
||||||
QFrame *container = box.findChild<QComboBoxPrivateContainer *>();
|
QFrame *container = box.findChild<QComboBoxPrivateContainer *>();
|
||||||
QVERIFY(container);
|
QVERIFY(container);
|
||||||
QTest::qWaitForWindowExposed(container);
|
QVERIFY(QTest::qWaitForWindowExposed(container));
|
||||||
|
|
||||||
QList<QComboBoxPrivateScroller *> scrollers = container->findChildren<QComboBoxPrivateScroller *>();
|
QList<QComboBoxPrivateScroller *> scrollers = container->findChildren<QComboBoxPrivateScroller *>();
|
||||||
// Not all styles support scrollers. We rely only on those platforms that do to catch any regression.
|
// Not all styles support scrollers. We rely only on those platforms that do to catch any regression.
|
||||||
@ -3335,11 +3335,11 @@ void tst_QComboBox::task_QTBUG_56693_itemFontFromModel()
|
|||||||
box.addItem(QLatin1String("Item ") + QString::number(i));
|
box.addItem(QLatin1String("Item ") + QString::number(i));
|
||||||
|
|
||||||
box.show();
|
box.show();
|
||||||
QTest::qWaitForWindowExposed(&box);
|
QVERIFY(QTest::qWaitForWindowExposed(&box));
|
||||||
box.showPopup();
|
box.showPopup();
|
||||||
QFrame *container = box.findChild<QComboBoxPrivateContainer *>();
|
QFrame *container = box.findChild<QComboBoxPrivateContainer *>();
|
||||||
QVERIFY(container);
|
QVERIFY(container);
|
||||||
QTest::qWaitForWindowExposed(container);
|
QVERIFY(QTest::qWaitForWindowExposed(container));
|
||||||
|
|
||||||
QCOMPARE(proxyStyle->italicItemsNo, 5);
|
QCOMPARE(proxyStyle->italicItemsNo, 5);
|
||||||
|
|
||||||
|
@ -1930,7 +1930,7 @@ void tst_QLineEdit::noCursorBlinkWhenReadOnly()
|
|||||||
centerOnScreen(&le);
|
centerOnScreen(&le);
|
||||||
le.show();
|
le.show();
|
||||||
le.setFocus();
|
le.setFocus();
|
||||||
QTest::qWaitForWindowActive(&le);
|
QVERIFY(QTest::qWaitForWindowActive(&le));
|
||||||
le.updates = 0;
|
le.updates = 0;
|
||||||
QTest::qWait(cursorFlashTime);
|
QTest::qWait(cursorFlashTime);
|
||||||
QVERIFY(le.updates > 0);
|
QVERIFY(le.updates > 0);
|
||||||
@ -3368,7 +3368,7 @@ void tst_QLineEdit::inlineCompletion()
|
|||||||
completer->setCaseSensitivity(Qt::CaseInsensitive);
|
completer->setCaseSensitivity(Qt::CaseInsensitive);
|
||||||
centerOnScreen(testWidget);
|
centerOnScreen(testWidget);
|
||||||
testWidget->show();
|
testWidget->show();
|
||||||
QTest::qWaitForWindowExposed(testWidget);
|
QVERIFY(QTest::qWaitForWindowExposed(testWidget));
|
||||||
testWidget->setFocus();
|
testWidget->setFocus();
|
||||||
QTRY_COMPARE(qApp->activeWindow(), (QWidget*)testWidget);
|
QTRY_COMPARE(qApp->activeWindow(), (QWidget*)testWidget);
|
||||||
testWidget->setCompleter(completer);
|
testWidget->setCompleter(completer);
|
||||||
@ -3696,7 +3696,7 @@ void tst_QLineEdit::task229938_dontEmitChangedWhenTextIsNotChanged()
|
|||||||
QLineEdit lineEdit;
|
QLineEdit lineEdit;
|
||||||
lineEdit.setMaxLength(5);
|
lineEdit.setMaxLength(5);
|
||||||
lineEdit.show();
|
lineEdit.show();
|
||||||
QTest::qWaitForWindowExposed(&lineEdit); // to be safe and avoid failing setFocus with window managers
|
QVERIFY(QTest::qWaitForWindowExposed(&lineEdit)); // to be safe and avoid failing setFocus with window managers
|
||||||
lineEdit.setFocus();
|
lineEdit.setFocus();
|
||||||
QSignalSpy changedSpy(&lineEdit, SIGNAL(textChanged(QString)));
|
QSignalSpy changedSpy(&lineEdit, SIGNAL(textChanged(QString)));
|
||||||
QTest::qWait(200);
|
QTest::qWait(200);
|
||||||
|
@ -2013,7 +2013,7 @@ void tst_QMainWindow::resizeDocks()
|
|||||||
mw.setCentralWidget(new QTextEdit);
|
mw.setCentralWidget(new QTextEdit);
|
||||||
|
|
||||||
mw.show();
|
mw.show();
|
||||||
QTest::qWaitForWindowExposed(&mw);
|
QVERIFY(QTest::qWaitForWindowExposed(&mw));
|
||||||
|
|
||||||
QFETCH(Qt::Orientation, orientation);
|
QFETCH(Qt::Orientation, orientation);
|
||||||
QFETCH(QStringList, docks);
|
QFETCH(QStringList, docks);
|
||||||
|
@ -80,7 +80,7 @@ void tst_QOpenGLWidget::create()
|
|||||||
QVERIFY(w->textureFormat() == 0);
|
QVERIFY(w->textureFormat() == 0);
|
||||||
QSignalSpy frameSwappedSpy(w.data(), SIGNAL(frameSwapped()));
|
QSignalSpy frameSwappedSpy(w.data(), SIGNAL(frameSwapped()));
|
||||||
w->show();
|
w->show();
|
||||||
QTest::qWaitForWindowExposed(w.data());
|
QVERIFY(QTest::qWaitForWindowExposed(w.data()));
|
||||||
QVERIFY(frameSwappedSpy.count() > 0);
|
QVERIFY(frameSwappedSpy.count() > 0);
|
||||||
|
|
||||||
QVERIFY(w->isValid());
|
QVERIFY(w->isValid());
|
||||||
@ -131,7 +131,7 @@ void tst_QOpenGLWidget::clearAndGrab()
|
|||||||
QScopedPointer<ClearWidget> w(new ClearWidget(0, 800, 600));
|
QScopedPointer<ClearWidget> w(new ClearWidget(0, 800, 600));
|
||||||
w->resize(800, 600);
|
w->resize(800, 600);
|
||||||
w->show();
|
w->show();
|
||||||
QTest::qWaitForWindowExposed(w.data());
|
QVERIFY(QTest::qWaitForWindowExposed(w.data()));
|
||||||
QVERIFY(w->m_initCalled);
|
QVERIFY(w->m_initCalled);
|
||||||
QVERIFY(w->m_resizeCalled);
|
QVERIFY(w->m_resizeCalled);
|
||||||
QVERIFY(w->m_resizeOk);
|
QVERIFY(w->m_resizeOk);
|
||||||
@ -149,7 +149,7 @@ void tst_QOpenGLWidget::clearAndResizeAndGrab()
|
|||||||
QScopedPointer<QOpenGLWidget> w(new ClearWidget(0, 640, 480));
|
QScopedPointer<QOpenGLWidget> w(new ClearWidget(0, 640, 480));
|
||||||
w->resize(640, 480);
|
w->resize(640, 480);
|
||||||
w->show();
|
w->show();
|
||||||
QTest::qWaitForWindowExposed(w.data());
|
QVERIFY(QTest::qWaitForWindowExposed(w.data()));
|
||||||
|
|
||||||
QImage image = w->grabFramebuffer();
|
QImage image = w->grabFramebuffer();
|
||||||
QVERIFY(!image.isNull());
|
QVERIFY(!image.isNull());
|
||||||
@ -172,7 +172,7 @@ void tst_QOpenGLWidget::createNonTopLevel()
|
|||||||
QSignalSpy frameSwappedSpy(glw, SIGNAL(frameSwapped()));
|
QSignalSpy frameSwappedSpy(glw, SIGNAL(frameSwapped()));
|
||||||
w.resize(400, 400);
|
w.resize(400, 400);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
QVERIFY(frameSwappedSpy.count() > 0);
|
QVERIFY(frameSwappedSpy.count() > 0);
|
||||||
|
|
||||||
QVERIFY(glw->m_resizeCalled);
|
QVERIFY(glw->m_resizeCalled);
|
||||||
@ -228,7 +228,7 @@ void tst_QOpenGLWidget::painter()
|
|||||||
w.resize(640, 480);
|
w.resize(640, 480);
|
||||||
glw->resize(320, 200);
|
glw->resize(320, 200);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
|
|
||||||
QImage image = glw->grabFramebuffer();
|
QImage image = glw->grabFramebuffer();
|
||||||
QCOMPARE(image.width(), glw->width());
|
QCOMPARE(image.width(), glw->width());
|
||||||
@ -249,11 +249,11 @@ void tst_QOpenGLWidget::reparentToAlreadyCreated()
|
|||||||
w1.resize(640, 480);
|
w1.resize(640, 480);
|
||||||
glw->resize(320, 200);
|
glw->resize(320, 200);
|
||||||
w1.show();
|
w1.show();
|
||||||
QTest::qWaitForWindowExposed(&w1);
|
QVERIFY(QTest::qWaitForWindowExposed(&w1));
|
||||||
|
|
||||||
QWidget w2;
|
QWidget w2;
|
||||||
w2.show();
|
w2.show();
|
||||||
QTest::qWaitForWindowExposed(&w2);
|
QVERIFY(QTest::qWaitForWindowExposed(&w2));
|
||||||
|
|
||||||
glw->setParent(&w2);
|
glw->setParent(&w2);
|
||||||
glw->show();
|
glw->show();
|
||||||
@ -271,12 +271,12 @@ void tst_QOpenGLWidget::reparentToNotYetCreated()
|
|||||||
w1.resize(640, 480);
|
w1.resize(640, 480);
|
||||||
glw->resize(320, 200);
|
glw->resize(320, 200);
|
||||||
w1.show();
|
w1.show();
|
||||||
QTest::qWaitForWindowExposed(&w1);
|
QVERIFY(QTest::qWaitForWindowExposed(&w1));
|
||||||
|
|
||||||
QWidget w2;
|
QWidget w2;
|
||||||
glw->setParent(&w2);
|
glw->setParent(&w2);
|
||||||
w2.show();
|
w2.show();
|
||||||
QTest::qWaitForWindowExposed(&w2);
|
QVERIFY(QTest::qWaitForWindowExposed(&w2));
|
||||||
|
|
||||||
QImage image = glw->grabFramebuffer();
|
QImage image = glw->grabFramebuffer();
|
||||||
QCOMPARE(image.width(), 320);
|
QCOMPARE(image.width(), 320);
|
||||||
@ -297,12 +297,12 @@ void tst_QOpenGLWidget::reparentHidden()
|
|||||||
|
|
||||||
glw->hide(); // Explicitly hidden
|
glw->hide(); // Explicitly hidden
|
||||||
|
|
||||||
QTest::qWaitForWindowExposed(&topLevel1);
|
QVERIFY(QTest::qWaitForWindowExposed(&topLevel1));
|
||||||
|
|
||||||
QWidget topLevel2;
|
QWidget topLevel2;
|
||||||
topLevel2.resize(640, 480);
|
topLevel2.resize(640, 480);
|
||||||
topLevel2.show();
|
topLevel2.show();
|
||||||
QTest::qWaitForWindowExposed(&topLevel2);
|
QVERIFY(QTest::qWaitForWindowExposed(&topLevel2));
|
||||||
|
|
||||||
QOpenGLContext *originalContext = glw->context();
|
QOpenGLContext *originalContext = glw->context();
|
||||||
QVERIFY(originalContext);
|
QVERIFY(originalContext);
|
||||||
@ -353,7 +353,7 @@ void tst_QOpenGLWidget::asViewport()
|
|||||||
layout->addWidget(btn);
|
layout->addWidget(btn);
|
||||||
widget.setLayout(layout);
|
widget.setLayout(layout);
|
||||||
widget.show();
|
widget.show();
|
||||||
QTest::qWaitForWindowExposed(&widget);
|
QVERIFY(QTest::qWaitForWindowExposed(&widget));
|
||||||
|
|
||||||
QVERIFY(view->paintCount() > 0);
|
QVERIFY(view->paintCount() > 0);
|
||||||
view->resetPaintCount();
|
view->resetPaintCount();
|
||||||
@ -381,7 +381,7 @@ void tst_QOpenGLWidget::requestUpdate()
|
|||||||
PaintCountWidget w;
|
PaintCountWidget w;
|
||||||
w.resize(640, 480);
|
w.resize(640, 480);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
|
|
||||||
w.reset();
|
w.reset();
|
||||||
QCOMPARE(w.m_count, 0);
|
QCOMPARE(w.m_count, 0);
|
||||||
@ -405,7 +405,7 @@ void tst_QOpenGLWidget::fboRedirect()
|
|||||||
FboCheckWidget w;
|
FboCheckWidget w;
|
||||||
w.resize(640, 480);
|
w.resize(640, 480);
|
||||||
w.show();
|
w.show();
|
||||||
QTest::qWaitForWindowExposed(&w);
|
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||||
|
|
||||||
// Unlike in paintGL(), the default fbo reported by the context is not affected by the widget,
|
// Unlike in paintGL(), the default fbo reported by the context is not affected by the widget,
|
||||||
// so we get the real default fbo: either 0 or (on iOS) the fbo associated with the window.
|
// so we get the real default fbo: either 0 or (on iOS) the fbo associated with the window.
|
||||||
@ -420,7 +420,7 @@ void tst_QOpenGLWidget::showHide()
|
|||||||
QScopedPointer<ClearWidget> w(new ClearWidget(0, 800, 600));
|
QScopedPointer<ClearWidget> w(new ClearWidget(0, 800, 600));
|
||||||
w->resize(800, 600);
|
w->resize(800, 600);
|
||||||
w->show();
|
w->show();
|
||||||
QTest::qWaitForWindowExposed(w.data());
|
QVERIFY(QTest::qWaitForWindowExposed(w.data()));
|
||||||
|
|
||||||
w->hide();
|
w->hide();
|
||||||
|
|
||||||
@ -432,7 +432,7 @@ void tst_QOpenGLWidget::showHide()
|
|||||||
|
|
||||||
w->setClearColor(0, 0, 1);
|
w->setClearColor(0, 0, 1);
|
||||||
w->show();
|
w->show();
|
||||||
QTest::qWaitForWindowExposed(w.data());
|
QVERIFY(QTest::qWaitForWindowExposed(w.data()));
|
||||||
|
|
||||||
image = w->grabFramebuffer();
|
image = w->grabFramebuffer();
|
||||||
QVERIFY(!image.isNull());
|
QVERIFY(!image.isNull());
|
||||||
@ -447,7 +447,7 @@ void tst_QOpenGLWidget::nativeWindow()
|
|||||||
w->resize(800, 600);
|
w->resize(800, 600);
|
||||||
w->show();
|
w->show();
|
||||||
w->winId();
|
w->winId();
|
||||||
QTest::qWaitForWindowExposed(w.data());
|
QVERIFY(QTest::qWaitForWindowExposed(w.data()));
|
||||||
|
|
||||||
QImage image = w->grabFramebuffer();
|
QImage image = w->grabFramebuffer();
|
||||||
QVERIFY(!image.isNull());
|
QVERIFY(!image.isNull());
|
||||||
@ -466,7 +466,7 @@ void tst_QOpenGLWidget::nativeWindow()
|
|||||||
child->resize(400, 400);
|
child->resize(400, 400);
|
||||||
child->move(23, 34);
|
child->move(23, 34);
|
||||||
nativeParent.show();
|
nativeParent.show();
|
||||||
QTest::qWaitForWindowExposed(&nativeParent);
|
QVERIFY(QTest::qWaitForWindowExposed(&nativeParent));
|
||||||
|
|
||||||
QVERIFY(nativeParent.internalWinId());
|
QVERIFY(nativeParent.internalWinId());
|
||||||
QVERIFY(!child->internalWinId());
|
QVERIFY(!child->internalWinId());
|
||||||
@ -586,8 +586,8 @@ void tst_QOpenGLWidget::stackWidgetOpaqueChildIsVisible()
|
|||||||
stack.setCurrentIndex(0);
|
stack.setCurrentIndex(0);
|
||||||
stack.resize(dimensionSize, dimensionSize);
|
stack.resize(dimensionSize, dimensionSize);
|
||||||
stack.show();
|
stack.show();
|
||||||
QTest::qWaitForWindowExposed(&stack);
|
QVERIFY(QTest::qWaitForWindowExposed(&stack));
|
||||||
QTest::qWaitForWindowActive(&stack);
|
QVERIFY(QTest::qWaitForWindowActive(&stack));
|
||||||
|
|
||||||
// Switch to the QOpenGLWidget.
|
// Switch to the QOpenGLWidget.
|
||||||
stack.setCurrentIndex(1);
|
stack.setCurrentIndex(1);
|
||||||
@ -666,7 +666,7 @@ void tst_QOpenGLWidget::offscreenThenOnscreen()
|
|||||||
// now let's make things more challenging: show. Internally this needs
|
// now let's make things more challenging: show. Internally this needs
|
||||||
// recreating the context.
|
// recreating the context.
|
||||||
w->show();
|
w->show();
|
||||||
QTest::qWaitForWindowExposed(w.data());
|
QVERIFY(QTest::qWaitForWindowExposed(w.data()));
|
||||||
|
|
||||||
image = w->grabFramebuffer();
|
image = w->grabFramebuffer();
|
||||||
QVERIFY(!image.isNull());
|
QVERIFY(!image.isNull());
|
||||||
|
@ -594,7 +594,7 @@ void tst_QPushButton::taskQTBUG_20191_shortcutWithKeypadModifer()
|
|||||||
QDialog dialog;
|
QDialog dialog;
|
||||||
dialog.setLayout(layout);
|
dialog.setLayout(layout);
|
||||||
dialog.show();
|
dialog.show();
|
||||||
QTest::qWaitForWindowExposed(&dialog);
|
QVERIFY(QTest::qWaitForWindowExposed(&dialog));
|
||||||
QApplication::setActiveWindow(&dialog);
|
QApplication::setActiveWindow(&dialog);
|
||||||
|
|
||||||
// add shortcut '5' to button1 and test with keyboard and keypad '5' keys
|
// add shortcut '5' to button1 and test with keyboard and keypad '5' keys
|
||||||
@ -639,7 +639,7 @@ void tst_QPushButton::emitReleasedAfterChange()
|
|||||||
QDialog dialog;
|
QDialog dialog;
|
||||||
dialog.setLayout(layout);
|
dialog.setLayout(layout);
|
||||||
dialog.show();
|
dialog.show();
|
||||||
QTest::qWaitForWindowExposed(&dialog);
|
QVERIFY(QTest::qWaitForWindowExposed(&dialog));
|
||||||
QApplication::setActiveWindow(&dialog);
|
QApplication::setActiveWindow(&dialog);
|
||||||
button1->setFocus();
|
button1->setFocus();
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ void tst_QScrollBar::scrollSingleStep()
|
|||||||
testWidget.resize(100, testWidget.height());
|
testWidget.resize(100, testWidget.height());
|
||||||
centerOnScreen(&testWidget);
|
centerOnScreen(&testWidget);
|
||||||
testWidget.show();
|
testWidget.show();
|
||||||
QTest::qWaitForWindowExposed(&testWidget);
|
QVERIFY(QTest::qWaitForWindowExposed(&testWidget));
|
||||||
|
|
||||||
testWidget.setValue(testWidget.minimum());
|
testWidget.setValue(testWidget.minimum());
|
||||||
QCOMPARE(testWidget.value(), testWidget.minimum());
|
QCOMPARE(testWidget.value(), testWidget.minimum());
|
||||||
@ -117,7 +117,7 @@ void tst_QScrollBar::task_209492()
|
|||||||
verticalScrollBar->setRange(0, 1000);
|
verticalScrollBar->setRange(0, 1000);
|
||||||
centerOnScreen(&scrollArea);
|
centerOnScreen(&scrollArea);
|
||||||
scrollArea.show();
|
scrollArea.show();
|
||||||
QTest::qWaitForWindowExposed(&scrollArea);
|
QVERIFY(QTest::qWaitForWindowExposed(&scrollArea));
|
||||||
|
|
||||||
QSignalSpy spy(verticalScrollBar, SIGNAL(actionTriggered(int)));
|
QSignalSpy spy(verticalScrollBar, SIGNAL(actionTriggered(int)));
|
||||||
QCOMPARE(scrollArea.scrollCount, 0);
|
QCOMPARE(scrollArea.scrollCount, 0);
|
||||||
@ -154,7 +154,7 @@ void tst_QScrollBar::QTBUG_27308()
|
|||||||
testWidget.resize(100, testWidget.height());
|
testWidget.resize(100, testWidget.height());
|
||||||
centerOnScreen(&testWidget);
|
centerOnScreen(&testWidget);
|
||||||
testWidget.show();
|
testWidget.show();
|
||||||
QTest::qWaitForWindowExposed(&testWidget);
|
QVERIFY(QTest::qWaitForWindowExposed(&testWidget));
|
||||||
|
|
||||||
testWidget.setValue(testWidget.minimum());
|
testWidget.setValue(testWidget.minimum());
|
||||||
testWidget.setEnabled(false);
|
testWidget.setEnabled(false);
|
||||||
@ -183,7 +183,7 @@ void tst_QScrollBar::QTBUG_42871()
|
|||||||
scrollBarWidget.resize(100, scrollBarWidget.height());
|
scrollBarWidget.resize(100, scrollBarWidget.height());
|
||||||
centerOnScreen(&scrollBarWidget);
|
centerOnScreen(&scrollBarWidget);
|
||||||
scrollBarWidget.show();
|
scrollBarWidget.show();
|
||||||
QTest::qWaitForWindowExposed(&scrollBarWidget);
|
QVERIFY(QTest::qWaitForWindowExposed(&scrollBarWidget));
|
||||||
QSignalSpy spy(&scrollBarWidget, SIGNAL(actionTriggered(int)));
|
QSignalSpy spy(&scrollBarWidget, SIGNAL(actionTriggered(int)));
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(myHandler.updatesCount, 0);
|
QCOMPARE(myHandler.updatesCount, 0);
|
||||||
|
@ -828,7 +828,7 @@ void tst_QSplitter::handleMinimumWidth()
|
|||||||
split.addWidget(new QLabel("Number Too"));
|
split.addWidget(new QLabel("Number Too"));
|
||||||
|
|
||||||
split.show();
|
split.show();
|
||||||
QTest::qWaitForWindowExposed(&split);
|
QVERIFY(QTest::qWaitForWindowExposed(&split));
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
split.setHandleWidth(i);
|
split.setHandleWidth(i);
|
||||||
QTest::qWait(100); // resizing
|
QTest::qWait(100); // resizing
|
||||||
|
@ -180,7 +180,7 @@ void tst_QStackedWidget::dynamicPages()
|
|||||||
sw->resize(200, 200);
|
sw->resize(200, 200);
|
||||||
sw->show();
|
sw->show();
|
||||||
qApp->setActiveWindow(sw);
|
qApp->setActiveWindow(sw);
|
||||||
QTest::qWaitForWindowActive(sw);
|
QVERIFY(QTest::qWaitForWindowActive(sw));
|
||||||
QTRY_COMPARE(QApplication::focusWidget(), le11);
|
QTRY_COMPARE(QApplication::focusWidget(), le11);
|
||||||
|
|
||||||
sw->setCurrentIndex(1);
|
sw->setCurrentIndex(1);
|
||||||
|
@ -2507,7 +2507,7 @@ void tst_QTextEdit::highlightLongLine()
|
|||||||
};
|
};
|
||||||
NumHighlighter nh(edit.document());
|
NumHighlighter nh(edit.document());
|
||||||
edit.show();
|
edit.show();
|
||||||
QTest::qWaitForWindowActive(edit.windowHandle());
|
QVERIFY(QTest::qWaitForWindowActive(edit.windowHandle()));
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
//If there is a quadratic behaviour, this would take forever.
|
//If there is a quadratic behaviour, this would take forever.
|
||||||
QVERIFY(true);
|
QVERIFY(true);
|
||||||
|
@ -326,7 +326,7 @@ void tst_GraphicsViewBenchmark::initTestCase()
|
|||||||
currentListSize = -1;
|
currentListSize = -1;
|
||||||
currentListType = None;
|
currentListType = None;
|
||||||
|
|
||||||
QTest::qWaitForWindowShown(mMainView);
|
QVERIFY(QTest::qWaitForWindowShown(mMainView));
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_GraphicsViewBenchmark::cleanupTestCase()
|
void tst_GraphicsViewBenchmark::cleanupTestCase()
|
||||||
|
@ -110,7 +110,7 @@ void tst_QGraphicsLayout::invalidate()
|
|||||||
|
|
||||||
view->show();
|
view->show();
|
||||||
|
|
||||||
QTest::qWaitForWindowShown(view);
|
QVERIFY(QTest::qWaitForWindowShown(view));
|
||||||
|
|
||||||
// ...then measure...
|
// ...then measure...
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ void tst_QGraphicsView::initTestCase()
|
|||||||
mView.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
mView.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
mView.tryResize(100, 100);
|
mView.tryResize(100, 100);
|
||||||
mView.show();
|
mView.show();
|
||||||
QTest::qWaitForWindowExposed(&mView);
|
QVERIFY(QTest::qWaitForWindowExposed(&mView));
|
||||||
QTest::qWait(300);
|
QTest::qWait(300);
|
||||||
processEvents();
|
processEvents();
|
||||||
}
|
}
|
||||||
@ -409,7 +409,7 @@ void tst_QGraphicsView::chipTester()
|
|||||||
tester.setOpenGL(opengl);
|
tester.setOpenGL(opengl);
|
||||||
tester.setOperation(ChipTester::Operation(operation));
|
tester.setOperation(ChipTester::Operation(operation));
|
||||||
tester.show();
|
tester.show();
|
||||||
QTest::qWaitForWindowExposed(&tester);
|
QVERIFY(QTest::qWaitForWindowExposed(&tester));
|
||||||
QTest::qWait(250);
|
QTest::qWait(250);
|
||||||
processEvents();
|
processEvents();
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ private:
|
|||||||
void tst_QWidget::initTestCase()
|
void tst_QWidget::initTestCase()
|
||||||
{
|
{
|
||||||
widget.show();
|
widget.show();
|
||||||
QTest::qWaitForWindowExposed(&widget);
|
QVERIFY(QTest::qWaitForWindowExposed(&widget));
|
||||||
QTest::qWait(300);
|
QTest::qWait(300);
|
||||||
processEvents();
|
processEvents();
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ void tst_QtBench::qtBench()
|
|||||||
|
|
||||||
BenchWidget widget(reinterpret_cast<Benchmark *>(benchmark));
|
BenchWidget widget(reinterpret_cast<Benchmark *>(benchmark));
|
||||||
widget.show();
|
widget.show();
|
||||||
QTest::qWaitForWindowExposed(&widget);
|
QVERIFY(QTest::qWaitForWindowExposed(&widget));
|
||||||
|
|
||||||
while (!widget.done()) {
|
while (!widget.done()) {
|
||||||
widget.update();
|
widget.update();
|
||||||
|
@ -168,7 +168,7 @@ void tst_qstylesheetstyle::grid()
|
|||||||
w->setStyleSheet("/* */");
|
w->setStyleSheet("/* */");
|
||||||
if(show) {
|
if(show) {
|
||||||
w->show();
|
w->show();
|
||||||
QTest::qWaitForWindowExposed(w);
|
QVERIFY(QTest::qWaitForWindowExposed(w));
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
QTest::qWait(30);
|
QTest::qWait(30);
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user