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.write("test");
|
||||||
fooFile.close();
|
fooFile.close();
|
||||||
dlg.setDirectory(temporaryDir.path());
|
dlg.setDirectory(temporaryDir.path());
|
||||||
#ifdef Q_OS_WINCE
|
|
||||||
dlg.setDirectory("\\Windows");
|
|
||||||
#endif
|
|
||||||
dlg.setFileMode(QFileDialog::ExistingFiles);
|
dlg.setFileMode(QFileDialog::ExistingFiles);
|
||||||
dlg.setViewMode(QFileDialog::Detail);
|
dlg.setViewMode(QFileDialog::Detail);
|
||||||
stateMachine.start();
|
stateMachine.start();
|
||||||
@ -295,13 +292,8 @@ void tst_languageChange::retranslatability()
|
|||||||
// In case we use a Color dialog, we do not want to test for
|
// 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
|
// strings non existing in the dialog and which do not get
|
||||||
// translated.
|
// translated.
|
||||||
if ((dialogType == ColorDialog) &&
|
const QSize desktopSize = QApplication::desktop()->size();
|
||||||
#ifndef Q_OS_WINCE
|
if (dialogType == ColorDialog && (desktopSize.width() < 480 || desktopSize.height() < 350)) {
|
||||||
(qApp->desktop()->width() < 480 || qApp->desktop()->height() < 350)
|
|
||||||
#else
|
|
||||||
true // On Qt/WinCE we always use compact mode
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
expected.remove("QColorDialog::&Basic colors");
|
expected.remove("QColorDialog::&Basic colors");
|
||||||
expected.remove("QColorDialog::&Custom colors");
|
expected.remove("QColorDialog::&Custom colors");
|
||||||
expected.remove("QColorDialog::&Define Custom Colors >>");
|
expected.remove("QColorDialog::&Define Custom Colors >>");
|
||||||
|
@ -21,7 +21,6 @@ SUBDIRS=\
|
|||||||
qsharedpointer_and_qwidget \
|
qsharedpointer_and_qwidget \
|
||||||
qprocess_and_guieventloop \
|
qprocess_and_guieventloop \
|
||||||
qtokenautomaton \
|
qtokenautomaton \
|
||||||
windowsmobile \
|
|
||||||
toolsupport \
|
toolsupport \
|
||||||
|
|
||||||
!qtHaveModule(widgets): SUBDIRS -= \
|
!qtHaveModule(widgets): SUBDIRS -= \
|
||||||
@ -48,7 +47,7 @@ cross_compile: SUBDIRS -= \
|
|||||||
atwrapper \
|
atwrapper \
|
||||||
compiler
|
compiler
|
||||||
|
|
||||||
wince*|!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility
|
!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility
|
||||||
|
|
||||||
!contains(QT_CONFIG, accessibility-atspi-bridge): SUBDIRS -= qaccessibilitylinux
|
!contains(QT_CONFIG, accessibility-atspi-bridge): SUBDIRS -= qaccessibilitylinux
|
||||||
|
|
||||||
@ -58,7 +57,7 @@ wince*|!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility
|
|||||||
macplist \
|
macplist \
|
||||||
qaccessibilitymac
|
qaccessibilitymac
|
||||||
|
|
||||||
!embedded|wince: SUBDIRS -= \
|
!embedded: SUBDIRS -= \
|
||||||
qdirectpainter
|
qdirectpainter
|
||||||
|
|
||||||
winrt: SUBDIRS -= \
|
winrt: SUBDIRS -= \
|
||||||
|
@ -7,12 +7,6 @@ HEADERS += accessiblewidgets.h
|
|||||||
|
|
||||||
unix:!darwin:!haiku:!integity: LIBS += -lm
|
unix:!darwin:!haiku:!integity: LIBS += -lm
|
||||||
|
|
||||||
wince {
|
|
||||||
accessneeded.files = $$QT_BUILD_TREE\\plugins\\accessible\\*.dll
|
|
||||||
accessneeded.path = accessible
|
|
||||||
DEPLOYMENT += accessneeded
|
|
||||||
}
|
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
!*g++:!winrt {
|
!*g++:!winrt {
|
||||||
include(../../../../src/3rdparty/iaccessible2/iaccessible2.pri)
|
include(../../../../src/3rdparty/iaccessible2/iaccessible2.pri)
|
||||||
|
@ -68,20 +68,6 @@ static inline void setFrameless(QWidget *w)
|
|||||||
w->setWindowFlags(flags);
|
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,
|
static inline bool verifyChild(QWidget *child, QAccessibleInterface *interface,
|
||||||
int index, const QRect &domain)
|
int index, const QRect &domain)
|
||||||
{
|
{
|
||||||
@ -1469,10 +1455,6 @@ void tst_QAccessibility::menuTest()
|
|||||||
QCOMPARE(iHelp->role(), QAccessible::MenuItem);
|
QCOMPARE(iHelp->role(), QAccessible::MenuItem);
|
||||||
QCOMPARE(iAction->role(), QAccessible::MenuItem);
|
QCOMPARE(iAction->role(), QAccessible::MenuItem);
|
||||||
#ifndef Q_OS_MAC
|
#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(mw.mapFromGlobal(interface->rect().topLeft()), mw.menuBar()->geometry().topLeft());
|
||||||
QCOMPARE(interface->rect().size(), mw.menuBar()->size());
|
QCOMPARE(interface->rect().size(), mw.menuBar()->size());
|
||||||
|
|
||||||
@ -3561,10 +3543,6 @@ void tst_QAccessibility::dockWidgetTest()
|
|||||||
|
|
||||||
void tst_QAccessibility::comboBoxTest()
|
void tst_QAccessibility::comboBoxTest()
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_WINCE)
|
|
||||||
if (!IsValidCEPlatform())
|
|
||||||
QSKIP("Test skipped on Windows Mobile test hardware");
|
|
||||||
#endif
|
|
||||||
{ // not editable combobox
|
{ // not editable combobox
|
||||||
QComboBox combo;
|
QComboBox combo;
|
||||||
combo.addItems(QStringList() << "one" << "two" << "three");
|
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
|
QT = core xml testlib
|
||||||
|
|
||||||
wince* {
|
|
||||||
wince*|qt_not_deployed {
|
|
||||||
DEPLOYMENT_PLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
TESTDATA += testdata/* doubleNamespaces.xml umlaut.xml
|
TESTDATA += testdata/* doubleNamespaces.xml umlaut.xml
|
||||||
|
@ -94,9 +94,6 @@ PlatformInfo PlatformInfo::localHostInfo()
|
|||||||
uname.start(QLS("uname"), QStringList() << QLS("-r"));
|
uname.start(QLS("uname"), QStringList() << QLS("-r"));
|
||||||
if (uname.waitForFinished(3000))
|
if (uname.waitForFinished(3000))
|
||||||
pi.insert(PI_OSVersion, QString::fromLocal8Bit(uname.readAllStandardOutput().constData()).simplified());
|
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)
|
#elif defined(Q_OS_WIN)
|
||||||
pi.insert(PI_OSName, QLS("Windows"));
|
pi.insert(PI_OSName, QLS("Windows"));
|
||||||
pi.insert(PI_OSVersion, QString::number(QSysInfo::windowsVersion()));
|
pi.insert(PI_OSVersion, QString::number(QSysInfo::windowsVersion()));
|
||||||
|
@ -59,10 +59,6 @@ private slots:
|
|||||||
|
|
||||||
void tst_qdiriterator::data()
|
void tst_qdiriterator::data()
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_WINCE)
|
|
||||||
QByteArray qtdir = qPrintable(QCoreApplication::applicationDirPath());
|
|
||||||
qtdir += "/depot";
|
|
||||||
#else
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
const char *qtdir = "C:\\depot\\qt\\main";
|
const char *qtdir = "C:\\depot\\qt\\main";
|
||||||
#else
|
#else
|
||||||
@ -72,7 +68,6 @@ void tst_qdiriterator::data()
|
|||||||
fprintf(stderr, "QTDIR not set\n");
|
fprintf(stderr, "QTDIR not set\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
QTest::addColumn<QByteArray>("dirpath");
|
QTest::addColumn<QByteArray>("dirpath");
|
||||||
QByteArray ba = QByteArray(qtdir) + "/src/corelib";
|
QByteArray ba = QByteArray(qtdir) + "/src/corelib";
|
||||||
|
@ -6,10 +6,3 @@ CONFIG += release
|
|||||||
|
|
||||||
SOURCES += main.cpp qfilesystemiterator.cpp
|
SOURCES += main.cpp qfilesystemiterator.cpp
|
||||||
HEADERS += qfilesystemiterator.h
|
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");
|
dir.cd("tst");
|
||||||
tmpDirName = dir.absolutePath();
|
tmpDirName = dir.absolutePath();
|
||||||
|
|
||||||
#if defined(Q_OS_WINCE)
|
for (int i = 0; i < 1000; ++i) {
|
||||||
for (int i = 0; i < 100; ++i)
|
|
||||||
#else
|
|
||||||
for (int i = 0; i < 1000; ++i)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
QFile f(tmpDirName + QLatin1Char('/') + QString::number(i));
|
QFile f(tmpDirName + QLatin1Char('/') + QString::number(i));
|
||||||
f.open(QIODevice::WriteOnly);
|
f.open(QIODevice::WriteOnly);
|
||||||
f.seek(511);
|
f.seek(511);
|
||||||
|
@ -41,7 +41,7 @@ class qfileinfo : public QObject
|
|||||||
private slots:
|
private slots:
|
||||||
void existsTemporary();
|
void existsTemporary();
|
||||||
void existsStatic();
|
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 symLinkTargetPerformanceLNK();
|
||||||
void symLinkTargetPerformanceMounpoint();
|
void symLinkTargetPerformanceMounpoint();
|
||||||
#endif
|
#endif
|
||||||
@ -71,7 +71,7 @@ void qfileinfo::existsStatic()
|
|||||||
QBENCHMARK { QFileInfo::exists(appPath); }
|
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()
|
void qfileinfo::symLinkTargetPerformanceLNK()
|
||||||
{
|
{
|
||||||
QVERIFY(QFile::link("file","link.lnk"));
|
QVERIFY(QFile::link("file","link.lnk"));
|
||||||
|
@ -33,7 +33,7 @@ class tst_QProcess : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
#if !defined(QT_NO_PROCESS) && !defined(Q_OS_WINCE)
|
#if !defined(QT_NO_PROCESS)
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
void echoTest_performance();
|
void echoTest_performance();
|
||||||
@ -41,8 +41,7 @@ private slots:
|
|||||||
#endif // QT_NO_PROCESS
|
#endif // QT_NO_PROCESS
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(QT_NO_PROCESS) && !defined(Q_OS_WINCE)
|
#if !defined(QT_NO_PROCESS)
|
||||||
// Reading and writing to a process is not supported on Qt/CE
|
|
||||||
void tst_QProcess::echoTest_performance()
|
void tst_QProcess::echoTest_performance()
|
||||||
{
|
{
|
||||||
QProcess process;
|
QProcess process;
|
||||||
@ -88,7 +87,7 @@ void tst_QProcess::echoTest_performance()
|
|||||||
QVERIFY(process.waitForFinished());
|
QVERIFY(process.waitForFinished());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // QT_NO_PROCESS && Q_OS_WINCE
|
#endif // QT_NO_PROCESS
|
||||||
|
|
||||||
QTEST_MAIN(tst_QProcess)
|
QTEST_MAIN(tst_QProcess)
|
||||||
#include "tst_bench_qprocess.moc"
|
#include "tst_bench_qprocess.moc"
|
||||||
|
@ -119,12 +119,7 @@ struct Large { // A "large" item type
|
|||||||
int x[1000];
|
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
|
#define LARGE_MAX_SIZE 20000
|
||||||
#endif
|
|
||||||
|
|
||||||
class tst_vector_vs_std : public QObject
|
class tst_vector_vs_std : public QObject
|
||||||
{
|
{
|
||||||
|
@ -34,15 +34,6 @@
|
|||||||
|
|
||||||
#include <time.h>
|
#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
|
class tst_bench_QCryptographicHash : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -401,9 +401,6 @@ void tst_QGraphicsView::chipTester_data()
|
|||||||
|
|
||||||
void tst_QGraphicsView::chipTester()
|
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, antialias);
|
||||||
QFETCH(bool, opengl);
|
QFETCH(bool, opengl);
|
||||||
QFETCH(int, operation);
|
QFETCH(int, operation);
|
||||||
|
@ -8,19 +8,3 @@ SOURCES += tst_qimagereader.cpp
|
|||||||
!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF
|
!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF
|
||||||
!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
|
!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
|
||||||
QT += network
|
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()
|
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
|
enum {UploadSize = 128*1024*1024}; // 128 MB
|
||||||
#endif
|
|
||||||
ThreadedDataReaderHttpServer reader;
|
ThreadedDataReaderHttpServer reader;
|
||||||
FixedSizeDataGenerator generator(UploadSize);
|
FixedSizeDataGenerator generator(UploadSize);
|
||||||
|
|
||||||
@ -739,12 +735,9 @@ void tst_qnetworkreply::httpDownloadPerformance()
|
|||||||
{
|
{
|
||||||
QFETCH(bool, serverSendsContentLength);
|
QFETCH(bool, serverSendsContentLength);
|
||||||
QFETCH(bool, chunkedEncoding);
|
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
|
enum {UploadSize = 128*1024*1024}; // 128 MB
|
||||||
#endif
|
|
||||||
HttpDownloadPerformanceServer server(UploadSize, serverSendsContentLength, chunkedEncoding);
|
HttpDownloadPerformanceServer server(UploadSize, serverSendsContentLength, chunkedEncoding);
|
||||||
|
|
||||||
QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(server.serverPort()) + "/?bare=1"));
|
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);
|
QFETCH(HttpDownloadPerformanceDownloadBufferTestType, testType);
|
||||||
|
|
||||||
// On my Linux Desktop the results are already visible with 128 kB, however we use this to have good results.
|
// 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
|
enum {UploadSize = 32*1024*1024}; // 32 MB
|
||||||
#endif
|
|
||||||
|
|
||||||
HttpDownloadPerformanceServer server(UploadSize, true, false);
|
HttpDownloadPerformanceServer server(UploadSize, true, false);
|
||||||
|
|
||||||
|
@ -166,9 +166,6 @@ void tst_QTcpServer::ipv6LoopbackPerformanceTest()
|
|||||||
QFETCH_GLOBAL(bool, setProxy);
|
QFETCH_GLOBAL(bool, setProxy);
|
||||||
if (setProxy)
|
if (setProxy)
|
||||||
return;
|
return;
|
||||||
#if defined(Q_OS_WINCE_WM)
|
|
||||||
QSKIP("WinCE WM: Not yet supported");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QTcpServer server;
|
QTcpServer server;
|
||||||
if (!server.listen(QHostAddress::LocalHostIPv6, 0)) {
|
if (!server.listen(QHostAddress::LocalHostIPv6, 0)) {
|
||||||
|
@ -56,11 +56,7 @@ contains(QT_CONFIG, opengl) {
|
|||||||
contains(QT_CONFIG, egl): SUBDIRS += qopenglcontext
|
contains(QT_CONFIG, egl): SUBDIRS += qopenglcontext
|
||||||
}
|
}
|
||||||
|
|
||||||
win32 {
|
win32: SUBDIRS -= network_remote_stresstest network_stresstest
|
||||||
SUBDIRS -= network_remote_stresstest network_stresstest
|
|
||||||
# disable some tests on wince because of missing dependencies
|
|
||||||
wince: SUBDIRS -= lance windowmodality
|
|
||||||
}
|
|
||||||
|
|
||||||
lessThan(QT_MAJOR_VERSION, 5): SUBDIRS -= bearerex lance qnetworkaccessmanager/qget qmimedatabase qnetworkreply \
|
lessThan(QT_MAJOR_VERSION, 5): SUBDIRS -= bearerex lance qnetworkaccessmanager/qget qmimedatabase qnetworkreply \
|
||||||
qpainfo qscreen socketengine xembed-raster xembed-widgets windowtransparency \
|
qpainfo qscreen socketengine xembed-raster xembed-widgets windowtransparency \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user