summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp')
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp48
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 98cc9b29ed..0f1c5723d5 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -46,13 +46,13 @@
#include <QtWidgets/QStyleFactory>
#include <QtWidgets/QVBoxLayout>
-#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();
@@ -84,7 +84,6 @@ class tst_QListView : public QObject
Q_OBJECT
private slots:
- void initTestCase();
void cleanup();
void getSetCheck();
void noDelegate();
@@ -112,7 +111,7 @@ private slots:
void scrollBarAsNeeded();
void moveItems();
void wordWrap();
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
void setCurrentIndexAfterAppendRowCrash();
#endif
void emptyItemSize();
@@ -293,13 +292,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());
@@ -984,25 +976,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)
@@ -1013,7 +986,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
@@ -1138,17 +1110,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));
@@ -1450,7 +1412,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
@@ -1501,7 +1463,7 @@ void tst_QListView::setCurrentIndexAfterAppendRowCrash()
SetCurrentIndexAfterAppendRowCrashDialog w;
w.exec();
}
-#endif // Q_OS_WIN && !Q_OS_WINCE && !Q_OS_WINRT
+#endif // Q_OS_WIN && !Q_OS_WINRT
void tst_QListView::emptyItemSize()
{