Remove Windows CE from tests (others).
Remove #ifdef sections for Q_OS_WINCE, wince .pro file clauses and CE-specific files. Task-number: QTBUG-51673 Change-Id: Ibf599204f5c0daaef086edaf8fac86853db3ee14 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
This commit is contained in:
parent
137353315c
commit
f720619e0d
@ -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 >>");
|
||||
|
@ -21,7 +21,6 @@ SUBDIRS=\
|
||||
qsharedpointer_and_qwidget \
|
||||
qprocess_and_guieventloop \
|
||||
qtokenautomaton \
|
||||
windowsmobile \
|
||||
toolsupport \
|
||||
|
||||
!qtHaveModule(widgets): SUBDIRS -= \
|
||||
@ -48,7 +47,7 @@ cross_compile: SUBDIRS -= \
|
||||
atwrapper \
|
||||
compiler
|
||||
|
||||
wince*|!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility
|
||||
!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility
|
||||
|
||||
!contains(QT_CONFIG, accessibility-atspi-bridge): SUBDIRS -= qaccessibilitylinux
|
||||
|
||||
@ -58,7 +57,7 @@ wince*|!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility
|
||||
macplist \
|
||||
qaccessibilitymac
|
||||
|
||||
!embedded|wince: SUBDIRS -= \
|
||||
!embedded: SUBDIRS -= \
|
||||
qdirectpainter
|
||||
|
||||
winrt: SUBDIRS -= \
|
||||
|
@ -7,12 +7,6 @@ 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)
|
||||
|
@ -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)
|
||||
{
|
||||
@ -1469,10 +1455,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());
|
||||
|
||||
@ -3561,10 +3543,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");
|
||||
|
@ -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
|
||||
|
||||
|
@ -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__
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 22 KiB |
Binary file not shown.
Before Width: | Height: | Size: 23 KiB |
@ -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"
|
||||
|
@ -1,6 +0,0 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file>testQMenuBar_current.png</file>
|
||||
<file>testSimpleWidget_current.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -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();
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
SOURCES += main.cpp
|
||||
QT += widgets
|
||||
TARGET = ../testQMenuBar
|
||||
|
||||
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
|
@ -1,9 +0,0 @@
|
||||
|
||||
TEMPLATE = subdirs
|
||||
|
||||
wincewm* {
|
||||
SUBDIRS = testQMenuBar
|
||||
}
|
||||
SUBDIRS += test
|
||||
|
||||
|
@ -4,9 +4,4 @@ SOURCES += tst_qdom.cpp
|
||||
|
||||
QT = core xml testlib
|
||||
|
||||
wince* {
|
||||
wince*|qt_not_deployed {
|
||||
DEPLOYMENT_PLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs
|
||||
}
|
||||
}
|
||||
TESTDATA += testdata/* doubleNamespaces.xml umlaut.xml
|
||||
|
@ -94,9 +94,6 @@ PlatformInfo PlatformInfo::localHostInfo()
|
||||
uname.start(QLS("uname"), QStringList() << QLS("-r"));
|
||||
if (uname.waitForFinished(3000))
|
||||
pi.insert(PI_OSVersion, QString::fromLocal8Bit(uname.readAllStandardOutput().constData()).simplified());
|
||||
#elif defined(Q_OS_WINCE)
|
||||
pi.insert(PI_OSName, QLS("WinCE"));
|
||||
pi.insert(PI_OSVersion, QString::number(QSysInfo::windowsVersion()));
|
||||
#elif defined(Q_OS_WIN)
|
||||
pi.insert(PI_OSName, QLS("Windows"));
|
||||
pi.insert(PI_OSVersion, QString::number(QSysInfo::windowsVersion()));
|
||||
|
@ -59,10 +59,6 @@ private slots:
|
||||
|
||||
void tst_qdiriterator::data()
|
||||
{
|
||||
#if defined(Q_OS_WINCE)
|
||||
QByteArray qtdir = qPrintable(QCoreApplication::applicationDirPath());
|
||||
qtdir += "/depot";
|
||||
#else
|
||||
#if defined(Q_OS_WIN)
|
||||
const char *qtdir = "C:\\depot\\qt\\main";
|
||||
#else
|
||||
@ -72,7 +68,6 @@ void tst_qdiriterator::data()
|
||||
fprintf(stderr, "QTDIR not set\n");
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
QTest::addColumn<QByteArray>("dirpath");
|
||||
QByteArray ba = QByteArray(qtdir) + "/src/corelib";
|
||||
|
@ -6,10 +6,3 @@ CONFIG += release
|
||||
|
||||
SOURCES += main.cpp qfilesystemiterator.cpp
|
||||
HEADERS += qfilesystemiterator.h
|
||||
|
||||
wince* {
|
||||
corelibdir.files = $$QT_SOURCE_TREE/src/corelib
|
||||
corelibdir.path = ./depot/src
|
||||
DEPLOYMENT += corelibdir
|
||||
}
|
||||
|
||||
|
@ -591,12 +591,7 @@ void tst_qfile::createSmallFiles()
|
||||
dir.cd("tst");
|
||||
tmpDirName = dir.absolutePath();
|
||||
|
||||
#if defined(Q_OS_WINCE)
|
||||
for (int i = 0; i < 100; ++i)
|
||||
#else
|
||||
for (int i = 0; i < 1000; ++i)
|
||||
#endif
|
||||
{
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
QFile f(tmpDirName + QLatin1Char('/') + QString::number(i));
|
||||
f.open(QIODevice::WriteOnly);
|
||||
f.seek(511);
|
||||
|
@ -41,7 +41,7 @@ class qfileinfo : public QObject
|
||||
private slots:
|
||||
void existsTemporary();
|
||||
void existsStatic();
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
void symLinkTargetPerformanceLNK();
|
||||
void symLinkTargetPerformanceMounpoint();
|
||||
#endif
|
||||
@ -71,7 +71,7 @@ void qfileinfo::existsStatic()
|
||||
QBENCHMARK { QFileInfo::exists(appPath); }
|
||||
}
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
void qfileinfo::symLinkTargetPerformanceLNK()
|
||||
{
|
||||
QVERIFY(QFile::link("file","link.lnk"));
|
||||
|
@ -33,7 +33,7 @@ class tst_QProcess : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
#if !defined(QT_NO_PROCESS) && !defined(Q_OS_WINCE)
|
||||
#if !defined(QT_NO_PROCESS)
|
||||
private slots:
|
||||
|
||||
void echoTest_performance();
|
||||
@ -41,8 +41,7 @@ private slots:
|
||||
#endif // QT_NO_PROCESS
|
||||
};
|
||||
|
||||
#if !defined(QT_NO_PROCESS) && !defined(Q_OS_WINCE)
|
||||
// Reading and writing to a process is not supported on Qt/CE
|
||||
#if !defined(QT_NO_PROCESS)
|
||||
void tst_QProcess::echoTest_performance()
|
||||
{
|
||||
QProcess process;
|
||||
@ -88,7 +87,7 @@ void tst_QProcess::echoTest_performance()
|
||||
QVERIFY(process.waitForFinished());
|
||||
}
|
||||
|
||||
#endif // QT_NO_PROCESS && Q_OS_WINCE
|
||||
#endif // QT_NO_PROCESS
|
||||
|
||||
QTEST_MAIN(tst_QProcess)
|
||||
#include "tst_bench_qprocess.moc"
|
||||
|
@ -119,12 +119,7 @@ struct Large { // A "large" item type
|
||||
int x[1000];
|
||||
};
|
||||
|
||||
// Embedded devices typically have limited memory
|
||||
#if defined(Q_OS_WINCE)
|
||||
# define LARGE_MAX_SIZE 2000
|
||||
#else
|
||||
# define LARGE_MAX_SIZE 20000
|
||||
#endif
|
||||
#define LARGE_MAX_SIZE 20000
|
||||
|
||||
class tst_vector_vs_std : public QObject
|
||||
{
|
||||
|
@ -34,15 +34,6 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef Q_OS_WINCE
|
||||
// no C89 time() on Windows CE:
|
||||
// http://blogs.msdn.com/b/cenet/archive/2006/04/29/time-h-on-windows-ce.aspx
|
||||
uint time(void *)
|
||||
{
|
||||
return uint(-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
class tst_bench_QCryptographicHash : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -401,9 +401,6 @@ void tst_QGraphicsView::chipTester_data()
|
||||
|
||||
void tst_QGraphicsView::chipTester()
|
||||
{
|
||||
#ifdef Q_OS_WINCE_WM
|
||||
QSKIP("WinCE WM: Fails on Windows Mobile w/o OpenGL");
|
||||
#endif
|
||||
QFETCH(bool, antialias);
|
||||
QFETCH(bool, opengl);
|
||||
QFETCH(int, operation);
|
||||
|
@ -8,19 +8,3 @@ SOURCES += tst_qimagereader.cpp
|
||||
!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF
|
||||
!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
|
||||
QT += network
|
||||
|
||||
wince {
|
||||
addFiles.files = images
|
||||
addFiles.path = .
|
||||
|
||||
CONFIG(debug, debug|release):{
|
||||
imageFormatsPlugins.files = $$QT_BUILD_TREE/plugins/imageformats/*d4.dll
|
||||
}
|
||||
|
||||
CONFIG(release, debug|release):{
|
||||
imageFormatsPlugins.files = $$QT_BUILD_TREE/plugins/imageformats/*[^d]4.dll
|
||||
}
|
||||
imageFormatsPlugins.path = imageformats
|
||||
DEPLOYMENT += addFiles imageFormatsPlugins
|
||||
}
|
||||
|
||||
|
@ -668,12 +668,8 @@ void tst_qnetworkreply::uploadPerformance()
|
||||
|
||||
void tst_qnetworkreply::httpUploadPerformance()
|
||||
{
|
||||
#if defined(Q_OS_WINCE_WM)
|
||||
// Show some mercy for non-desktop platform/s
|
||||
enum {UploadSize = 4*1024*1024}; // 4 MB
|
||||
#else
|
||||
enum {UploadSize = 128*1024*1024}; // 128 MB
|
||||
#endif
|
||||
|
||||
ThreadedDataReaderHttpServer reader;
|
||||
FixedSizeDataGenerator generator(UploadSize);
|
||||
|
||||
@ -739,12 +735,9 @@ void tst_qnetworkreply::httpDownloadPerformance()
|
||||
{
|
||||
QFETCH(bool, serverSendsContentLength);
|
||||
QFETCH(bool, chunkedEncoding);
|
||||
#if defined(Q_OS_WINCE_WM)
|
||||
// Show some mercy to non-desktop platform/s
|
||||
enum {UploadSize = 4*1024*1024}; // 4 MB
|
||||
#else
|
||||
|
||||
enum {UploadSize = 128*1024*1024}; // 128 MB
|
||||
#endif
|
||||
|
||||
HttpDownloadPerformanceServer server(UploadSize, serverSendsContentLength, chunkedEncoding);
|
||||
|
||||
QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(server.serverPort()) + "/?bare=1"));
|
||||
@ -823,12 +816,7 @@ void tst_qnetworkreply::httpDownloadPerformanceDownloadBuffer()
|
||||
QFETCH(HttpDownloadPerformanceDownloadBufferTestType, testType);
|
||||
|
||||
// On my Linux Desktop the results are already visible with 128 kB, however we use this to have good results.
|
||||
#if defined(Q_OS_WINCE_WM)
|
||||
// Show some mercy to non-desktop platform/s
|
||||
enum {UploadSize = 4*1024*1024}; // 4 MB
|
||||
#else
|
||||
enum {UploadSize = 32*1024*1024}; // 32 MB
|
||||
#endif
|
||||
|
||||
HttpDownloadPerformanceServer server(UploadSize, true, false);
|
||||
|
||||
|
@ -166,9 +166,6 @@ void tst_QTcpServer::ipv6LoopbackPerformanceTest()
|
||||
QFETCH_GLOBAL(bool, setProxy);
|
||||
if (setProxy)
|
||||
return;
|
||||
#if defined(Q_OS_WINCE_WM)
|
||||
QSKIP("WinCE WM: Not yet supported");
|
||||
#endif
|
||||
|
||||
QTcpServer server;
|
||||
if (!server.listen(QHostAddress::LocalHostIPv6, 0)) {
|
||||
|
@ -56,11 +56,7 @@ contains(QT_CONFIG, opengl) {
|
||||
contains(QT_CONFIG, egl): SUBDIRS += qopenglcontext
|
||||
}
|
||||
|
||||
win32 {
|
||||
SUBDIRS -= network_remote_stresstest network_stresstest
|
||||
# disable some tests on wince because of missing dependencies
|
||||
wince: SUBDIRS -= lance windowmodality
|
||||
}
|
||||
win32: SUBDIRS -= network_remote_stresstest network_stresstest
|
||||
|
||||
lessThan(QT_MAJOR_VERSION, 5): SUBDIRS -= bearerex lance qnetworkaccessmanager/qget qmimedatabase qnetworkreply \
|
||||
qpainfo qscreen socketengine xembed-raster xembed-widgets windowtransparency \
|
||||
|
Loading…
x
Reference in New Issue
Block a user