summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/compiler/compiler.pro4
-rw-r--r--tests/auto/other/gestures/gestures.pro2
-rw-r--r--tests/auto/other/gestures/tst_gestures.cpp5
-rw-r--r--tests/auto/other/lancelot/paintcommands.cpp15
-rw-r--r--tests/auto/other/lancelot/tst_lancelot.cpp28
-rw-r--r--tests/auto/other/languagechange/tst_languagechange.cpp12
-rw-r--r--tests/auto/other/networkselftest/tst_networkselftest.cpp2
-rw-r--r--tests/auto/other/other.pro9
-rw-r--r--tests/auto/other/qaccessibility/qaccessibility.pro8
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp41
-rw-r--r--tests/auto/other/qaccessibilitylinux/qaccessibilitylinux.pro7
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp30
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp26
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp26
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp30
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp26
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp30
-rw-r--r--tests/auto/other/toolsupport/tst_toolsupport.cpp21
-rw-r--r--tests/auto/other/windowsmobile/test/ddhelper.cpp148
-rw-r--r--tests/auto/other/windowsmobile/test/ddhelper.h49
-rw-r--r--tests/auto/other/windowsmobile/test/test.pro23
-rw-r--r--tests/auto/other/windowsmobile/test/testQMenuBar_current.pngbin22964 -> 0 bytes
-rw-r--r--tests/auto/other/windowsmobile/test/testSimpleWidget_current.pngbin23841 -> 0 bytes
-rw-r--r--tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp195
-rw-r--r--tests/auto/other/windowsmobile/test/windowsmobile.qrc6
-rw-r--r--tests/auto/other/windowsmobile/testQMenuBar/main.cpp98
-rw-r--r--tests/auto/other/windowsmobile/testQMenuBar/testQMenuBar.pro5
-rw-r--r--tests/auto/other/windowsmobile/windowsmobile.pro9
28 files changed, 159 insertions, 696 deletions
diff --git a/tests/auto/other/compiler/compiler.pro b/tests/auto/other/compiler/compiler.pro
index 19f86582e9..5a00e53878 100644
--- a/tests/auto/other/compiler/compiler.pro
+++ b/tests/auto/other/compiler/compiler.pro
@@ -3,7 +3,7 @@ TARGET = tst_compiler
SOURCES += tst_compiler.cpp baseclass.cpp derivedclass.cpp othersource.cpp
HEADERS += baseclass.h derivedclass.h
QT = core testlib
-contains(QT_CONFIG, c++11): CONFIG += c++11
-contains(QT_CONFIG, c++14): CONFIG += c++14
+qtConfig(c++11): CONFIG += c++11
+qtConfig(c++14): CONFIG += c++14
diff --git a/tests/auto/other/gestures/gestures.pro b/tests/auto/other/gestures/gestures.pro
index 3d0ef7c745..0ec0435f62 100644
--- a/tests/auto/other/gestures/gestures.pro
+++ b/tests/auto/other/gestures/gestures.pro
@@ -1,4 +1,4 @@
CONFIG += testcase
TARGET = tst_gestures
-QT += widgets testlib gui-private
+QT += widgets testlib
SOURCES += tst_gestures.cpp
diff --git a/tests/auto/other/gestures/tst_gestures.cpp b/tests/auto/other/gestures/tst_gestures.cpp
index 59b285b032..d153146574 100644
--- a/tests/auto/other/gestures/tst_gestures.cpp
+++ b/tests/auto/other/gestures/tst_gestures.cpp
@@ -40,7 +40,6 @@
#include <qgraphicswidget.h>
#include <qgraphicsview.h>
#include <qmainwindow.h>
-#include <qpa/qwindowsysteminterface.h>
#include <qdebug.h>
@@ -2318,9 +2317,7 @@ void tst_Gestures::bug_13501_gesture_not_accepted()
w.show();
QVERIFY(waitForWindowExposed(&w));
//QTest::mousePress(&ignoreEvent, Qt::LeftButton);
- QTouchDevice *device = new QTouchDevice;
- device->setType(QTouchDevice::TouchScreen);
- QWindowSystemInterface::registerTouchDevice(device);
+ QTouchDevice *device = QTest::createTouchDevice();
QTest::touchEvent(&w, device).press(0, QPoint(10, 10), &w);
}
diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/auto/other/lancelot/paintcommands.cpp
index 0b1471c4b1..2e6cb09aa5 100644
--- a/tests/auto/other/lancelot/paintcommands.cpp
+++ b/tests/auto/other/lancelot/paintcommands.cpp
@@ -165,7 +165,16 @@ const char *PaintCommands::imageFormatTable[] = {
"Format_ARGB8555_Premultiplied",
"Format_RGB888",
"Format_RGB444",
- "Format_ARGB4444_Premultiplied"
+ "Format_ARGB4444_Premultiplied",
+ "Format_RGBX8888",
+ "Format_RGBA8888",
+ "Format_RGBA8888_Premultiplied",
+ "Format_BGR30",
+ "Format_A2BGR30_Premultiplied",
+ "Format_RGB30",
+ "Format_A2RGB30_Premultiplied",
+ "Alpha8",
+ "Grayscale8",
};
int PaintCommands::translateEnum(const char *table[], const QString &pattern, int limit)
@@ -2384,7 +2393,7 @@ void PaintCommands::command_surface_begin(QRegExp re)
m_painter->fillRect(QRect(0, 0, qRound(w), qRound(h)), Qt::transparent);
m_painter->restore();
#endif
-#ifdef Q_DEAD_CODE_FROM_QT4_X11
+#if 0 // Used to be included in Qt4 for Q_WS_X11
} else if (m_type == WidgetType) {
m_surface_pixmap = QPixmap(qRound(w), qRound(h));
m_surface_pixmap.fill(Qt::transparent);
@@ -2435,7 +2444,7 @@ void PaintCommands::command_surface_end(QRegExp)
m_painter->beginNativePainting();
m_painter->endNativePainting();
#endif
-#ifdef Q_DEAD_CODE_FROM_QT4_X11
+#if 0 // Used to be included in Qt4 for Q_WS_X11
} else if (m_type == WidgetType) {
m_painter->drawPixmap(m_surface_rect.topLeft(), m_surface_pixmap);
m_surface_pixmap = QPixmap();
diff --git a/tests/auto/other/lancelot/tst_lancelot.cpp b/tests/auto/other/lancelot/tst_lancelot.cpp
index 81c5926f3a..8fc0521102 100644
--- a/tests/auto/other/lancelot/tst_lancelot.cpp
+++ b/tests/auto/other/lancelot/tst_lancelot.cpp
@@ -71,6 +71,10 @@ private slots:
void testRasterRGB32();
void testRasterRGB16_data();
void testRasterRGB16();
+ void testRasterA2RGB30PM_data();
+ void testRasterA2RGB30PM();
+ void testRasterBGR30_data();
+ void testRasterBGR30();
void testRasterARGB8565PM_data();
void testRasterARGB8565PM();
void testRasterGrayscale8_data();
@@ -154,6 +158,30 @@ void tst_Lancelot::testRasterRGB16()
}
+void tst_Lancelot::testRasterA2RGB30PM_data()
+{
+ setupTestSuite();
+}
+
+
+void tst_Lancelot::testRasterA2RGB30PM()
+{
+ runTestSuite(Raster, QImage::Format_A2RGB30_Premultiplied);
+}
+
+
+void tst_Lancelot::testRasterBGR30_data()
+{
+ setupTestSuite();
+}
+
+
+void tst_Lancelot::testRasterBGR30()
+{
+ runTestSuite(Raster, QImage::Format_BGR30);
+}
+
+
void tst_Lancelot::testRasterARGB8565PM_data()
{
setupTestSuite();
diff --git a/tests/auto/other/languagechange/tst_languagechange.cpp b/tests/auto/other/languagechange/tst_languagechange.cpp
index 7380398071..22c2e1fbc7 100644
--- a/tests/auto/other/languagechange/tst_languagechange.cpp
+++ b/tests/auto/other/languagechange/tst_languagechange.cpp
@@ -281,9 +281,6 @@ void tst_languageChange::retranslatability()
fooFile.write("test");
fooFile.close();
dlg.setDirectory(temporaryDir.path());
-#ifdef Q_OS_WINCE
- dlg.setDirectory("\\Windows");
-#endif
dlg.setFileMode(QFileDialog::ExistingFiles);
dlg.setViewMode(QFileDialog::Detail);
stateMachine.start();
@@ -295,13 +292,8 @@ void tst_languageChange::retranslatability()
// In case we use a Color dialog, we do not want to test for
// strings non existing in the dialog and which do not get
// translated.
- if ((dialogType == ColorDialog) &&
-#ifndef Q_OS_WINCE
- (qApp->desktop()->width() < 480 || qApp->desktop()->height() < 350)
-#else
- true // On Qt/WinCE we always use compact mode
-#endif
- ) {
+ const QSize desktopSize = QApplication::desktop()->size();
+ if (dialogType == ColorDialog && (desktopSize.width() < 480 || desktopSize.height() < 350)) {
expected.remove("QColorDialog::&Basic colors");
expected.remove("QColorDialog::&Custom colors");
expected.remove("QColorDialog::&Define Custom Colors >>");
diff --git a/tests/auto/other/networkselftest/tst_networkselftest.cpp b/tests/auto/other/networkselftest/tst_networkselftest.cpp
index 0ce0e8d0f5..68473906b0 100644
--- a/tests/auto/other/networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/other/networkselftest/tst_networkselftest.cpp
@@ -539,7 +539,7 @@ void tst_NetworkSelfTest::httpServer()
{
QByteArray uniqueExtension = QByteArray::number((qulonglong)this) +
QByteArray::number((qulonglong)qrand()) +
- QByteArray::number((qulonglong)QDateTime::currentDateTime().toTime_t());
+ QByteArray::number(QDateTime::currentSecsSinceEpoch());
netChat(80, QList<Chat>()
// HTTP/0.9 chat:
diff --git a/tests/auto/other/other.pro b/tests/auto/other/other.pro
index 0e9f054a01..0babac4b6f 100644
--- a/tests/auto/other/other.pro
+++ b/tests/auto/other/other.pro
@@ -1,4 +1,6 @@
TEMPLATE=subdirs
+QT_FOR_CONFIG += gui-private
+
SUBDIRS=\
# atwrapper \ # QTBUG-19452
compiler \
@@ -21,7 +23,6 @@ SUBDIRS=\
qsharedpointer_and_qwidget \
qprocess_and_guieventloop \
qtokenautomaton \
- windowsmobile \
toolsupport \
!qtHaveModule(gui): SUBDIRS -= \
@@ -52,9 +53,9 @@ cross_compile: SUBDIRS -= \
atwrapper \
compiler
-wince*|!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility
+!qtConfig(accessibility): SUBDIRS -= qaccessibility
-!contains(QT_CONFIG, accessibility-atspi-bridge): SUBDIRS -= qaccessibilitylinux
+!qtConfig(accessibility-atspi-bridge): SUBDIRS -= qaccessibilitylinux
!mac: SUBDIRS -= \
macgui \
@@ -62,7 +63,7 @@ wince*|!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility
macplist \
qaccessibilitymac
-!embedded|wince: SUBDIRS -= \
+!embedded: SUBDIRS -= \
qdirectpainter
winrt: SUBDIRS -= \
diff --git a/tests/auto/other/qaccessibility/qaccessibility.pro b/tests/auto/other/qaccessibility/qaccessibility.pro
index 7b3173798d..fb9de6f450 100644
--- a/tests/auto/other/qaccessibility/qaccessibility.pro
+++ b/tests/auto/other/qaccessibility/qaccessibility.pro
@@ -1,18 +1,12 @@
CONFIG += testcase
TARGET = tst_qaccessibility
-requires(contains(QT_CONFIG,accessibility))
+requires(qtConfig(accessibility))
QT += testlib core-private gui-private widgets-private
SOURCES += tst_qaccessibility.cpp
HEADERS += accessiblewidgets.h
unix:!darwin:!haiku:!integity: LIBS += -lm
-wince {
- accessneeded.files = $$QT_BUILD_TREE\\plugins\\accessible\\*.dll
- accessneeded.path = accessible
- DEPLOYMENT += accessneeded
-}
-
win32 {
!*g++:!winrt {
include(../../../../src/3rdparty/iaccessible2/iaccessible2.pri)
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index a77daa7cb0..11baee7335 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -68,20 +68,6 @@ static inline void setFrameless(QWidget *w)
w->setWindowFlags(flags);
}
-#if defined(Q_OS_WINCE)
-extern "C" bool SystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni);
-#define SPI_GETPLATFORMTYPE 257
-inline bool IsValidCEPlatform() {
- wchar_t tszPlatform[64];
- if (SystemParametersInfo(SPI_GETPLATFORMTYPE, sizeof(tszPlatform) / sizeof(*tszPlatform), tszPlatform, 0)) {
- QString platform = QString::fromWCharArray(tszPlatform);
- if ((platform == QLatin1String("PocketPC")) || (platform == QLatin1String("Smartphone")))
- return false;
- }
- return true;
-}
-#endif
-
static inline bool verifyChild(QWidget *child, QAccessibleInterface *interface,
int index, const QRect &domain)
{
@@ -1315,6 +1301,16 @@ void tst_QAccessibility::tabTest()
child2->actionInterface()->doAction(QAccessibleActionInterface::pressAction());
QCOMPARE(tabBar->currentIndex(), 1);
+ // Test that setAccessibleTabName changes a tab's accessible name
+ tabBar->setAccessibleTabName(0, "AccFoo");
+ tabBar->setAccessibleTabName(1, "AccBar");
+ QCOMPARE(child1->text(QAccessible::Name), QLatin1String("AccFoo"));
+ QCOMPARE(child2->text(QAccessible::Name), QLatin1String("AccBar"));
+ tabBar->setCurrentIndex(0);
+ QCOMPARE(interface->text(QAccessible::Name), QLatin1String("AccFoo"));
+ tabBar->setCurrentIndex(1);
+ QCOMPARE(interface->text(QAccessible::Name), QLatin1String("AccBar"));
+
delete tabBar;
QTestAccessibility::clearEvents();
}
@@ -1352,10 +1348,17 @@ void tst_QAccessibility::tabWidgetTest()
QCOMPARE(tabButton1Interface->text(QAccessible::Name), QLatin1String("Tab 1"));
QAccessibleInterface* tabButton2Interface = tabBarInterface->child(1);
- QVERIFY(tabButton1Interface);
+ QVERIFY(tabButton2Interface);
QCOMPARE(tabButton2Interface->role(), QAccessible::PageTab);
QCOMPARE(tabButton2Interface->text(QAccessible::Name), QLatin1String("Tab 2"));
+ // Test that setAccessibleTabName changes a tab's accessible name
+ tabWidget->setCurrentIndex(0);
+ tabWidget->tabBar()->setAccessibleTabName(0, "Acc Tab");
+ QCOMPARE(tabButton1Interface->role(), QAccessible::PageTab);
+ QCOMPARE(tabButton1Interface->text(QAccessible::Name), QLatin1String("Acc Tab"));
+ QCOMPARE(tabBarInterface->text(QAccessible::Name), QLatin1String("Acc Tab"));
+
QAccessibleInterface* tabButtonLeft = tabBarInterface->child(2);
QVERIFY(tabButtonLeft);
QCOMPARE(tabButtonLeft->role(), QAccessible::PushButton);
@@ -1469,10 +1472,6 @@ void tst_QAccessibility::menuTest()
QCOMPARE(iHelp->role(), QAccessible::MenuItem);
QCOMPARE(iAction->role(), QAccessible::MenuItem);
#ifndef Q_OS_MAC
-#ifdef Q_OS_WINCE
- if (!IsValidCEPlatform())
- QSKIP("Tests do not work on Mobile platforms due to native menus");
-#endif
QCOMPARE(mw.mapFromGlobal(interface->rect().topLeft()), mw.menuBar()->geometry().topLeft());
QCOMPARE(interface->rect().size(), mw.menuBar()->size());
@@ -3564,10 +3563,6 @@ void tst_QAccessibility::dockWidgetTest()
void tst_QAccessibility::comboBoxTest()
{
-#if defined(Q_OS_WINCE)
- if (!IsValidCEPlatform())
- QSKIP("Test skipped on Windows Mobile test hardware");
-#endif
{ // not editable combobox
QComboBox combo;
combo.addItems(QStringList() << "one" << "two" << "three");
diff --git a/tests/auto/other/qaccessibilitylinux/qaccessibilitylinux.pro b/tests/auto/other/qaccessibilitylinux/qaccessibilitylinux.pro
index 10d950541a..5cb3f5902a 100644
--- a/tests/auto/other/qaccessibilitylinux/qaccessibilitylinux.pro
+++ b/tests/auto/other/qaccessibilitylinux/qaccessibilitylinux.pro
@@ -1,12 +1,7 @@
CONFIG += testcase
-include($$QT_SOURCE_TREE/src/platformsupport/accessibility/accessibility.pri)
-include($$QT_SOURCE_TREE/src/platformsupport/linuxaccessibility/linuxaccessibility.pri)
-
TARGET = tst_qaccessibilitylinux
SOURCES += tst_qaccessibilitylinux.cpp
-CONFIG += gui
-
-QT += gui-private widgets dbus testlib
+QT += gui-private widgets dbus testlib accessibility_support-private linuxaccessibility_support-private
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp b/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp
index cb69c80f37..b32b1226b2 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp
@@ -34,7 +34,7 @@ QT_BEGIN_NAMESPACE
Basic::Token Basic::classifier3(const QChar *data)
{
- if (data[0] == 100)
+ if (data[0].unicode() == 100)
{
@@ -50,7 +50,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[0] == 97)
+ else if (data[0].unicode() == 97)
{
@@ -66,7 +66,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[0] == 103)
+ else if (data[0].unicode() == 103)
{
@@ -89,19 +89,19 @@ Basic::Token Basic::classifier3(const QChar *data)
Basic::Token Basic::classifier4(const QChar *data)
{
- if (data[0] == 70)
+ if (data[0].unicode() == 70)
{
- if (data[1] == 70)
+ if (data[1].unicode() == 70)
{
- if (data[2] == 70)
+ if (data[2].unicode() == 70)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -111,7 +111,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -124,11 +124,11 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[2] == 71)
+ else if (data[2].unicode() == 71)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -138,7 +138,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -151,12 +151,12 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[2] == 76)
+ else if (data[2].unicode() == 76)
{
- if(data[3] == 77)
+ if (data[3].unicode() == 77)
return FFLM;
@@ -192,7 +192,7 @@ Basic::Token Basic::classifier3(const QChar *data)
Basic::Token Basic::classifier14(const QChar *data)
{
- if (data[0] == 119)
+ if (data[0].unicode() == 119)
{
@@ -208,7 +208,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[0] == 99)
+ else if (data[0].unicode() == 99)
{
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp b/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp
index 59164ea3f4..dace6be146 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp
@@ -36,7 +36,7 @@ using namespace BasicNamespace;
Basic::Token Basic::classifier3(const QChar *data)
{
- if (data[0] == 100)
+ if (data[0].unicode() == 100)
{
@@ -52,7 +52,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[0] == 97)
+ else if (data[0].unicode() == 97)
{
@@ -68,7 +68,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[0] == 103)
+ else if (data[0].unicode() == 103)
{
@@ -91,19 +91,19 @@ Basic::Token Basic::classifier3(const QChar *data)
Basic::Token Basic::classifier4(const QChar *data)
{
- if (data[0] == 70)
+ if (data[0].unicode() == 70)
{
- if (data[1] == 70)
+ if (data[1].unicode() == 70)
{
- if (data[2] == 70)
+ if (data[2].unicode() == 70)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -113,7 +113,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -126,11 +126,11 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[2] == 71)
+ else if (data[2].unicode() == 71)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -140,7 +140,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -153,12 +153,12 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[2] == 76)
+ else if (data[2].unicode() == 76)
{
- if(data[3] == 77)
+ if (data[3].unicode() == 77)
return FFLM;
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp
index d005b64b8d..c24900eed0 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp
@@ -36,7 +36,7 @@ QT_BEGIN_NAMESPACE
Boilerplate::Token Boilerplate::classifier3(const QChar *data)
{
- if (data[0] == 100)
+ if (data[0].unicode() == 100)
{
@@ -52,7 +52,7 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
}
- else if (data[0] == 97)
+ else if (data[0].unicode() == 97)
{
@@ -68,7 +68,7 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
}
- else if (data[0] == 103)
+ else if (data[0].unicode() == 103)
{
@@ -91,19 +91,19 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
Boilerplate::Token Boilerplate::classifier4(const QChar *data)
{
- if (data[0] == 70)
+ if (data[0].unicode() == 70)
{
- if (data[1] == 70)
+ if (data[1].unicode() == 70)
{
- if (data[2] == 70)
+ if (data[2].unicode() == 70)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -113,7 +113,7 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -126,11 +126,11 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
}
- else if (data[2] == 71)
+ else if (data[2].unicode() == 71)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -140,7 +140,7 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -153,12 +153,12 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
}
- else if (data[2] == 76)
+ else if (data[2].unicode() == 76)
{
- if(data[3] == 77)
+ if (data[3].unicode() == 77)
return FFLM;
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp b/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp
index 87632d83ff..879f55fa32 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp
@@ -34,7 +34,7 @@ QT_BEGIN_NAMESPACE
NoNamespace::Token NoNamespace::classifier3(const QChar *data)
{
- if (data[0] == 100)
+ if (data[0].unicode() == 100)
{
@@ -50,7 +50,7 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[0] == 97)
+ else if (data[0].unicode() == 97)
{
@@ -66,7 +66,7 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[0] == 103)
+ else if (data[0].unicode() == 103)
{
@@ -89,19 +89,19 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
NoNamespace::Token NoNamespace::classifier4(const QChar *data)
{
- if (data[0] == 70)
+ if (data[0].unicode() == 70)
{
- if (data[1] == 70)
+ if (data[1].unicode() == 70)
{
- if (data[2] == 70)
+ if (data[2].unicode() == 70)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -111,7 +111,7 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -124,11 +124,11 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[2] == 71)
+ else if (data[2].unicode() == 71)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -138,7 +138,7 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -151,12 +151,12 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[2] == 76)
+ else if (data[2].unicode() == 76)
{
- if(data[3] == 77)
+ if (data[3].unicode() == 77)
return FFLM;
@@ -176,7 +176,7 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
NoNamespace::Token NoNamespace::classifier14(const QChar *data)
{
- if (data[0] == 119)
+ if (data[0].unicode() == 119)
{
@@ -192,7 +192,7 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[0] == 99)
+ else if (data[0].unicode() == 99)
{
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp b/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp
index 68bd051afb..5be9b3879f 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp
@@ -36,7 +36,7 @@ using namespace NoToStringNS;
NoToString::Token NoToString::classifier3(const QChar *data)
{
- if (data[0] == 100)
+ if (data[0].unicode() == 100)
{
@@ -52,7 +52,7 @@ NoToString::Token NoToString::classifier3(const QChar *data)
}
- else if (data[0] == 97)
+ else if (data[0].unicode() == 97)
{
@@ -68,7 +68,7 @@ NoToString::Token NoToString::classifier3(const QChar *data)
}
- else if (data[0] == 103)
+ else if (data[0].unicode() == 103)
{
@@ -91,19 +91,19 @@ NoToString::Token NoToString::classifier3(const QChar *data)
NoToString::Token NoToString::classifier4(const QChar *data)
{
- if (data[0] == 70)
+ if (data[0].unicode() == 70)
{
- if (data[1] == 70)
+ if (data[1].unicode() == 70)
{
- if (data[2] == 70)
+ if (data[2].unicode() == 70)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -113,7 +113,7 @@ NoToString::Token NoToString::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -126,11 +126,11 @@ NoToString::Token NoToString::classifier3(const QChar *data)
}
- else if (data[2] == 71)
+ else if (data[2].unicode() == 71)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -140,7 +140,7 @@ NoToString::Token NoToString::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -153,12 +153,12 @@ NoToString::Token NoToString::classifier3(const QChar *data)
}
- else if (data[2] == 76)
+ else if (data[2].unicode() == 76)
{
- if(data[3] == 77)
+ if (data[3].unicode() == 77)
return FFLM;
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp b/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp
index 0a452c5757..69c6de2f39 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp
@@ -36,7 +36,7 @@ using namespace TheNamespace;
WithNamespace::Token WithNamespace::classifier3(const QChar *data)
{
- if (data[0] == 100)
+ if (data[0].unicode() == 100)
{
@@ -52,7 +52,7 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[0] == 97)
+ else if (data[0].unicode() == 97)
{
@@ -68,7 +68,7 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[0] == 103)
+ else if (data[0].unicode() == 103)
{
@@ -91,19 +91,19 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
WithNamespace::Token WithNamespace::classifier4(const QChar *data)
{
- if (data[0] == 70)
+ if (data[0].unicode() == 70)
{
- if (data[1] == 70)
+ if (data[1].unicode() == 70)
{
- if (data[2] == 70)
+ if (data[2].unicode() == 70)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -113,7 +113,7 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -126,11 +126,11 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[2] == 71)
+ else if (data[2].unicode() == 71)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -140,7 +140,7 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -153,12 +153,12 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[2] == 76)
+ else if (data[2].unicode() == 76)
{
- if(data[3] == 77)
+ if (data[3].unicode() == 77)
return FFLM;
@@ -178,7 +178,7 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
WithNamespace::Token WithNamespace::classifier14(const QChar *data)
{
- if (data[0] == 119)
+ if (data[0].unicode() == 119)
{
@@ -194,7 +194,7 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[0] == 99)
+ else if (data[0].unicode() == 99)
{
diff --git a/tests/auto/other/toolsupport/tst_toolsupport.cpp b/tests/auto/other/toolsupport/tst_toolsupport.cpp
index 7942a84615..f93c8f825b 100644
--- a/tests/auto/other/toolsupport/tst_toolsupport.cpp
+++ b/tests/auto/other/toolsupport/tst_toolsupport.cpp
@@ -129,29 +129,14 @@ void tst_toolsupport::offsets_data()
#endif
{
-#ifdef Q_OS_WIN
QTest::newRow("QDateTimePrivate::m_msecs")
- << pmm_to_offsetof(&QDateTimePrivate::m_msecs) << 8 << 8;
- QTest::newRow("QDateTimePrivate::m_spec")
- << pmm_to_offsetof(&QDateTimePrivate::m_spec) << 16 << 16;
- QTest::newRow("QDateTimePrivate::m_offsetFromUtc")
- << pmm_to_offsetof(&QDateTimePrivate::m_offsetFromUtc) << 20 << 20;
- QTest::newRow("QDateTimePrivate::m_timeZone")
- << pmm_to_offsetof(&QDateTimePrivate::m_timeZone) << 24 << 24;
+ << pmm_to_offsetof(&QDateTimePrivate::m_msecs) << 0 << 0;
QTest::newRow("QDateTimePrivate::m_status")
- << pmm_to_offsetof(&QDateTimePrivate::m_status) << 28 << 32;
-#else
- QTest::newRow("QDateTimePrivate::m_msecs")
- << pmm_to_offsetof(&QDateTimePrivate::m_msecs) << 4 << 8;
- QTest::newRow("QDateTimePrivate::m_spec")
- << pmm_to_offsetof(&QDateTimePrivate::m_spec) << 12 << 16;
+ << pmm_to_offsetof(&QDateTimePrivate::m_status) << 8 << 8;
QTest::newRow("QDateTimePrivate::m_offsetFromUtc")
- << pmm_to_offsetof(&QDateTimePrivate::m_offsetFromUtc) << 16 << 20;
+ << pmm_to_offsetof(&QDateTimePrivate::m_offsetFromUtc) << 12 << 12;
QTest::newRow("QDateTimePrivate::m_timeZone")
<< pmm_to_offsetof(&QDateTimePrivate::m_timeZone) << 20 << 24;
- QTest::newRow("QDateTimePrivate::m_status")
- << pmm_to_offsetof(&QDateTimePrivate::m_status) << 24 << 32;
-#endif
}
#endif // RUN_MEMBER_OFFSET_TEST
}
diff --git a/tests/auto/other/windowsmobile/test/ddhelper.cpp b/tests/auto/other/windowsmobile/test/ddhelper.cpp
deleted file mode 100644
index 3ce99a0ded..0000000000
--- a/tests/auto/other/windowsmobile/test/ddhelper.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifdef Q_OS_WINCE_WM
-
-#include <Ddraw.h>
-#include <QDebug>
-
-static LPDIRECTDRAW g_pDD = NULL; // DirectDraw object
-static LPDIRECTDRAWSURFACE g_pDDSSurface = NULL; // DirectDraw primary surface
-
-static DDSCAPS ddsCaps;
-static DDSURFACEDESC ddsSurfaceDesc;
-static void *buffer = NULL;
-
-static int width = 0;
-static int height = 0;
-static int pitch = 0;
-static int bitCount = 0;
-static int windowId = 0;
-
-static bool initialized = false;
-static bool locked = false;
-
-void q_lock()
-{
- if (locked) {
- qWarning("Direct Painter already locked (QDirectPainter::lock())");
- return;
- }
- locked = true;
-
-
- memset(&ddsSurfaceDesc, 0, sizeof(ddsSurfaceDesc));
- ddsSurfaceDesc.dwSize = sizeof(ddsSurfaceDesc);
-
- HRESULT h = g_pDDSSurface->Lock(0, &ddsSurfaceDesc, DDLOCK_WRITEONLY, 0);
- if (h != DD_OK)
- qDebug() << "GetSurfaceDesc failed!";
-
- width = ddsSurfaceDesc.dwWidth;
- height = ddsSurfaceDesc.dwHeight;
- bitCount = ddsSurfaceDesc.ddpfPixelFormat.dwRGBBitCount;
- pitch = ddsSurfaceDesc.lPitch;
- buffer = ddsSurfaceDesc.lpSurface;
-}
-
-void q_unlock()
-{
- if( !locked) {
- qWarning("Direct Painter not locked (QDirectPainter::unlock()");
- return;
- }
- g_pDDSSurface->Unlock(0);
- locked = false;
-}
-
-void q_initDD()
-{
- if (initialized)
- return;
-
- DirectDrawCreate(NULL, &g_pDD, NULL);
-
- HRESULT h;
- h = g_pDD->SetCooperativeLevel(0, DDSCL_NORMAL);
-
- if (h != DD_OK)
- qDebug() << "cooperation level failed";
-
- h = g_pDD->TestCooperativeLevel();
- if (h != DD_OK)
- qDebug() << "cooperation level failed test";
-
- DDSURFACEDESC ddsd;
- memset(&ddsd, 0, sizeof(ddsd));
- ddsd.dwSize = sizeof(ddsd);
-
- ddsd.dwFlags = DDSD_CAPS;
-
- ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
-
- h = g_pDD->CreateSurface(&ddsd, &g_pDDSSurface, NULL);
-
- if (h != DD_OK)
- qDebug() << "CreateSurface failed!";
-
- if (g_pDDSSurface->GetCaps(&ddsCaps) != DD_OK)
- qDebug() << "GetCaps failed";
-
- q_lock();
- q_unlock();
- initialized = true;
-}
-
-uchar* q_frameBuffer()
-{
- return (uchar*) buffer;
-}
-
-int q_screenDepth()
-{
- return bitCount;
-}
-
-int q_screenWidth()
-{
- return width;
-}
-
-int q_screenHeight()
-{
- return height;
-}
-
-int q_linestep()
-{
- return pitch;
-}
-
-#endif //Q_OS_WINCE_WM
-
-
diff --git a/tests/auto/other/windowsmobile/test/ddhelper.h b/tests/auto/other/windowsmobile/test/ddhelper.h
deleted file mode 100644
index ce68654b76..0000000000
--- a/tests/auto/other/windowsmobile/test/ddhelper.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef __DDHELPER__
-#define __DDHELPER__
-
-extern uchar* q_frameBuffer();
-
-extern int q_screenDepth();
-
-extern int q_screenWidth();
-
-extern int q_screenHeight();
-
-extern int q_linestep();
-
-extern void q_initDD();
-
-extern void q_unlock();
-
-extern void q_lock();
-
-#endif //__DDHELPER__
-
diff --git a/tests/auto/other/windowsmobile/test/test.pro b/tests/auto/other/windowsmobile/test/test.pro
deleted file mode 100644
index 36dd15f60e..0000000000
--- a/tests/auto/other/windowsmobile/test/test.pro
+++ /dev/null
@@ -1,23 +0,0 @@
-
-CONFIG += testcase
-QT += widgets testlib
-HEADERS += ddhelper.h
-SOURCES += tst_windowsmobile.cpp ddhelper.cpp
-RESOURCES += windowsmobile.qrc
-
-TARGET = ../tst_windowsmobile
-
-wincewm*: {
- addFiles.files = $$OUT_PWD/../testQMenuBar/*.exe
-
-
- addFiles.path = "\\Program Files\\tst_windowsmobile"
- DEPLOYMENT += addFiles
-}
-
-wincewm*: {
- LIBS += Ddraw.lib
-}
-
-
-
diff --git a/tests/auto/other/windowsmobile/test/testQMenuBar_current.png b/tests/auto/other/windowsmobile/test/testQMenuBar_current.png
deleted file mode 100644
index f0042b8fe0..0000000000
--- a/tests/auto/other/windowsmobile/test/testQMenuBar_current.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/other/windowsmobile/test/testSimpleWidget_current.png b/tests/auto/other/windowsmobile/test/testSimpleWidget_current.png
deleted file mode 100644
index 8086c41ce9..0000000000
--- a/tests/auto/other/windowsmobile/test/testSimpleWidget_current.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp b/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp
deleted file mode 100644
index 8d0e468bd6..0000000000
--- a/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <QtCore/QDate>
-#include <QtCore/QDebug>
-#include <QtCore/QObject>
-#include <QtGui>
-#ifdef Q_OS_WINCE_WM
-#include <windows.h>
-#include "ddhelper.h"
-#endif
-
-
-
-class tst_WindowsMobile : public QObject
-{
- Q_OBJECT
-public:
- tst_WindowsMobile()
- {
- qApp->setCursorFlashTime (24 * 3600 * 1000); // once a day
- // qApp->setCursorFlashTime (INT_MAX);
-#ifdef Q_OS_WINCE_WM
- q_initDD();
-#endif
- }
-
-#if defined(Q_OS_WINCE_WM) && defined(_WIN32_WCE) && _WIN32_WCE <= 0x501
- private slots:
- void testMainWindowAndMenuBar();
- void testSimpleWidget();
-#endif
-};
-
-#if defined(Q_OS_WINCE_WM) && defined(_WIN32_WCE) && _WIN32_WCE <= 0x501
-
-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"));
-}
-
-void openMenu()
-{
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,450,630,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,450,630,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,65535,65535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,65535,65535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,55535,55535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,55535,55535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,55535,58535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,55535,58535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,40535,55535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,40535,55535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,32535,55535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,32535,55535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,65535,65535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,65535,65535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,55535,50535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,55535,50535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,55535,40535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,55535,40535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,48535,45535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,48535,45535,0,0);
-}
-
-void compareScreenshots(const QString &image1, const QString &image2)
-{
- QImage screenShot(image1);
- QImage original(image2);
-
- // cut away the title bar before comparing
- QDesktopWidget desktop;
- QRect desktopFrameRect = desktop.frameGeometry();
- QRect desktopClientRect = desktop.availableGeometry();
-
- QPainter p1(&screenShot);
- QPainter p2(&original);
-
- //screenShot.save("scr1.png", "PNG");
- p1.fillRect(0, 0, desktopFrameRect.width(), desktopClientRect.y(), Qt::black);
- p2.fillRect(0, 0, desktopFrameRect.width(), desktopClientRect.y(), Qt::black);
-
- //screenShot.save("scr2.png", "PNG");
- //original.save("orig1.png", "PNG");
-
- QCOMPARE(original, screenShot);
-}
-
-void takeScreenShot(const QString filename)
-{
- q_lock();
- QImage image = QImage(( uchar *) q_frameBuffer(), q_screenWidth(),
- q_screenHeight(), q_screenWidth() * q_screenDepth() / 8, QImage::Format_RGB16);
- image.save(filename, "PNG");
- q_unlock();
-}
-
-void tst_WindowsMobile::testMainWindowAndMenuBar()
-{
- if (qt_wince_is_smartphone())
- QSKIP("This test is only for Windows Mobile");
-
- QProcess process;
- process.start("testQMenuBar.exe");
- QCOMPARE(process.state(), QProcess::Running);
- QTest::qWait(6000);
- openMenu();
- QTest::qWait(1000);
- takeScreenShot("testQMenuBar_current.png");
- process.close();
- compareScreenshots("testQMenuBar_current.png", ":/testQMenuBar_current.png");
-}
-
-void tst_WindowsMobile::testSimpleWidget()
-{
- if (qt_wince_is_smartphone())
- QSKIP("This test is only for Windows Mobile");
-
- QMenuBar menubar;
- menubar.show();
- QWidget maximized;
- QPalette pal = maximized.palette();
- pal.setColor(QPalette::Background, Qt::red);
- maximized.setPalette(pal);
- maximized.showMaximized();
- QWidget widget;
- widget.setGeometry(100, 100, 200, 200);
- widget.setWindowTitle("Widget");
- widget.show();
- qApp->processEvents();
- QTest::qWait(1000);
-
- QWidget widget2;
- widget2.setGeometry(100, 380, 300, 200);
- widget2.setWindowTitle("Widget 2");
- widget2.setWindowFlags(Qt::Popup);
- widget2.show();
-
- qApp->processEvents();
- QTest::qWait(1000);
- takeScreenShot("testSimpleWidget_current.png");
- compareScreenshots("testSimpleWidget_current.png", ":/testSimpleWidget_current.png");
-}
-
-
-#endif //Q_OS_WINCE_WM
-
-
-QTEST_MAIN(tst_WindowsMobile)
-#include "tst_windowsmobile.moc"
-
diff --git a/tests/auto/other/windowsmobile/test/windowsmobile.qrc b/tests/auto/other/windowsmobile/test/windowsmobile.qrc
deleted file mode 100644
index 5d6f61459e..0000000000
--- a/tests/auto/other/windowsmobile/test/windowsmobile.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>testQMenuBar_current.png</file>
- <file>testSimpleWidget_current.png</file>
-</qresource>
-</RCC>
diff --git a/tests/auto/other/windowsmobile/testQMenuBar/main.cpp b/tests/auto/other/windowsmobile/testQMenuBar/main.cpp
deleted file mode 100644
index 8d9071ff72..0000000000
--- a/tests/auto/other/windowsmobile/testQMenuBar/main.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <QtCore/QDate>
-#include <QtCore/QDebug>
-#include <QtCore/QObject>
-#include <QtGui>
-#include <windows.h>
-
-int main(int argc, char * argv[])
-{
- QList<QWidget*> widgets;
- QApplication app(argc, argv);
-
- QMainWindow mainWindow;
- mainWindow.setWindowTitle("Test");
- QMenu *fileMenu = mainWindow.menuBar()->addMenu("File");
- QMenu *editMenu = mainWindow.menuBar()->addMenu("Edit");
- QMenu *viewMenu = mainWindow.menuBar()->addMenu("View");
- QMenu *toolsMenu = mainWindow.menuBar()->addMenu("Tools");
- QMenu *optionsMenu = mainWindow.menuBar()->addMenu("Options");
- QMenu *helpMenu = mainWindow.menuBar()->addMenu("Help");
-
- qApp->processEvents();
-
- fileMenu->addAction("Open");
- QAction *close = fileMenu->addAction("Close");
- fileMenu->addSeparator();
- fileMenu->addAction("Exit");
-
- close->setEnabled(false);
-
- editMenu->addAction("Cut");
- editMenu->addAction("Pase");
- editMenu->addAction("Copy");
- editMenu->addSeparator();
- editMenu->addAction("Find");
-
- viewMenu->addAction("Hide");
- viewMenu->addAction("Show");
- viewMenu->addAction("Explore");
- QAction *visible = viewMenu->addAction("Visible");
- visible->setCheckable(true);
- visible->setChecked(true);
-
- toolsMenu->addMenu("Hammer");
- toolsMenu->addMenu("Caliper");
- toolsMenu->addMenu("Helm");
-
- optionsMenu->addMenu("Settings");
- optionsMenu->addMenu("Standard");
- optionsMenu->addMenu("Extended");
-
- QMenu *subMenu = helpMenu->addMenu("Help");
- subMenu->addAction("Index");
- subMenu->addSeparator();
- subMenu->addAction("Vodoo Help");
- helpMenu->addAction("Contens");
- helpMenu->addSeparator();
- helpMenu->addAction("About");
-
- QToolBar toolbar;
- mainWindow.addToolBar(&toolbar);
- toolbar.addAction(QIcon(qApp->style()->standardPixmap(QStyle::SP_FileIcon)), QString("textAction"));
-
- QTextEdit textEdit;
- mainWindow.setCentralWidget(&textEdit);
-
- mainWindow.showMaximized();
-
- app.exec();
-}
diff --git a/tests/auto/other/windowsmobile/testQMenuBar/testQMenuBar.pro b/tests/auto/other/windowsmobile/testQMenuBar/testQMenuBar.pro
deleted file mode 100644
index 12ef683c11..0000000000
--- a/tests/auto/other/windowsmobile/testQMenuBar/testQMenuBar.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-SOURCES += main.cpp
-QT += widgets
-TARGET = ../testQMenuBar
-
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/other/windowsmobile/windowsmobile.pro b/tests/auto/other/windowsmobile/windowsmobile.pro
deleted file mode 100644
index 2e6b444d7b..0000000000
--- a/tests/auto/other/windowsmobile/windowsmobile.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-
-TEMPLATE = subdirs
-
-wincewm* {
- SUBDIRS = testQMenuBar
-}
- SUBDIRS += test
-
-