diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-03-08 15:51:15 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-04-07 10:24:45 +0000 |
commit | 115d4fc8cc1816d70f41c839d7eaa4e24ff86db2 (patch) | |
tree | a79244d8bb42aa7cd675cd6748c737e2559311c0 /tests/auto/widgets/kernel | |
parent | 4cb795cbdbc4d117c9de623b086975ebdf1f9a15 (diff) | |
download | qtbase-115d4fc8cc1816d70f41c839d7eaa4e24ff86db2.tar.gz |
QtWidgets: Remove Windows CE.
Remove Windows CE-specific files, #ifdef sections for Q_OS_WINCE and wince
.pro file clauses in library, examples and tests.
Task-number: QTBUG-51673
Change-Id: I102745aaca9d9737f2108fe7618111743d5ae980
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'tests/auto/widgets/kernel')
6 files changed, 17 insertions, 188 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/test/test.pro b/tests/auto/widgets/kernel/qapplication/test/test.pro index 908aa846c0..92409e4bfe 100644 --- a/tests/auto/widgets/kernel/qapplication/test/test.pro +++ b/tests/auto/widgets/kernel/qapplication/test/test.pro @@ -11,7 +11,7 @@ TESTDATA = ../test/test.pro ../tmp/README !winrt { SUBPROGRAMS = desktopsettingsaware modal - win32:!wince: SUBPROGRAMS += wincmdline + win32:SUBPROGRAMS += wincmdline for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}" } diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index b7e8cded7a..2a03070139 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -52,10 +52,6 @@ #include <QtWidgets/private/qapplication_p.h> #include <QtWidgets/QStyle> -#ifdef Q_OS_WINCE -#include <windows.h> -#endif - #include <qpa/qwindowsysteminterface.h> #include <private/qhighdpiscaling_p.h> @@ -235,10 +231,6 @@ static char *argv0; tst_QApplication::tst_QApplication() : quitApplicationTriggered(false) { -#ifdef Q_OS_WINCE - // Clean up environment previously to launching test - qputenv("QT_PLUGIN_PATH", QByteArray()); -#endif } void tst_QApplication::cleanup() @@ -897,19 +889,8 @@ bool isPathListIncluded(const QStringList &l, const QStringList &r) #define QT_TST_QAPP_DEBUG void tst_QApplication::libraryPaths() { -#ifndef Q_OS_WINCE const QString testDir = QFileInfo(QFINDTESTDATA("test/test.pro")).absolutePath(); QVERIFY(!testDir.isEmpty()); -#else // !Q_OS_WINCE - // On Windows CE we need QApplication object to have valid - // current Path. Therefore we need to identify it ourselves - // here for the test. - QFileInfo filePath; - wchar_t module_name[MAX_PATH]; - GetModuleFileName(0, module_name, MAX_PATH); - filePath = QString::fromWCharArray(module_name); - const QString testDir = filePath.path() + "/test"; -#endif // Q_OS_WINCE { QApplication::setLibraryPaths(QStringList() << testDir); QCOMPARE(QApplication::libraryPaths(), (QStringList() << testDir)); @@ -1000,11 +981,7 @@ void tst_QApplication::libraryPaths() QString appDirPath = app.applicationDirPath(); app.addLibraryPath(appDirPath); -#ifdef Q_OS_WINCE - app.addLibraryPath(appDirPath + "/../.."); -#else app.addLibraryPath(appDirPath + "/.."); -#endif #ifdef QT_TST_QAPP_DEBUG qDebug() << "appDirPath" << appDirPath; qDebug() << "After adding appDirPath && appDirPath + /..:" << app.libraryPaths(); @@ -1044,15 +1021,9 @@ void tst_QApplication::libraryPaths_qt_plugin_path_2() QByteArray nonExistentPath = "/nonexistent"; QByteArray pluginPath = validPath + ':' + nonExistentPath; #elif defined(Q_OS_WIN) -# ifdef Q_OS_WINCE - QByteArray validPath = "/Temp"; - QByteArray nonExistentPath = "/nonexistent"; - QByteArray pluginPath = validPath + ';' + nonExistentPath; -# else QByteArray validPath = "C:\\windows"; QByteArray nonExistentPath = "Z:\\nonexistent"; QByteArray pluginPath = validPath + ';' + nonExistentPath; -# endif #endif { @@ -1069,9 +1040,7 @@ void tst_QApplication::libraryPaths_qt_plugin_path_2() << QLibraryInfo::location(QLibraryInfo::PluginsPath) << QDir(app.applicationDirPath()).canonicalPath() << QDir(QDir::fromNativeSeparators(QString::fromLatin1(validPath))).canonicalPath(); -# ifdef Q_OS_WINCE - expected = QSet<QString>::fromList(expected).toList(); -# endif + QVERIFY2(isPathListIncluded(app.libraryPaths(), expected), qPrintable("actual:\n - " + app.libraryPaths().join("\n - ") + "\nexpected:\n - " + expected.join("\n - "))); @@ -1091,9 +1060,6 @@ void tst_QApplication::libraryPaths_qt_plugin_path_2() QStringList() << QLibraryInfo::location(QLibraryInfo::PluginsPath) << app.applicationDirPath(); -# ifdef Q_OS_WINCE - expected = QSet<QString>::fromList(expected).toList(); -# endif QVERIFY(isPathListIncluded(app.libraryPaths(), expected)); qputenv("QT_PLUGIN_PATH", QByteArray()); @@ -1479,10 +1445,6 @@ void tst_QApplication::desktopSettingsAware() } QVERIFY2(!path.isEmpty(), "Cannot locate desktopsettingsaware helper application"); path += "desktopsettingsaware"; -#ifdef Q_OS_WINCE - int argc = 0; - QApplication tmpApp(argc, 0); -#endif QProcess testProcess; testProcess.start(path); QVERIFY2(testProcess.waitForStarted(), diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp index 07dcfca28f..f3436ca1be 100644 --- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp +++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp @@ -56,7 +56,6 @@ class tst_QGridLayout : public QObject Q_OBJECT private slots: - void initTestCase(); void cleanup(); void getItemPosition(); void itemAtPosition(); @@ -85,13 +84,6 @@ private slots: void dontCrashWhenExtendsToEnd(); }; -void tst_QGridLayout::initTestCase() -{ -#ifdef Q_OS_WINCE //disable magic for WindowsCE - qApp->setAutoMaximizeThreshold(-1); -#endif -} - static inline int visibleTopLevelWidgetCount() { int result= 0; @@ -603,19 +595,6 @@ void tst_QGridLayout::spacingsAndMargins_data() << QPoint( 20, child_offset_y) << QPoint( 20, child_offset_y + 100 + 6) ); -#if defined (Q_OS_WINCE) //There is not enough screenspace to run the test in original size on Windows CE. We use smaller widgets. - child_offset_y = 11 + 9 + 50 + 6 + 50 + 6 + 50 + 6; - QTest::newRow("1x3 grid") << 1 << 3 << QSize(50, 50) - << (PointList() // toplevel - << QPoint( 11, 11) - << QPoint( 11, 11 + 50 + 6) - << QPoint( 11, 11 + 50 + 6 + 50 + 6) - // children - << QPoint( 20, child_offset_y) - << QPoint( 20, child_offset_y + 50 + 6) - << QPoint( 20, child_offset_y + 50 + 6 + 50 + 6) - ); -#else child_offset_y = 11 + 9 + 100 + 6 + 100 + 6 + 100 + 6; QTest::newRow("1x3 grid") << 1 << 3 << QSize(100, 100) << (PointList() // toplevel @@ -627,7 +606,6 @@ void tst_QGridLayout::spacingsAndMargins_data() << QPoint( 20, child_offset_y + 100 + 6) << QPoint( 20, child_offset_y + 100 + 6 + 100 + 6) ); -#endif child_offset_y = 11 + 9 + 100 + 6 + 100 + 6; QTest::newRow("2x2 grid") << 2 << 2 << QSize(100, 100) diff --git a/tests/auto/widgets/kernel/qlayout/qlayout.pro b/tests/auto/widgets/kernel/qlayout/qlayout.pro index 2213767950..d460785158 100644 --- a/tests/auto/widgets/kernel/qlayout/qlayout.pro +++ b/tests/auto/widgets/kernel/qlayout/qlayout.pro @@ -4,13 +4,7 @@ TARGET = tst_qlayout QT += widgets widgets-private testlib SOURCES += tst_qlayout.cpp -wince* { - addFiles.files = baseline - addFiles.path = . - DEPLOYMENT += addFiles -} else { - TESTDATA += baseline/* -} +TESTDATA += baseline/* android { RESOURCES += \ diff --git a/tests/auto/widgets/kernel/qwidget/qwidget.pro b/tests/auto/widgets/kernel/qwidget/qwidget.pro index a3fd622896..ba4e51a416 100644 --- a/tests/auto/widgets/kernel/qwidget/qwidget.pro +++ b/tests/auto/widgets/kernel/qwidget/qwidget.pro @@ -20,4 +20,4 @@ x11 { LIBS += $$QMAKE_LIBS_X11 } -win32:!wince:!winrt: LIBS += -luser32 -lgdi32 +win32:!winrt: LIBS += -luser32 -lgdi32 diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 1a9d7ec4d2..1c3614a46c 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -75,7 +75,7 @@ #include <QtTest/QTest> -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !Q_OS_WINRT # include <QtCore/qt_windows.h> # include <QtGui/private/qguiapplication_p.h> #include <qpa/qplatformnativeinterface.h> @@ -91,49 +91,12 @@ static HWND winHandleOf(const QWidget *w) return 0; } -# ifdef Q_OS_WINCE -# define Q_CHECK_PAINTEVENTS -# ifdef Q_OS_WINCE_WM -# include <qguifunctions_wince.h> -// taken from qguifunctions_wce.cpp -# define SPI_GETPLATFORMTYPE 257 -static bool qt_wince_is_platform(const QString &platformString) { - wchar_t tszPlatform[64]; - if (SystemParametersInfo(SPI_GETPLATFORMTYPE, - sizeof(tszPlatform)/sizeof(*tszPlatform),tszPlatform,0)) - if (0 == _tcsicmp(reinterpret_cast<const wchar_t *> (platformString.utf16()), tszPlatform)) - return true; - return false; -} -static inline bool qt_wince_is_smartphone() { return qt_wince_is_platform(QString::fromLatin1("Smartphone")); } -# endif // Q_OS_WINCE_WM -# elif !defined(Q_OS_WINRT) // Q_OS_WINCE -# define Q_CHECK_PAINTEVENTS \ +# define Q_CHECK_PAINTEVENTS \ if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \ QSKIP("desktop is not visible, this test would fail"); -# else // !Q_OS_WINCE && !Q_OS_WINRT -# define Q_CHECK_PAINTEVENTS -# endif // Q_OS_WINRT -#else // Q_OS_WIN + +#else // Q_OS_WIN && !Q_OS_WINRT # define Q_CHECK_PAINTEVENTS -#endif // else Q_OS_WIN - - -#if defined(Q_OS_WINCE_WM) -#include <qguifunctions_wince.h> -// taken from qguifunctions_wce.cpp -#define SPI_GETPLATFORMTYPE 257 -bool qt_wince_is_platform(const QString &platformString) { - wchar_t tszPlatform[64]; - if (SystemParametersInfo(SPI_GETPLATFORMTYPE, - sizeof(tszPlatform)/sizeof(*tszPlatform),tszPlatform,0)) - if (0 == _tcsicmp(reinterpret_cast<const wchar_t *> (platformString.utf16()), tszPlatform)) - return true; - return false; -} -bool qt_wince_is_smartphone() { - return qt_wince_is_platform(QString::fromLatin1("Smartphone")); -} #endif #ifdef Q_OS_MAC @@ -163,7 +126,7 @@ static inline void centerOnScreen(QWidget *w) w->move(QGuiApplication::primaryScreen()->availableGeometry().center() - offset); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) static inline void setWindowsAnimationsEnabled(bool enabled) { ANIMATIONINFO animation = { sizeof(ANIMATIONINFO), enabled }; @@ -176,10 +139,10 @@ static inline bool windowsAnimationsEnabled() SystemParametersInfo(SPI_GETANIMATION, 0, &animation, 0); return animation.iMinAnimate; } -#else // Q_OS_WIN && !Q_OS_WINCE && !Q_OS_WINRT +#else // Q_OS_WIN && !Q_OS_WINRT inline void setWindowsAnimationsEnabled(bool) {} static inline bool windowsAnimationsEnabled() { return false; } -#endif // !Q_OS_WIN || Q_OS_WINCE || Q_OS_WINRT +#endif // !Q_OS_WIN || Q_OS_WINRT template <class T> static QByteArray msgComparisonFailed(T v1, const char *op, T v2) @@ -251,9 +214,7 @@ private slots: void hideWhenFocusWidgetIsChild(); void normalGeometry(); void setGeometry(); -#ifndef Q_OS_WINCE void windowOpacity(); -#endif void raise(); void lower(); void stackUnder(); @@ -315,7 +276,7 @@ private slots: void subtractOpaqueSiblings(); -#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) +#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT) void setGeometry_win(); #endif @@ -340,9 +301,7 @@ private slots: void render_task188133(); void render_task211796(); void render_task217815(); -#ifndef Q_OS_WINCE void render_windowOpacity(); -#endif void render_systemClip(); void render_systemClip2_data(); void render_systemClip2(); @@ -358,9 +317,7 @@ private slots: void repaintWhenChildDeleted(); void hideOpaqueChildWhileHidden(); -#if !defined(Q_OS_WINCE) void updateWhileMinimized(); -#endif void alienWidgets(); void adjustSize(); void adjustSize_data(); @@ -408,9 +365,7 @@ private slots: void toplevelLineEditFocus(); void focusWidget_task254563(); -#ifndef Q_OS_WINCE_WM void rectOutsideCoordinatesLimit_task144779(); -#endif void setGraphicsEffect(); #ifdef QT_BUILD_INTERNAL @@ -613,7 +568,7 @@ void tst_QWidget::getSetCheck() QCOMPARE(true, obj1.autoFillBackground()); var1.reset(); -#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) +#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT) obj1.setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint); const HWND handle = reinterpret_cast<HWND>(obj1.winId()); // explicitly create window handle QVERIFY(GetWindowLong(handle, GWL_STYLE) & WS_POPUP); @@ -657,9 +612,6 @@ private: void tst_QWidget::initTestCase() { -#ifdef Q_OS_WINCE //disable magic for WindowsCE - qApp->setAutoMaximizeThreshold(-1); -#endif // Size of reference widget, 200 for < 2000, scale up for larger screens // to avoid Windows warnings about minimum size for decorated windows. int width = 200; @@ -1507,7 +1459,7 @@ void tst_QWidget::mapFromAndTo() subWindow2->setGeometry(75, 75, 100, 100); subSubWindow->setGeometry(10, 10, 10, 10); -#if !defined(Q_OS_WINCE) && !defined(Q_OS_QNX) +#if !defined(Q_OS_QNX) //update visibility if (windowMinimized) { if (!windowHidden) { @@ -1820,15 +1772,8 @@ void tst_QWidget::activation() { Q_CHECK_PAINTEVENTS -#if defined(Q_OS_WINCE) - int waitTime = 1000; -#else int waitTime = 100; -#endif -#ifdef Q_OS_WINCE - qApp->processEvents(); -#endif QWidget widget1; widget1.setObjectName("activation-Widget1"); widget1.setWindowTitle(widget1.objectName()); @@ -1876,10 +1821,6 @@ void tst_QWidget::windowState() size = QGuiApplication::primaryScreen()->size(); } else { pos = QPoint(10, 10); -#ifdef Q_OS_WINCE_WM - if (qt_wince_is_smartphone()) { //small screen - size = QSize(100,100); -#endif } QWidget widget1; @@ -2407,11 +2348,7 @@ void tst_QWidget::reparent() childTLW.show(); QVERIFY(QTest::qWaitForWindowExposed(&parent)); -#ifdef Q_OS_WINCE - parent.move(50, 50); -#else parent.move(parentPosition); -#endif QPoint childPos = parent.mapToGlobal(child.pos()); QPoint tlwPos = childTLW.pos(); @@ -2618,8 +2555,6 @@ void tst_QWidget::setGeometry() QCOMPARE(tlw.geometry(), tr); } -// Windows CE does not support windowOpacity. -#ifndef Q_OS_WINCE void tst_QWidget::windowOpacity() { QWidget widget; @@ -2650,7 +2585,6 @@ void tst_QWidget::windowOpacity() child.setWindowOpacity(-1.0); QCOMPARE(child.windowOpacity(), 1.0); } -#endif class UpdateWidget : public QWidget { @@ -2970,9 +2904,6 @@ void tst_QWidget::stackUnder() foreach (UpdateWidget *child, allChildren) { int expectedZOrderChangeEvents = child == child1 ? 1 : 0; if (child == child3) { -#ifdef Q_OS_WINCE - qApp->processEvents(); -#endif #ifndef Q_OS_MAC QEXPECT_FAIL(0, "See QTBUG-493", Continue); #endif @@ -3342,9 +3273,6 @@ void tst_QWidget::widgetAt() w2->setMask(rgn); qApp->processEvents(); QTest::qWait(10); -#if defined(Q_OS_WINCE) - QEXPECT_FAIL("", "Windows CE does only support rectangular regions", Continue); //See also task 147191 -#endif QTRY_VERIFY((wr = QApplication::widgetAt(testPos))); QTRY_COMPARE(wr->objectName(), w1->objectName()); @@ -3360,9 +3288,6 @@ void tst_QWidget::widgetAt() w2->setMask(bitmap); qApp->processEvents(); QTest::qWait(10); -#if defined(Q_OS_WINCE) - QEXPECT_FAIL("", "Windows CE does only support rectangular regions", Continue); //See also task 147191 -#endif QTRY_COMPARE(QApplication::widgetAt(testPos), w1.data()); QTRY_VERIFY(QApplication::widgetAt(testPos + QPoint(1, 1)) == w2.data()); } @@ -3698,7 +3623,7 @@ void tst_QWidget::optimizedResize_topLevel() topLevel.partial = false; topLevel.paintedRegion = QRegion(); -#if !defined(Q_OS_WIN32) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_WIN32) topLevel.resize(topLevel.size() + QSize(10, 10)); #else // Static contents does not work when programmatically resizing @@ -3769,7 +3694,6 @@ void tst_QWidget::setMinimumSize() // Setting a minimum size larger than the desktop does not work on WinCE, // so skip this part of the test. -#ifndef Q_OS_WINCE QSize nonDefaultSize = defaultSize + QSize(5,5); w.setMinimumSize(nonDefaultSize); w.showNormal(); @@ -3778,7 +3702,6 @@ void tst_QWidget::setMinimumSize() msgComparisonFailed(w.height(), ">=", nonDefaultSize.height())); QVERIFY2(w.width() >= nonDefaultSize.width(), msgComparisonFailed(w.width(), ">=", nonDefaultSize.width())); -#endif } void tst_QWidget::setMaximumSize() @@ -4714,7 +4637,7 @@ void tst_QWidget::setWindowGeometry() } } -#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) +#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT) void tst_QWidget::setGeometry_win() { QWidget widget; @@ -4735,7 +4658,7 @@ void tst_QWidget::setGeometry_win() QVERIFY2(rt.top <= m_availableTopLeft.y(), msgComparisonFailed(int(rt.top), "<=", m_availableTopLeft.y())); } -#endif // defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) +#endif // defined (Q_OS_WIN) && !defined(Q_OS_WINRT) // Since X11 WindowManager operation are all async, and we have no way to know if the window // manager has finished playing with the window geometry, this test can't be reliable on X11. @@ -5060,12 +4983,8 @@ void tst_QWidget::moveChild() parent.setStyle(QStyleFactory::create(QLatin1String("Windows"))); ColorWidget child(&parent, Qt::Widget, Qt::blue); -#ifndef Q_OS_WINCE parent.setGeometry(QRect(QPoint(QApplication::desktop()->availableGeometry(&parent).topLeft()) + QPoint(50, 50), QSize(200, 200))); -#else - parent.setGeometry(60, 60, 150, 150); -#endif child.setGeometry(25, 25, 50, 50); #ifndef QT_NO_CURSOR // Try to make sure the cursor is not in a taskbar area to prevent tooltips or window highlighting QCursor::setPos(parent.geometry().topRight() + QPoint(50 , 50)); @@ -5646,8 +5565,6 @@ void tst_QWidget::setToolTip() QCOMPARE(widget.toolTip(), QString()); QCOMPARE(spy.count(), 2); - // Mouse over doesn't work on Windows mobile, so skip the rest of the test for that platform. -#ifndef Q_OS_WINCE_WM for (int pass = 0; pass < 2; ++pass) { QCursor::setPos(0, 0); QScopedPointer<QWidget> popup(new QWidget(0, Qt::Popup)); @@ -5675,7 +5592,6 @@ void tst_QWidget::setToolTip() QTest::qWait(2200); // delay is 2000 QTest::mouseMove(popupWindow); } -#endif } void tst_QWidget::testWindowIconChangeEventPropagation() @@ -6754,7 +6670,6 @@ void tst_QWidget::render_task217815() } // Window Opacity is not supported on Windows CE. -#ifndef Q_OS_WINCE void tst_QWidget::render_windowOpacity() { const qreal opacity = 0.5; @@ -6827,7 +6742,6 @@ void tst_QWidget::render_windowOpacity() QCOMPARE(result, expected); } } -#endif void tst_QWidget::render_systemClip() { @@ -7285,14 +7199,10 @@ void tst_QWidget::repaintWhenChildDeleted() } #endif ColorWidget w(0, Qt::FramelessWindowHint, Qt::red); -#if !defined(Q_OS_WINCE) QPoint startPoint = QApplication::desktop()->availableGeometry(&w).topLeft(); startPoint.rx() += 50; startPoint.ry() += 50; w.setGeometry(QRect(startPoint, QSize(100, 100))); -#else - w.setGeometry(60, 60, 110, 110); -#endif w.show(); QVERIFY(QTest::qWaitForWindowExposed(&w)); QTest::qWait(10); @@ -7316,14 +7226,10 @@ void tst_QWidget::repaintWhenChildDeleted() void tst_QWidget::hideOpaqueChildWhileHidden() { ColorWidget w(0, Qt::FramelessWindowHint, Qt::red); -#if !defined(Q_OS_WINCE) QPoint startPoint = QApplication::desktop()->availableGeometry(&w).topLeft(); startPoint.rx() += 50; startPoint.ry() += 50; w.setGeometry(QRect(startPoint, QSize(100, 100))); -#else - w.setGeometry(60, 60, 110, 110); -#endif ColorWidget child(&w, Qt::Widget, Qt::blue); child.setGeometry(10, 10, 80, 80); @@ -7352,7 +7258,6 @@ void tst_QWidget::hideOpaqueChildWhileHidden() } // This test doesn't make sense without support for showMinimized(). -#if !defined(Q_OS_WINCE) void tst_QWidget::updateWhileMinimized() { if (m_platform == QStringLiteral("wayland")) @@ -7390,7 +7295,6 @@ void tst_QWidget::updateWhileMinimized() QTRY_COMPARE(widget.numPaintEvents, 1); QCOMPARE(widget.paintedRegion, QRegion(0, 0, 50, 50)); } -#endif class PaintOnScreenWidget: public QWidget { @@ -7757,13 +7661,6 @@ void tst_QWidget::adjustSize() QVERIFY2(child->size().height() < sizeHint.height(), msgComparisonFailed(child->size().height(), "<", sizeHint.height())); } else { -#if defined (Q_OS_WINCE) - if (!haveParent) { - const QRect& desktopRect = qApp->desktop()->availableGeometry(); - expectedSize.setWidth(qMin(expectedSize.width(), desktopRect.width())); - expectedSize.setHeight(qMin(expectedSize.height(), desktopRect.height())); - } -#endif QCOMPARE(child->size(), expectedSize); } if (!haveParent) @@ -9169,7 +9066,6 @@ QWidgetBackingStore* backingStore(QWidget &widget) } // Tables of 5000 elements do not make sense on Windows Mobile. -#ifndef Q_OS_WINCE_WM void tst_QWidget::rectOutsideCoordinatesLimit_task144779() { #ifndef QTEST_NO_CURSOR @@ -9211,7 +9107,6 @@ void tst_QWidget::rectOutsideCoordinatesLimit_task144779() QApplication::restoreOverrideCursor(); #endif } -#endif void tst_QWidget::setGraphicsEffect() { |