summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/widgets')
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp12
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro2
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp28
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp6
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp9
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp40
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp38
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp15
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp30
-rw-r--r--tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp22
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp6
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro2
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp6
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp17
14 files changed, 56 insertions, 177 deletions
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index 2a356f574c..1ae33ef7a1 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -78,9 +78,6 @@ class tst_QComboBox : public QObject
public:
tst_QComboBox() {}
-public slots:
- void init();
-
private slots:
void getSetCheck();
void ensureReturnIsIgnored();
@@ -395,13 +392,6 @@ private:
};
-void tst_QComboBox::init()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QComboBox::setEditable()
{
TestWidget topLevel;
@@ -2752,7 +2742,7 @@ void tst_QComboBox::keyBoardNavigationWithMouse()
QCOMPARE(combo.currentText(), QLatin1String("0"));
// When calling cursor function, Windows CE responds with: This function is not supported on this system.
-#if !defined Q_OS_WINCE && !defined Q_OS_QNX
+#if !defined Q_OS_QNX
// Force cursor movement to prevent QCursor::setPos() from returning prematurely on QPA:
centerCursor(combo.view());
QTest::qWait(200);
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro b/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro
index 411185ae2a..c4bc1cab21 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro
+++ b/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro
@@ -2,5 +2,3 @@ CONFIG += testcase
TARGET = tst_qdatetimeedit
QT += widgets testlib core-private widgets-private
SOURCES += tst_qdatetimeedit.cpp
-
-wincewm50smart-msvc2005: DEFINES += WINCE_NO_MODIFIER_KEYS
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
index 831d7257ba..28c2e92f78 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -84,30 +84,6 @@ Q_DECLARE_METATYPE(Qt::Key);
Q_DECLARE_METATYPE(Qt::KeyboardModifiers);
Q_DECLARE_METATYPE(Qt::KeyboardModifier);
-#if defined(Q_OS_WINCE)
-#ifndef SPI_GETPLATFORMTYPE
-#define SPI_GETPLATFORMTYPE 257
-#endif
-
-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_pocket_pc() {
- return qt_wince_is_platform(QString::fromLatin1("PocketPC"));
-}
-bool qt_wince_is_smartphone() {
- return qt_wince_is_platform(QString::fromLatin1("Smartphone"));
-}
-bool qt_wince_is_mobile() {
- return (qt_wince_is_smartphone() || qt_wince_is_pocket_pc());
-}
-#endif
-
class EditorDateEdit : public QDateTimeEdit
{
Q_OBJECT
@@ -331,7 +307,7 @@ void tst_QDateTimeEdit::cleanupTestCase()
void tst_QDateTimeEdit::init()
{
QLocale::setDefault(QLocale(QLocale::C));
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT));
#endif
testWidget->setDisplayFormat("dd/MM/yyyy"); // Nice default to have
@@ -3107,7 +3083,7 @@ void tst_QDateTimeEdit::nextPrevSection_data()
// 1. mac doesn't do these,
// 2. some WinCE devices do not have modifiers
-#if !defined(Q_OS_MAC) && !defined(WINCE_NO_MODIFIER_KEYS)
+#if !defined(Q_OS_DARWIN)
QTest::newRow("ctrl-right") << Qt::Key_Right << (Qt::KeyboardModifiers)Qt::ControlModifier << QString("56");
QTest::newRow("ctrl-left") << Qt::Key_Left << (Qt::KeyboardModifiers)Qt::ControlModifier << QString("12");
#endif
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index 598b518810..a4614d0a9d 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -70,8 +70,6 @@
#include "../../../shared/platforminputcontext.h"
#include <private/qinputmethod_p.h>
-#include "../../../qtest-config.h"
-
QT_BEGIN_NAMESPACE
class QPainter;
QT_END_NAMESPACE
@@ -252,7 +250,7 @@ private slots:
void noTextEditedOnClear();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void cursor();
#endif
@@ -3484,7 +3482,7 @@ void tst_QLineEdit::textMargin()
QTRY_COMPARE(testWidget.cursorPosition(), cursorPosition);
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QLineEdit::cursor()
{
QLineEdit *testWidget = ensureTestWidget();
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
index 5bd26c632c..9f8d4e4588 100644
--- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
@@ -45,8 +45,6 @@
#include <private/qmainwindowlayout_p.h>
#include <private/qdockarealayout_p.h>
-#include "../../../qtest-config.h"
-
static uchar restoreData41[] = { 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x0, 0x0, 0x0, 0x0, 0xfd, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x64, 0x0, 0x0, 0x1, 0x19, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x30, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x34, 0x1, 0x0, 0x0, 0x0, 0x49, 0x0, 0x0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 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x31, 0x1, 0x0, 0x0, 0x0, 0xd6, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x35, 0x1, 0x0, 0x0, 0x1, 0x42, 0x0, 0x0, 0x0, 0x66, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xb8, 0x0, 0x0, 0x0, 0xa0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0xfc, 0x0, 0x0, 0x0, 0x0};
@@ -131,7 +129,7 @@ private slots:
void contentsMargins_data();
void contentsMargins();
void isSeparator();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void setCursor();
#endif
void addToolbarAfterShow();
@@ -595,9 +593,6 @@ void tst_QMainWindow::menuBar()
mw.setMenuBar(mb1);
QVERIFY(mw.menuBar() != 0);
QCOMPARE(mw.menuBar(), (QMenuBar *)mb1);
-#ifdef Q_OS_WINCE_WM
- QSKIP("With native menubar integration the menubar is not a child");
-#endif
QCOMPARE(mb1->parentWidget(), (QWidget *)&mw);
mw.setMenuBar(0);
@@ -1728,7 +1723,7 @@ class MainWindow : public QMainWindow {
using QMainWindow::event;
};
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QMainWindow::setCursor()
{
MainWindow mw;
diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
index d568cf63d4..a5a94f109a 100644
--- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
@@ -228,7 +228,6 @@ class tst_QMdiArea : public QObject
public:
tst_QMdiArea();
public slots:
- void initTestCase();
void cleanup();
protected slots:
@@ -293,13 +292,6 @@ tst_QMdiArea::tst_QMdiArea()
qRegisterMetaType<QMdiSubWindow *>();
}
-void tst_QMdiArea::initTestCase()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QMdiArea::cleanup()
{
QVERIFY(QApplication::topLevelWidgets().isEmpty());
@@ -509,9 +501,6 @@ void tst_QMdiArea::subWindowActivated2()
if (!macHasAccessToWindowsServer())
QEXPECT_FAIL("", "showMinimized doesn't really minimize if you don't have access to the server", Abort);
#endif
-#ifdef Q_OS_WINCE
- QSKIP("Not fixed yet. See Task 197453");
-#endif
#ifdef Q_OS_MAC
QSKIP("QTBUG-25298: This test is unstable on Mac.");
#endif
@@ -649,7 +638,7 @@ void tst_QMdiArea::changeWindowTitle()
#else
widget->setWindowState(Qt::WindowMaximized);
#endif
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QTRY_COMPARE( mw->windowTitle(), windowTitle(mwc, wc) );
#endif
@@ -658,7 +647,7 @@ void tst_QMdiArea::changeWindowTitle()
mw->show();
QVERIFY(QTest::qWaitForWindowExposed(mw));
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QTRY_COMPARE( mw->windowTitle(), windowTitle(mwc, wc) );
#endif
@@ -676,7 +665,7 @@ void tst_QMdiArea::changeWindowTitle()
widget->setWindowState(Qt::WindowMaximized);
#endif
qApp->processEvents();
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QTRY_COMPARE( mw->windowTitle(), windowTitle(mwc, wc) );
widget->setWindowTitle( wc2 );
QCOMPARE( mw->windowTitle(), windowTitle(mwc, wc2) );
@@ -694,7 +683,7 @@ void tst_QMdiArea::changeWindowTitle()
#endif
qApp->processEvents();
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QCOMPARE( mw->windowTitle(), windowTitle(mwc2, wc2) );
#endif
#ifdef USE_SHOW
@@ -703,7 +692,7 @@ void tst_QMdiArea::changeWindowTitle()
widget->setWindowState(Qt::WindowNoState);
#endif
qApp->processEvents();
-#if defined(Q_OS_MAC) || defined(Q_OS_WINCE)
+#if defined(Q_OS_DARWIN)
QCOMPARE(mw->windowTitle(), mwc);
#else
QCOMPARE( mw->windowTitle(), mwc2 );
@@ -715,7 +704,7 @@ void tst_QMdiArea::changeWindowTitle()
widget->setWindowState(Qt::WindowMaximized);
#endif
qApp->processEvents();
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QCOMPARE( mw->windowTitle(), windowTitle(mwc2, wc2) );
#endif
@@ -764,7 +753,7 @@ void tst_QMdiArea::changeModified()
QCOMPARE( mw->isWindowModified(), false);
QCOMPARE( widget->isWindowModified(), true);
widget->setWindowState(Qt::WindowMaximized);
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QCOMPARE( mw->isWindowModified(), true);
#endif
QCOMPARE( widget->isWindowModified(), true);
@@ -774,7 +763,7 @@ void tst_QMdiArea::changeModified()
QCOMPARE( widget->isWindowModified(), true);
widget->setWindowState(Qt::WindowMaximized);
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QCOMPARE( mw->isWindowModified(), true);
#endif
QCOMPARE( widget->isWindowModified(), true);
@@ -784,7 +773,7 @@ void tst_QMdiArea::changeModified()
QCOMPARE( widget->isWindowModified(), false);
widget->setWindowModified(true);
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QCOMPARE( mw->isWindowModified(), true);
#endif
QCOMPARE( widget->isWindowModified(), true);
@@ -1598,9 +1587,7 @@ void tst_QMdiArea::tileSubWindows()
qApp->processEvents();
}
workspace.setActiveSubWindow(0);
-#ifndef Q_OS_WINCE //See Task 197453 ToDo
QCOMPARE(workspace.viewport()->childrenRect(), workspace.viewport()->rect());
-#endif
QMdiSubWindow *window = windows.at(0);
@@ -1724,9 +1711,6 @@ void tst_QMdiArea::tileSubWindows()
frameWidth = workspace.style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
const int spacing = 2 * frameWidth + 2;
const QSize expectedViewportSize(3 * minSize.width() + spacing, 3 * minSize.height() + spacing);
-#ifdef Q_OS_WINCE
- QSKIP("Not fixed yet! See task 197453");
-#endif
QTRY_COMPARE(workspace.viewport()->rect().size(), expectedViewportSize);
// Restore original scrollbar behavior for test below
@@ -2005,7 +1989,7 @@ void tst_QMdiArea::delayedPlacement()
void tst_QMdiArea::iconGeometryInMenuBar()
{
-#if !defined (Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
QMainWindow mainWindow;
QMenuBar *menuBar = mainWindow.menuBar();
menuBar->setNativeMenuBar(false);
@@ -2063,11 +2047,7 @@ void tst_QMdiArea::resizeTimer()
mdiArea.show();
QVERIFY(QTest::qWaitForWindowActive(&mdiArea));
-#ifndef Q_OS_WINCE
int time = 250;
-#else
- int time = 1000;
-#endif
EventSpy timerEventSpy(subWindow, QEvent::Timer);
QCOMPARE(timerEventSpy.count(), 0);
diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
index fe5c3a14a0..086c1049ab 100644
--- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
+++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
@@ -48,8 +48,6 @@
#include <QScreen>
#include <QSizeGrip>
-#include "../../../qtest-config.h"
-
QT_BEGIN_NAMESPACE
#if !defined(Q_DEAD_CODE_FROM_QT4_WIN)
extern bool qt_tab_all_widgets();
@@ -161,7 +159,7 @@ private slots:
void showShaded();
void showNormal_data();
void showNormal();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void setOpaqueResizeAndMove_data();
void setOpaqueResizeAndMove();
#endif
@@ -184,7 +182,7 @@ private slots:
void explicitlyHiddenWidget();
void resizeTimer();
void fixedMinMaxSize();
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
void replaceMenuBarWhileMaximized();
void closeOnDoubleClick_data();
void closeOnDoubleClick();
@@ -361,7 +359,7 @@ void tst_QMdiSubWindow::mainWindowSupport()
qApp->setActiveWindow(&mainWindow);
// QMainWindow's window title is empty
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
{
QCOMPARE(mainWindow.windowTitle(), QString());
QMdiSubWindow *window = workspace->addSubWindow(new QPushButton(QLatin1String("Test")));
@@ -413,7 +411,7 @@ void tst_QMdiSubWindow::mainWindowSupport()
window->showMaximized();
qApp->processEvents();
QVERIFY(window->isMaximized());
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QVERIFY(window->maximizedButtonsWidget());
QCOMPARE(window->maximizedButtonsWidget(), mainWindow.menuBar()->cornerWidget(Qt::TopRightCorner));
QVERIFY(window->maximizedSystemMenuIconWidget());
@@ -436,13 +434,13 @@ void tst_QMdiSubWindow::mainWindowSupport()
QVERIFY(!nestedWindow->maximizedButtonsWidget());
QVERIFY(!nestedWindow->maximizedSystemMenuIconWidget());
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) && !defined(Q_OS_QNX)
+#if !defined(Q_OS_DARWIN) && !defined(Q_OS_QNX)
QCOMPARE(mainWindow.windowTitle(), QString::fromLatin1("%1 - [%2]")
.arg(originalWindowTitle, window->widget()->windowTitle()));
#endif
}
-#if defined(Q_OS_MAC) || defined(Q_OS_WINCE)
+#if defined(Q_OS_DARWIN)
return;
#endif
@@ -576,10 +574,6 @@ void tst_QMdiSubWindow::showShaded()
window->showNormal();
QTest::qWait(250);
-#ifdef Q_OS_WINCE
- QSKIP("Until we have a QEvent::WindowFlagsChange event, this will skip");
-#endif
-
const QSize minimumSizeHint = window->minimumSizeHint();
QVERIFY(minimumSizeHint.height() < 300);
const int maxHeightDiff = 300 - minimumSizeHint.height();
@@ -670,7 +664,7 @@ private:
int _count;
};
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QMdiSubWindow::setOpaqueResizeAndMove_data()
{
QTest::addColumn<bool>("opaqueMode");
@@ -1011,7 +1005,7 @@ void tst_QMdiSubWindow::setSystemMenu()
systemMenu->hide();
QVERIFY(!qApp->activePopupWidget());
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
// System menu in menu bar.
subWindow->showMaximized();
QVERIFY(subWindow->isMaximized());
@@ -1044,7 +1038,7 @@ void tst_QMdiSubWindow::setSystemMenu()
systemMenu->hide();
QVERIFY(!qApp->activePopupWidget());
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
// System menu in menu bar in reverse mode.
subWindow->showMaximized();
QVERIFY(subWindow->isMaximized());
@@ -1475,7 +1469,7 @@ void tst_QMdiSubWindow::hideAndShow()
QVERIFY(!menuBar->cornerWidget(Qt::TopRightCorner));
QMdiSubWindow *subWindow = mdiArea->addSubWindow(new QTextEdit);
subWindow->showMaximized();
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
#endif
@@ -1490,7 +1484,7 @@ void tst_QMdiSubWindow::hideAndShow()
// Show QMdiArea.
tabWidget->setCurrentIndex(0);
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
@@ -1512,7 +1506,7 @@ void tst_QMdiSubWindow::hideAndShow()
QVERIFY(subWindow);
QCOMPARE(mdiArea->activeSubWindow(), subWindow);
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
#if defined Q_OS_QNX
QEXPECT_FAIL("", "QTBUG-38231", Abort);
@@ -1540,7 +1534,7 @@ void tst_QMdiSubWindow::hideAndShow()
QVERIFY(!menuBar->cornerWidget(Qt::TopRightCorner));
subWindow->show();
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
@@ -1554,7 +1548,7 @@ void tst_QMdiSubWindow::hideAndShow()
// Show QMainWindow.
mainWindow.show();
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
@@ -1724,7 +1718,7 @@ void tst_QMdiSubWindow::fixedMinMaxSize()
QCOMPARE(subWindow->size(), minimumSize);
}
-#if !defined( Q_OS_MAC) && !defined( Q_OS_WINCE)
+#if !defined( Q_OS_DARWIN)
void tst_QMdiSubWindow::replaceMenuBarWhileMaximized()
{
@@ -1911,7 +1905,7 @@ void tst_QMdiSubWindow::mdiArea()
void tst_QMdiSubWindow::task_182852()
{
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QMdiArea *workspace = new QMdiArea;
QMainWindow mainWindow;
diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
index c3b432788b..654e1899f0 100644
--- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
+++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
@@ -81,9 +81,7 @@ private slots:
void overrideMenuAction();
void statusTip();
void widgetActionFocus();
-#ifndef Q_OS_WINCE
void mouseActivation();
-#endif
void tearOff();
void layoutDirection();
@@ -95,9 +93,7 @@ private slots:
void task250673_activeMultiColumnSubMenuPosition();
void task256918_setFont();
void menuSizeHint();
-#ifndef Q_OS_WINCE
void task258920_mouseBorder();
-#endif
void setFixedWidth();
void deleteActionInTriggered();
void pushButtonPopulateOnAboutToShow();
@@ -292,8 +288,6 @@ void tst_QMenu::addActionsConnect()
#endif // !QT_NO_SHORTCUT
}
-// We have a separate mouseActivation test for Windows mobile
-#ifndef Q_OS_WINCE
void tst_QMenu::mouseActivation()
{
QWidget topLevel;
@@ -333,7 +327,6 @@ void tst_QMenu::mouseActivation()
QVERIFY(submenu.isVisible());
#endif
}
-#endif
void tst_QMenu::keyboardNavigation_data()
{
@@ -464,7 +457,7 @@ void tst_QMenu::overrideMenuAction()
// On Mac and Windows CE, we need to create native key events to test menu
// action activation, so skip this part of the test.
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QAction *aQuit = new QAction("Quit", &w);
aQuit->setShortcut(QKeySequence("Ctrl+X"));
m->addAction(aQuit);
@@ -716,10 +709,8 @@ void tst_QMenu::activeSubMenuPosition()
QVERIFY(sub->pos() != QPoint(0,0));
// well, it's enough to check the pos is not (0,0) but it's more safe
// to check that submenu is to the right of the main menu too.
-#ifndef Q_OS_WINCE_WM
QVERIFY(sub->pos().x() > main->pos().x());
QCOMPARE(sub->activeAction(), subAction);
-#endif
}
// QTBUG-49588, QTBUG-48396: activeSubMenuPositionExec() is the same as
@@ -771,10 +762,8 @@ private:
void tst_QMenu::activeSubMenuPositionExec()
{
-#ifndef Q_OS_WINCE
SubMenuPositionExecMenu menu;
menu.exec(QGuiApplication::primaryScreen()->availableGeometry().center());
-#endif // !Q_OS_WINCE
}
void tst_QMenu::task242454_sizeHint()
@@ -908,7 +897,6 @@ public:
};
// Mouse move related signals for Windows Mobile unavailable
-#ifndef Q_OS_WINCE
void tst_QMenu::task258920_mouseBorder()
{
Menu258920 menu;
@@ -937,7 +925,6 @@ void tst_QMenu::task258920_mouseBorder()
QTRY_COMPARE(static_cast<QAction*>(0), menu.activeAction());
QTRY_VERIFY(menu.painted);
}
-#endif
void tst_QMenu::setFixedWidth()
{
diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
index 3bcdea3137..436a8331f0 100644
--- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
@@ -90,7 +90,7 @@ private slots:
void count();
void insertItem_QString_QObject();
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void accel();
void activatedCount();
void allowActiveAndDisabled();
@@ -113,7 +113,7 @@ private slots:
void check_altPress();
void check_altClosePress();
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void check_shortcutPress();
void check_menuPosition();
#endif
@@ -308,7 +308,7 @@ inline TestMenu tst_QMenuBar::initWindowWithComplexMenuBar(QMainWindow &w)
}
// On Mac/WinCE, native key events are needed to test menu action activation
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::accel()
{
// create a popup menu with menu items set the accelerators later...
@@ -326,7 +326,7 @@ void tst_QMenuBar::accel()
#endif
// On Mac/WinCE, native key events are needed to test menu action activation
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::activatedCount()
{
// create a popup menu with menu items set the accelerators later...
@@ -517,7 +517,7 @@ void tst_QMenuBar::insertItem_QString_QObject()
}
// On Mac/WinCE, native key events are needed to test menu action activation
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_accelKeys()
{
QMainWindow w;
@@ -590,7 +590,7 @@ void tst_QMenuBar::check_accelKeys()
#endif
// On Mac/WinCE, native key events are needed to test menu action activation
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_cursorKeys1()
{
QMainWindow w;
@@ -624,7 +624,7 @@ void tst_QMenuBar::check_cursorKeys1()
#endif
// Qt/Mac,WinCE does not use the native popups/menubar
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_cursorKeys2()
{
QMainWindow w;
@@ -657,7 +657,7 @@ void tst_QMenuBar::check_cursorKeys2()
If a popupmenu is active you can use Left to move to the menu to the left of it.
*/
// Qt/Mac,WinCE does not use the native popups/menubar
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_cursorKeys3()
{
QMainWindow w;
@@ -772,7 +772,7 @@ void tst_QMenuBar::check_endKey()
*/
// Qt/Mac,WinCE does not use the native popups/menubar
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_escKey()
{
QMainWindow w;
@@ -917,7 +917,7 @@ void tst_QMenuBar::check_escKey()
// QCOMPARE(m_complexActionTriggerCount['h'], (uint)itemH_count);
// }
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::allowActiveAndDisabled()
{
QMenuBar menuBar;
@@ -1007,7 +1007,7 @@ void tst_QMenuBar::check_altClosePress()
}
// Qt/Mac,WinCE does not use the native popups/menubar
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_shortcutPress()
{
QMainWindow w;
@@ -1050,7 +1050,7 @@ private:
};
// Qt/Mac,WinCE does not use the native popups/menubar
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_menuPosition()
{
QMainWindow w;
@@ -1119,7 +1119,7 @@ void tst_QMenuBar::check_menuPosition()
menu.close();
}
-# ifndef QTEST_NO_CURSOR
+# ifndef QT_NO_CURSOR
// QTBUG-28031: Click at bottom-right corner.
{
w.move(400, 200);
@@ -1133,7 +1133,7 @@ void tst_QMenuBar::check_menuPosition()
QCOMPARE(menu.geometry().right() - 1, globalPos.x());
menu.close();
}
-# endif // QTEST_NO_CURSOR
+# endif // QT_NO_CURSOR
}
#endif
@@ -1389,7 +1389,7 @@ void tst_QMenuBar::cornerWidgets()
QFETCH(Qt::Corner, corner);
-#if defined(Q_OS_OSX) || defined(Q_OS_WINCE)
+#if defined(Q_OS_OSX)
QSKIP("Test interferes with native menu bars on this platform");
#endif
diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
index 6ad13cd781..a6d3a84495 100644
--- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
+++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
@@ -48,8 +48,6 @@
#include "qplaintextedit.h"
#include "../../../shared/platformclipboard.h"
-#include "../../../qtest-config.h"
-
//Used in copyAvailable
typedef QPair<Qt::Key, Qt::KeyboardModifier> keyPairType;
typedef QList<keyPairType> pairListType;
@@ -64,7 +62,6 @@ public:
tst_QPlainTextEdit();
public slots:
- void initTestCase();
void init();
void cleanup();
private slots:
@@ -104,7 +101,7 @@ private slots:
void shiftDownInLineLastShouldSelectToEnd();
void undoRedoShouldRepositionTextEditCursor();
void lineWrapModes();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void mouseCursorShape();
#endif
void implicitClear();
@@ -208,16 +205,8 @@ void tst_QPlainTextEdit::getSetCheck()
QCOMPARE(0, obj1.tabStopWidth());
obj1.setTabStopWidth(INT_MIN);
QCOMPARE(0, obj1.tabStopWidth()); // Makes no sense to set a negative tabstop value
-#if defined(Q_OS_WINCE)
- // due to rounding error in qRound when qreal==float
- // we cannot use INT_MAX for this check
- obj1.setTabStopWidth(SHRT_MAX*2);
- QCOMPARE(SHRT_MAX*2, obj1.tabStopWidth());
-#else
obj1.setTabStopWidth(INT_MAX);
QCOMPARE(INT_MAX, obj1.tabStopWidth());
-#endif
-
}
class QtTestDocumentLayout : public QAbstractTextDocumentLayout
@@ -251,13 +240,6 @@ public:
tst_QPlainTextEdit::tst_QPlainTextEdit()
{}
-void tst_QPlainTextEdit::initTestCase()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QPlainTextEdit::init()
{
ed = new QPlainTextEdit(0);
@@ -896,7 +878,7 @@ void tst_QPlainTextEdit::lineWrapModes()
delete window;
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QPlainTextEdit::mouseCursorShape()
{
// always show an IBeamCursor, see change 170146
diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
index 302d290c72..7bbbc46b5a 100644
--- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
+++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
@@ -526,12 +526,6 @@ void tst_QPushButton::sizeHint_data()
#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA)
QTest::newRow("windowsvista") << QString::fromLatin1("windowsvista");
#endif
-#if defined(Q_OS_WINCE) && !defined(QT_NO_STYLE_WINDOWSCE)
- QTest::newRow("windowsce") << QString::fromLatin1("windowsce");
-#endif
-#if defined(Q_OS_WINCE_WM) && !defined(QT_NO_STYLE_WINDOWSCE)
- QTest::newRow("windowsmobile") << QString::fromLatin1("windowsmobile");
-#endif
}
void tst_QPushButton::sizeHint()
diff --git a/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro b/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro
index 92c2f6cb7e..6523209c32 100644
--- a/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro
+++ b/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro
@@ -8,4 +8,4 @@ INCLUDEPATH += ../
HEADERS +=
SOURCES += tst_qtabwidget.cpp
-win32:!wince:!winrt: LIBS += -luser32
+win32:!winrt: LIBS += -luser32
diff --git a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
index f8125bf749..2a2331c3bf 100644
--- a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
+++ b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
@@ -35,7 +35,7 @@
#include <qlabel.h>
#include <QtWidgets/qboxlayout.h>
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
# include <qt_windows.h>
#define Q_CHECK_PAINTEVENTS \
if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \
@@ -553,9 +553,7 @@ void tst_QTabWidget::paintEventCount()
// Mac, Windows and Windows CE get multiple repaints on the first show, so use those as a starting point.
static const int MaxInitialPaintCount =
-#if defined(Q_OS_WINCE)
- 4;
-#elif defined(Q_OS_WIN)
+#if defined(Q_OS_WIN)
2;
#elif defined(Q_OS_MAC)
5;
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index f1ebfda88b..7b26489b39 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -55,8 +55,6 @@
#include "../../../shared/platforminputcontext.h"
#include <private/qinputmethod_p.h>
-#include "../../../qtest-config.h"
-
//Used in copyAvailable
typedef QPair<Qt::Key, Qt::KeyboardModifier> keyPairType;
typedef QList<keyPairType> pairListType;
@@ -125,7 +123,7 @@ private slots:
void shiftDownInLineLastShouldSelectToEnd();
void undoRedoShouldRepositionTextEditCursor();
void lineWrapModes();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void mouseCursorShape();
#endif
void implicitClear();
@@ -276,15 +274,8 @@ void tst_QTextEdit::getSetCheck()
QCOMPARE(0, obj1.tabStopWidth());
obj1.setTabStopWidth(INT_MIN);
QCOMPARE(0, obj1.tabStopWidth()); // Makes no sense to set a negative tabstop value
-#if defined(Q_OS_WINCE)
- // due to rounding error in qRound when qreal==float
- // we cannot use INT_MAX for this check
- obj1.setTabStopWidth(SHRT_MAX*2);
- QCOMPARE(SHRT_MAX*2, obj1.tabStopWidth());
-#else
obj1.setTabStopWidth(INT_MAX);
QCOMPARE(INT_MAX, obj1.tabStopWidth());
-#endif
// bool QTextEdit::acceptRichText()
// void QTextEdit::setAcceptRichText(bool)
@@ -378,10 +369,6 @@ void tst_QTextEdit::cleanupTestCase()
void tst_QTextEdit::init()
{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-
ed = new QTextEdit(0);
rootFrameMargin = ed->document()->documentMargin();
}
@@ -1230,7 +1217,7 @@ void tst_QTextEdit::lineWrapModes()
QCOMPARE(ed->document()->pageSize().width(), qreal(1000));
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QTextEdit::mouseCursorShape()
{
// always show an IBeamCursor, see change 170146