winrt: Make widgets/widgets auto tests pass
Task-number: QTBUG-68297 Change-Id: I64d6e89e515a6284fbd8625cded22511de783481 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>bb10
parent
ea4a038bb7
commit
569f368ad0
|
|
@ -334,6 +334,10 @@ void tst_QAbstractScrollArea::task214488_layoutDirection()
|
|||
|
||||
int refValue = hbar->value();
|
||||
qApp->sendEvent(&scrollArea, new QKeyEvent(QEvent::KeyPress, key, Qt::NoModifier));
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "WinRT: Scrollbar is not guaranteed to be visible, as QWidget::resize does not"
|
||||
"work", Abort);
|
||||
#endif
|
||||
QVERIFY(lessThan ? (hbar->value() < refValue) : (hbar->value() > refValue));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,6 +153,9 @@ void tst_QCalendarWidget::getSetCheck()
|
|||
|
||||
void tst_QCalendarWidget::buttonClickCheck()
|
||||
{
|
||||
#ifdef Q_OS_WINRT
|
||||
QSKIP("Fails on WinRT - QTBUG-68297");
|
||||
#endif
|
||||
QCalendarWidget object;
|
||||
QSize size = object.sizeHint();
|
||||
object.setGeometry(0,0,size.width(), size.height());
|
||||
|
|
@ -283,6 +286,10 @@ void tst_QCalendarWidget::showPrevNext()
|
|||
QFETCH(QDate, dateOrigin);
|
||||
QFETCH(QDate, expectedDate);
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
QSKIP("Fails on WinRT - QTBUG-68297");
|
||||
#endif
|
||||
|
||||
QCalendarWidget calWidget;
|
||||
calWidget.show();
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&calWidget));
|
||||
|
|
|
|||
|
|
@ -1672,6 +1672,9 @@ void tst_QComboBox::setCustomModelAndView()
|
|||
const QRect subItemRect = view->visualRect(model->indexFromItem(subItem));
|
||||
QWidget *window = view->window();
|
||||
QTest::mouseClick(window->windowHandle(), Qt::LeftButton, 0, view->mapTo(window, subItemRect.center()));
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QTRY_COMPARE(combo.currentText(), subItem21Text);
|
||||
}
|
||||
|
||||
|
|
@ -2376,6 +2379,9 @@ void tst_QComboBox::task190205_setModelAdjustToContents()
|
|||
correctBox.addItems(finalContent);
|
||||
correctBox.showNormal();
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "WinRT does not support more than 1 native top level widget", Abort);
|
||||
#endif
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&box));
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&correctBox));
|
||||
|
||||
|
|
@ -3310,6 +3316,9 @@ void tst_QComboBox::task_QTBUG_56693_itemFontFromModel()
|
|||
QVERIFY(container);
|
||||
QVERIFY(QTest::qWaitForWindowExposed(container));
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QCOMPARE(proxyStyle->italicItemsNo, 5);
|
||||
|
||||
box.hidePopup();
|
||||
|
|
|
|||
|
|
@ -892,6 +892,9 @@ void tst_QDockWidget::task169808_setFloating()
|
|||
mw.show();
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&mw));
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Widgets are maximized on WinRT by default", Abort);
|
||||
#endif
|
||||
QCOMPARE(dw->widget()->size(), dw->widget()->sizeHint());
|
||||
|
||||
//and now we try to test if the contents margin is taken into account
|
||||
|
|
@ -934,6 +937,9 @@ void tst_QDockWidget::task248604_infiniteResize()
|
|||
d.setContentsMargins(2, 2, 2, 2);
|
||||
d.setMinimumSize(320, 240);
|
||||
d.showNormal();
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Widgets are maximized on WinRT by default", Abort);
|
||||
#endif
|
||||
QTRY_COMPARE(d.size(), QSize(320, 240));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -838,6 +838,10 @@ void tst_QDoubleSpinBox::editingFinished()
|
|||
|
||||
testFocusWidget->show();
|
||||
testFocusWidget->activateWindow();
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Widget does not get another activation on WinRT as it's already visible.",
|
||||
Continue);
|
||||
#endif
|
||||
QVERIFY(QTest::qWaitForWindowActive(testFocusWidget));
|
||||
box->setFocus();
|
||||
QTRY_VERIFY(box->hasFocus());
|
||||
|
|
@ -879,6 +883,9 @@ void tst_QDoubleSpinBox::editingFinished()
|
|||
QCOMPARE(editingFinishedSpy2.count(), 3);
|
||||
testFocusWidget->hide();
|
||||
QCOMPARE(editingFinishedSpy1.count(), 4);
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Hide does not trigger signal on WinRT - QTBUG-68297.", Continue);
|
||||
#endif
|
||||
QCOMPARE(editingFinishedSpy2.count(), 4);
|
||||
|
||||
// On some platforms this is our root window
|
||||
|
|
|
|||
|
|
@ -4753,6 +4753,9 @@ void tst_QLineEdit::testQuickSelectionWithMouse()
|
|||
QTest::mousePress(lineEdit.windowHandle(), Qt::LeftButton, Qt::NoModifier, center);
|
||||
QTest::mouseMove(lineEdit.windowHandle(), center + QPoint(20, 0));
|
||||
qCDebug(lcTests) << "Selected text:" << lineEdit.selectedText();
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "WinRT does not support QTest::mousePress/-Move", Abort);
|
||||
#endif
|
||||
QVERIFY(!lineEdit.selectedText().isEmpty());
|
||||
QVERIFY(!lineEdit.selectedText().endsWith(suffix));
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
[resizeDocks]
|
||||
winrt
|
||||
|
|
@ -1782,6 +1782,9 @@ void tst_QMainWindow::centralWidgetSize()
|
|||
mainWindow.setCentralWidget(&widget);
|
||||
|
||||
mainWindow.show();
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Widgets are maximized by default on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QTRY_COMPARE(widget.size(), widget.sizeHint());
|
||||
}
|
||||
|
||||
|
|
@ -1826,6 +1829,9 @@ void tst_QMainWindow::fixedSizeCentralWidget()
|
|||
|
||||
// finally verify that we get the space back when we resize to the old size
|
||||
mainWindow.resize(mwSize);
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "QMainWindow::resize does not work on WinRT", Continue);
|
||||
#endif
|
||||
QTRY_COMPARE(child->height(), childHeight);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -357,6 +357,9 @@ void tst_QMdiArea::subWindowActivated()
|
|||
QMdiSubWindow *window = windows.at(i);
|
||||
window->showNormal();
|
||||
qApp->processEvents();
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("data2", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QVERIFY( window == activeWindow );
|
||||
QVERIFY( activeWindow == workspace->activeSubWindow() );
|
||||
}
|
||||
|
|
@ -517,6 +520,9 @@ void tst_QMdiArea::subWindowActivated2()
|
|||
mdiArea.showNormal();
|
||||
mdiArea.activateWindow();
|
||||
QVERIFY(QTest::qWaitForWindowActive(&mdiArea));
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QTRY_COMPARE(spy.count(), 1);
|
||||
QCOMPARE(mdiArea.activeSubWindow(), activeSubWindow);
|
||||
spy.clear();
|
||||
|
|
@ -1191,6 +1197,9 @@ void tst_QMdiArea::addAndRemoveWindows()
|
|||
// Don't occupy space.
|
||||
QMdiSubWindow *window3 = workspace.addSubWindow(new QWidget);
|
||||
window3->show();
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Windows are maximized by default on WinRT", Abort);
|
||||
#endif
|
||||
QCOMPARE(window3->geometry().topLeft(), QPoint(window2RestoreGeometry.right() + 1, 0));
|
||||
}
|
||||
|
||||
|
|
@ -1451,6 +1460,9 @@ void tst_QMdiArea::subWindowList()
|
|||
QList<QMdiSubWindow *> widgets = workspace.subWindowList(windowOrder);
|
||||
QCOMPARE(widgets.count(), windowCount);
|
||||
if (windowOrder == QMdiArea::StackingOrder) {
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QCOMPARE(widgets.at(widgets.count() - 1), windows[staysOnTop2]);
|
||||
QCOMPARE(widgets.at(widgets.count() - 2), windows[staysOnTop1]);
|
||||
QCOMPARE(widgets.at(widgets.count() - 3), windows[activeSubWindow]);
|
||||
|
|
@ -1666,6 +1678,9 @@ void tst_QMdiArea::tileSubWindows()
|
|||
// Re-tile.
|
||||
workspace.tileSubWindows();
|
||||
workspace.setActiveSubWindow(0);
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QCOMPARE(workspace.viewport()->childrenRect(), workspace.viewport()->rect());
|
||||
|
||||
// Cascade and verify that the views are not tiled anymore.
|
||||
|
|
@ -1965,6 +1980,9 @@ void tst_QMdiArea::dontMaximizeSubWindowOnActivation()
|
|||
// Verify that new windows are not maximized.
|
||||
mdiArea.addSubWindow(new QWidget)->show();
|
||||
QVERIFY(mdiArea.activeSubWindow());
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QVERIFY(!mdiArea.activeSubWindow()->isMaximized());
|
||||
}
|
||||
|
||||
|
|
@ -1986,6 +2004,9 @@ void tst_QMdiArea::delayedPlacement()
|
|||
QVERIFY(QTest::qWaitForWindowExposed(&mdiArea));
|
||||
|
||||
QCOMPARE(window1->geometry().topLeft(), QPoint(0, 0));
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QCOMPARE(window2->geometry().topLeft(), window1->geometry().topRight() + QPoint(1, 0));
|
||||
QCOMPARE(window3->geometry().topLeft(), window2->geometry().topRight() + QPoint(1, 0));
|
||||
}
|
||||
|
|
@ -2117,6 +2138,10 @@ void tst_QMdiArea::updateScrollBars()
|
|||
subWindow1->showNormal();
|
||||
qApp->processEvents();
|
||||
QVERIFY(!subWindow1->isMaximized());
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Widgets are maximized by default on WinRT, so scroll bars might not be"
|
||||
"visible", Abort);
|
||||
#endif
|
||||
QVERIFY(hbar->style()->styleHint(QStyle::SH_ScrollBar_Transient) || hbar->isVisible());
|
||||
QVERIFY(vbar->style()->styleHint(QStyle::SH_ScrollBar_Transient) || vbar->isVisible());
|
||||
if (i == 0) {
|
||||
|
|
@ -2318,6 +2343,10 @@ void tst_QMdiArea::setViewMode()
|
|||
QList<QMdiSubWindow *> subWindows = mdiArea.subWindowList();
|
||||
|
||||
// Default.
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Widgets are maximized by default on WinRT, so scroll bars might not be"
|
||||
"visible", Abort);
|
||||
#endif
|
||||
QVERIFY(!activeSubWindow->isMaximized());
|
||||
QTabBar *tabBar = mdiArea.findChild<QTabBar *>();
|
||||
QVERIFY(!tabBar);
|
||||
|
|
|
|||
|
|
@ -517,6 +517,9 @@ void tst_QMdiSubWindow::emittingOfSignals()
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("windowMaximized", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QCOMPARE(count, 1);
|
||||
|
||||
window->setParent(0);
|
||||
|
|
@ -542,6 +545,9 @@ void tst_QMdiSubWindow::showShaded()
|
|||
QVERIFY(QTest::qWaitForWindowExposed(&workspace));
|
||||
|
||||
QVERIFY(!window->isShaded());
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Windows are maximized per default on WinRt ", Abort);
|
||||
#endif
|
||||
QVERIFY(!window->isMaximized());
|
||||
|
||||
QCOMPARE(window->size(), QSize(300, 300));
|
||||
|
|
@ -634,6 +640,10 @@ void tst_QMdiSubWindow::showNormal()
|
|||
qApp->processEvents();
|
||||
window->showNormal();
|
||||
qApp->processEvents();
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("showMinimized", "Windows are maximized per default on WinRt ", Abort);
|
||||
QEXPECT_FAIL("showMaximized", "Windows are maximized per default on WinRt ", Abort);
|
||||
#endif
|
||||
QCOMPARE(window->geometry(), originalGeometry);
|
||||
}
|
||||
|
||||
|
|
@ -740,6 +750,9 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove()
|
|||
|
||||
// Leave resize mode
|
||||
sendMouseRelease(mouseReceiver, mousePosition);
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QCOMPARE(resizeSpy.count(), expectedGeometryCount);
|
||||
QCOMPARE(window->size(), windowSize + QSize(geometryCount, geometryCount));
|
||||
}
|
||||
|
|
@ -903,6 +916,9 @@ void tst_QMdiSubWindow::mouseDoubleClick()
|
|||
workspace.show();
|
||||
window->show();
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Windows are maximized per default on WinRt ", Abort);
|
||||
#endif
|
||||
QVERIFY(!window->isMaximized());
|
||||
QVERIFY(!window->isShaded());
|
||||
|
||||
|
|
@ -971,6 +987,9 @@ void tst_QMdiSubWindow::setSystemMenu()
|
|||
QVERIFY(!qApp->activePopupWidget());
|
||||
subWindow->showSystemMenu();
|
||||
QTRY_COMPARE(qApp->activePopupWidget(), qobject_cast<QWidget *>(systemMenu));
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QTRY_COMPARE(systemMenu->mapToGlobal(QPoint(0, 0)),
|
||||
(globalPopupPos = subWindow->mapToGlobal(subWindow->contentsRect().topLeft())) );
|
||||
|
||||
|
|
@ -1196,6 +1215,9 @@ void tst_QMdiSubWindow::restoreFocusOverCreation()
|
|||
QTRY_COMPARE(QApplication::focusWidget(), subWidget2->m_lineEdit1);
|
||||
|
||||
mdiArea.setActiveSubWindow(subWindow1);
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Broken on WinRt - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QTRY_COMPARE(QApplication::focusWidget(), subWidget1->m_lineEdit2);
|
||||
}
|
||||
|
||||
|
|
@ -1404,6 +1426,9 @@ void tst_QMdiSubWindow::resizeEvents()
|
|||
QCOMPARE(window->widget()->windowState(), windowState);
|
||||
|
||||
// Make sure we got as many resize events as expected.
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("maximized", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QCOMPARE(windowResizeEventSpy.count(), expectedWindowResizeEvents);
|
||||
QCOMPARE(widgetResizeEventSpy.count(), expectedWidgetResizeEvents);
|
||||
windowResizeEventSpy.clear();
|
||||
|
|
@ -1413,6 +1438,10 @@ void tst_QMdiSubWindow::resizeEvents()
|
|||
window->showNormal();
|
||||
|
||||
// Check that the window state is correct.
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("minimized", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
QEXPECT_FAIL("shaded", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QCOMPARE(window->windowState(), Qt::WindowNoState | Qt::WindowActive);
|
||||
QCOMPARE(window->widget()->windowState(), Qt::WindowNoState);
|
||||
|
||||
|
|
@ -1673,6 +1702,9 @@ void tst_QMdiSubWindow::fixedMinMaxSize()
|
|||
QCOMPARE(subWindow->maximumSize(), maximumSize);
|
||||
mdiArea.addSubWindow(subWindow);
|
||||
subWindow->show();
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Windows are maximized per default on WinRt ", Abort);
|
||||
#endif
|
||||
QCOMPARE(subWindow->size(), minimumSize);
|
||||
|
||||
// Calculate the size of a minimized sub window.
|
||||
|
|
@ -2057,6 +2089,9 @@ void tst_QMdiSubWindow::testFullScreenState()
|
|||
subWindow->showFullScreen(); // QMdiSubWindow does not support the fullscreen state. This call
|
||||
// should be equivalent to setVisible(true) (and not showNormal())
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&mdiArea));
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Windows are maximized per default on WinRt ", Abort);
|
||||
#endif
|
||||
QCOMPARE(subWindow->size(), QSize(300, 300));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,3 +10,5 @@ osx ci
|
|||
osx
|
||||
[tearOff]
|
||||
osx
|
||||
[activeSubMenuPosition]
|
||||
winrt
|
||||
|
|
|
|||
|
|
@ -843,6 +843,10 @@ private:
|
|||
|
||||
void tst_QMenu::activeSubMenuPositionExec()
|
||||
{
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
QSKIP("Broken on WinRT - QTBUG-68297");
|
||||
#endif
|
||||
SubMenuPositionExecMenu menu;
|
||||
menu.exec(QGuiApplication::primaryScreen()->availableGeometry().center());
|
||||
}
|
||||
|
|
@ -1079,6 +1083,9 @@ void tst_QMenu::pushButtonPopulateOnAboutToShow()
|
|||
|
||||
QTimer::singleShot(300, buttonMenu, SLOT(hide()));
|
||||
QTest::mouseClick(&b, Qt::LeftButton, Qt::NoModifier, b.rect().center());
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "WinRT does not support QTest::mouseClick", Abort);
|
||||
#endif
|
||||
QVERIFY2(!buttonMenu->geometry().intersects(b.geometry()), msgGeometryIntersects(buttonMenu->geometry(), b.geometry()));
|
||||
|
||||
// note: we're assuming that, if we previously got the desired geometry, we'll get it here too
|
||||
|
|
@ -1177,6 +1184,9 @@ void tst_QMenu::click_while_dismissing_submenu()
|
|||
//this opens the submenu, move two times to emulate user interaction (d->motions > 0 in QMenu)
|
||||
QTest::mouseMove(menuWindow, menu.rect().center() + QPoint(0,2));
|
||||
QTest::mouseMove(menuWindow, menu.rect().center() + QPoint(1,3), 60);
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "WinRT does not support QTest::mouseMove", Abort);
|
||||
#endif
|
||||
QVERIFY(menuShownSpy.wait());
|
||||
QVERIFY(sub.isVisible());
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&sub));
|
||||
|
|
@ -1273,6 +1283,9 @@ void tst_QMenu::QTBUG47515_widgetActionEnterLeave()
|
|||
QTest::mouseMove(topLevelWindow, w1Center);
|
||||
QVERIFY(w1->isVisible());
|
||||
QTRY_COMPARE(w1->leave, 0);
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "WinRT does not support QTest::mouseMove", Abort);
|
||||
#endif
|
||||
QTRY_COMPARE(w1->enter, 1);
|
||||
|
||||
// Check whether leave event is not delivered on mouse move
|
||||
|
|
@ -1398,6 +1411,9 @@ void tst_QMenu::QTBUG_56917_wideMenuSize()
|
|||
menu.popup(QPoint());
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&menu));
|
||||
QVERIFY(menu.isVisible());
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QVERIFY(menu.height() <= menuSizeHint.height());
|
||||
}
|
||||
|
||||
|
|
@ -1533,6 +1549,9 @@ void tst_QMenu::menuSize_Scrolling()
|
|||
getContentsMargins(&leftMargin, &topMargin, &rightMargin, &bottomMargin);
|
||||
QRect lastItem = actionGeometry(actions().at(actions().length() - 1));
|
||||
QSize s = size();
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QCOMPARE( s.width(), lastItem.right() + fw + hmargin + rightMargin + 1);
|
||||
QMenu::showEvent(e);
|
||||
}
|
||||
|
|
@ -1601,6 +1620,12 @@ void tst_QMenu::menuSize_Scrolling()
|
|||
return;
|
||||
|
||||
QTest::keyClick(&menu, Qt::Key_End);
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("data8", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
QEXPECT_FAIL("data9", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
QEXPECT_FAIL("data10", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
QEXPECT_FAIL("data11", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QTRY_COMPARE(menu.actionGeometry(actions.last()).right(),
|
||||
menu.width() - mm.fw - mm.hmargin - leftMargin - 1);
|
||||
QCOMPARE(menu.actionGeometry(actions.last()).bottom(),
|
||||
|
|
|
|||
|
|
@ -4,3 +4,5 @@ ubuntu-16.04
|
|||
ubuntu-18.04
|
||||
[activatedCount]
|
||||
*
|
||||
[QTBUG_65488_hiddenActionTriggered]
|
||||
winrt
|
||||
|
|
|
|||
|
|
@ -1184,6 +1184,9 @@ void tst_QMenuBar::check_menuPosition()
|
|||
mbItemRect.moveTo(w.menuBar()->mapToGlobal(mbItemRect.topLeft()));
|
||||
QTest::keyClick(&w, Qt::Key_M, Qt::AltModifier );
|
||||
QVERIFY(menu.isActiveWindow());
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "QTest::keyClick does not work on WinRT.", Abort);
|
||||
#endif
|
||||
QCOMPARE(menu.pos(), QPoint(mbItemRect.x(), mbItemRect.top() - menu.height()));
|
||||
menu.close();
|
||||
}
|
||||
|
|
@ -1512,6 +1515,9 @@ void tst_QMenuBar::cornerWidgets()
|
|||
case Qt::TopLeftCorner:
|
||||
QVERIFY2(fileMenuGeometry.left() >= cornerWidgetWidth,
|
||||
msgComparison(fileMenuGeometry.left(), ">=", cornerWidgetWidth));
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QVERIFY2(menuBarWidth - editMenuGeometry.right() < cornerWidgetWidth,
|
||||
msgComparison(menuBarWidth - editMenuGeometry.right(), "<", cornerWidgetWidth));
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1352,6 +1352,9 @@ void tst_QPlainTextEdit::adjustScrollbars()
|
|||
QLatin1String txt("\nabc def ghi jkl mno pqr stu vwx");
|
||||
ed->setPlainText(txt + txt + txt + txt);
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "WinRT does not support setMinimum/MaximumSize", Abort);
|
||||
#endif
|
||||
QVERIFY(ed->verticalScrollBar()->maximum() > 0);
|
||||
|
||||
ed->moveCursor(QTextCursor::End);
|
||||
|
|
|
|||
|
|
@ -255,6 +255,9 @@ void tst_QProgressBar::setMinMaxRepaint()
|
|||
pbar.repainted = false;
|
||||
pbar.setMinimum(0);
|
||||
QTest::qWait(50);
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QTRY_VERIFY(!pbar.repainted);
|
||||
|
||||
// No repaint when setting maximum to the current maximum
|
||||
|
|
|
|||
|
|
@ -507,7 +507,7 @@ void tst_QPushButton::sizeHint_data()
|
|||
#if !defined(QT_NO_STYLE_FUSION)
|
||||
QTest::newRow("fusion") << QString::fromLatin1("fusion");
|
||||
#endif
|
||||
#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA)
|
||||
#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA) && !defined(Q_OS_WINRT)
|
||||
QTest::newRow("windowsvista") << QString::fromLatin1("windowsvista");
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,9 @@ void tst_QSizeGrip::hideAndShowOnWindowStateChange_data()
|
|||
void tst_QSizeGrip::hideAndShowOnWindowStateChange()
|
||||
{
|
||||
QFETCH(Qt::WindowType, windowType);
|
||||
#ifdef Q_OS_WINRT
|
||||
QSKIP("Broken on WinRT - QTBUG-68297");
|
||||
#endif
|
||||
|
||||
QWidget *parentWidget = windowType == Qt::Window ? 0 : new QWidget;
|
||||
TestWidget *widget = new TestWidget(parentWidget, Qt::WindowFlags(windowType));
|
||||
|
|
@ -152,6 +155,10 @@ void tst_QSizeGrip::hideAndShowOnWindowStateChange()
|
|||
|
||||
void tst_QSizeGrip::orientation()
|
||||
{
|
||||
#ifdef Q_OS_WINRT
|
||||
QSKIP("Broken on WinRT - QTBUG-68297");
|
||||
#endif
|
||||
|
||||
TestWidget widget;
|
||||
widget.setLayout(new QVBoxLayout);
|
||||
QSizeGrip *sizeGrip = new QSizeGrip(&widget);
|
||||
|
|
@ -198,7 +205,9 @@ void tst_QSizeGrip::dontCrashOnTLWChange()
|
|||
|
||||
// the above setup causes a change of TLW for the size grip,
|
||||
// and it must not crash.
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&mdiArea));
|
||||
QVERIFY(QTest::qWaitForWindowExposed(mw));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -466,13 +466,17 @@ void tst_QSpinBox::setReadOnly()
|
|||
QTest::keyClick(&spin, Qt::Key_Up);
|
||||
QCOMPARE(spin.value(), 1);
|
||||
spin.setReadOnly(true);
|
||||
#ifndef Q_OS_WINRT // QTBUG-68297
|
||||
QCOMPARE(spin.eventsReceived, QList<QEvent::Type>() << QEvent::ReadOnlyChange);
|
||||
#endif
|
||||
QTest::keyClick(&spin, Qt::Key_Up);
|
||||
QCOMPARE(spin.value(), 1);
|
||||
spin.stepBy(1);
|
||||
QCOMPARE(spin.value(), 2);
|
||||
spin.setReadOnly(false);
|
||||
#ifndef Q_OS_WINRT // QTBUG-68297
|
||||
QCOMPARE(spin.eventsReceived, QList<QEvent::Type>() << QEvent::ReadOnlyChange << QEvent::ReadOnlyChange);
|
||||
#endif
|
||||
QTest::keyClick(&spin, Qt::Key_Up);
|
||||
QCOMPARE(spin.value(), 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -773,12 +773,16 @@ void tst_QSplitter::replaceWidget()
|
|||
const int expectedResizeCount = visible ? 1 : 0; // new widget only
|
||||
const int expectedPaintCount = visible && !collapsed ? 2 : 0; // splitter and new widget
|
||||
QTRY_COMPARE(ef.resizeCount, expectedResizeCount);
|
||||
#ifndef Q_OS_WINRT // QTBUG-68297
|
||||
QTRY_COMPARE(ef.paintCount, expectedPaintCount);
|
||||
#endif
|
||||
QCOMPARE(newWidget->parentWidget(), &sp);
|
||||
QCOMPARE(newWidget->isVisible(), visible);
|
||||
if (visible && !collapsed)
|
||||
QCOMPARE(newWidget->geometry(), oldGeom);
|
||||
#ifndef Q_OS_WINRT // QTBUG-68297
|
||||
QCOMPARE(newWidget->size().isEmpty(), !visible || collapsed);
|
||||
#endif
|
||||
delete res;
|
||||
}
|
||||
QCOMPARE(sp.count(), count);
|
||||
|
|
@ -830,7 +834,9 @@ void tst_QSplitter::replaceWidgetWithSplitterChild()
|
|||
QTRY_VERIFY(ef.resizeCount > 0);
|
||||
QTRY_VERIFY(ef.paintCount > 0);
|
||||
QCOMPARE(sp.count(), count + 1);
|
||||
#ifndef Q_OS_WINRT // QTBUG-68297
|
||||
QCOMPARE(sp.sizes().mid(0, count), sizes);
|
||||
#endif
|
||||
QCOMPARE(sp.sizes().last(), sibling->width());
|
||||
} else {
|
||||
// No-op for the rest
|
||||
|
|
|
|||
|
|
@ -141,6 +141,9 @@ void tst_QStatusBar::setSizeGripEnabled()
|
|||
QTRY_VERIFY(statusBar->isVisible());
|
||||
QPointer<QSizeGrip> sizeGrip = statusBar->findChild<QSizeGrip *>();
|
||||
QVERIFY(sizeGrip);
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QVERIFY(sizeGrip->isVisible());
|
||||
|
||||
statusBar->setSizeGripEnabled(true);
|
||||
|
|
|
|||
|
|
@ -198,6 +198,9 @@ void tst_QTextBrowser::forwardButton()
|
|||
|
||||
browser->setSource(QUrl("pagewithoutbg.html"));
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QVERIFY(!forwardEmissions.isEmpty());
|
||||
val = forwardEmissions.takeLast()[0];
|
||||
QCOMPARE(val.type(), QVariant::Bool);
|
||||
|
|
|
|||
|
|
@ -1702,6 +1702,9 @@ void tst_QTextEdit::adjustScrollbars()
|
|||
QLatin1String txt("\nabc def ghi jkl mno pqr stu vwx");
|
||||
ed->setText(txt + txt + txt + txt);
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "setMinimum/MaximumSize does not work on WinRT", Abort);
|
||||
#endif
|
||||
QVERIFY(ed->verticalScrollBar()->maximum() > 0);
|
||||
|
||||
ed->moveCursor(QTextCursor::End);
|
||||
|
|
@ -1882,6 +1885,9 @@ void tst_QTextEdit::copyPasteBackgroundImage()
|
|||
QBrush ba = a->cellAt(0, 0).format().background();
|
||||
QBrush bb = b->cellAt(0, 0).format().background();
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QCOMPARE(ba.style(), Qt::TexturePattern);
|
||||
QCOMPARE(ba.style(), bb.style());
|
||||
|
||||
|
|
|
|||
|
|
@ -272,6 +272,9 @@ void tst_QToolButton::qtbug_34759_sizeHintResetWhenSettingMenu()
|
|||
button1.show();
|
||||
button2.show();
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
QEXPECT_FAIL("", "Winrt does not support more than 1 native top level widget.", Abort);
|
||||
#endif
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&button1));
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&button2));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue