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/itemviews/qlistview/tst_qlistview.cpp | |
parent | 4cb795cbdbc4d117c9de623b086975ebdf1f9a15 (diff) |
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/itemviews/qlistview/tst_qlistview.cpp')
-rw-r--r-- | tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp | 48 |
1 files changed, 5 insertions, 43 deletions
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp index 651172e79f..8cefad37fc 100644 --- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp +++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp @@ -45,13 +45,13 @@ #include <QtWidgets/QStyledItemDelegate> #include <QtWidgets/QStyleFactory> -#if defined(Q_OS_WIN) || defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) # include <windows.h> # include <QtGui/QGuiApplication> #include <qpa/qplatformnativeinterface.h> #endif // Q_OS_WIN -#if defined(Q_OS_WIN) || defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) static inline HWND getHWNDForWidget(const QWidget *widget) { QWindow *window = widget->windowHandle(); @@ -83,7 +83,6 @@ class tst_QListView : public QObject Q_OBJECT private slots: - void initTestCase(); void cleanup(); void getSetCheck(); void noDelegate(); @@ -111,7 +110,7 @@ private slots: void scrollBarAsNeeded(); void moveItems(); void wordWrap(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && WINVER >= 0x0500 +#if defined(Q_OS_WIN) && WINVER >= 0x0500 void setCurrentIndexAfterAppendRowCrash(); #endif void emptyItemSize(); @@ -292,13 +291,6 @@ public: } }; -void tst_QListView::initTestCase() -{ -#ifdef Q_OS_WINCE //disable magic for WindowsCE - qApp->setAutoMaximizeThreshold(-1); -#endif -} - void tst_QListView::cleanup() { QVERIFY(QApplication::topLevelWidgets().isEmpty()); @@ -983,25 +975,6 @@ void tst_QListView::selection_data() << QRect(300, 0, 1, 300) // selection rectangle << IntList(); // expected items -#if defined(Q_OS_WINCE) - // depending on whether the display is double-pixeld, we need - // to click at a different position - bool doubledSize = false; - int dpi = GetDeviceCaps(GetDC(0), LOGPIXELSX); - if ((dpi < 1000) && (dpi > 0)) { - doubledSize = true; - } - QTest::newRow("select inside contents, (on viewport)") - << 35 // itemCount - << int(QListView::ListMode) - << int(QListView::TopToBottom) - << true // wrapping - << 0 // spacing - << QSize() // gridSize - << IntList() // hiddenRows - << QRect(doubledSize?350:175,doubledSize?550:275, 1, 1)// selection rectangle - << IntList(); // expected items -#else QTest::newRow("select inside contents, (on viewport)") << 35 // itemCount << int(QListView::ListMode) @@ -1012,7 +985,6 @@ void tst_QListView::selection_data() << IntList() // hiddenRows << QRect(175, 275, 1, 1) // selection rectangle << IntList(); // expected items -#endif QTest::newRow("select a tall rect in LeftToRight flow, wrap items") << 70 // itemCount @@ -1137,17 +1109,7 @@ void tst_QListView::selection() v.setRowHidden(hiddenRows.at(j), true); } -#if defined(Q_OS_WINCE) - // If the device is double-pixeled then the scrollbars become - // 10 pixels wider than normal (Windows Style: 16, Windows Mobile Style: 26). - // So we have to make the window slightly bigger to have the same count of - // items in each row of the list view like in the other styles. - static const int dpi = ::GetDeviceCaps(GetDC(0), LOGPIXELSX); - if ((dpi < 1000) && (dpi > 0)) - v.resize(535,535); -#else v.resize(525,525); -#endif topLevel.show(); QVERIFY(QTest::qWaitForWindowExposed(&topLevel)); @@ -1449,7 +1411,7 @@ void tst_QListView::wordWrap() QTRY_COMPARE(lv.verticalScrollBar()->isVisible(), true); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) class SetCurrentIndexAfterAppendRowCrashDialog : public QDialog { Q_OBJECT @@ -1490,7 +1452,7 @@ private: }; #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) && WINVER >= 0x0500 +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && WINVER >= 0x0500 // This test only makes sense on windows 2000 and higher. void tst_QListView::setCurrentIndexAfterAppendRowCrash() { |