From c9b7cc349a13b722ecd636ec4eb8e21f9f712add Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 23 May 2019 13:51:05 +0200 Subject: Remove usages of Q_OS_WINCE This platform is history. Change-Id: Iddfab008a509f4828c321730414c8204055cf7af Reviewed-by: Maurice Kalinowski --- examples/embedded/raycasting/raycasting.cpp | 4 ---- src/corelib/global/qoperatingsystemversion_win.cpp | 4 ---- src/corelib/kernel/qcoreapplication_win.cpp | 6 ------ src/corelib/tools/qalgorithms.h | 4 ++-- src/plugins/bearer/nla/qnlaengine.cpp | 9 --------- src/plugins/platforms/windows/qwindowstheme.cpp | 6 ------ src/widgets/dialogs/qcolordialog.cpp | 2 +- tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 6 +++--- tests/auto/network/socket/qtcpserver/crashingServer/main.cpp | 4 ++-- tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp | 3 --- tests/shared/filesystem.h | 2 +- 11 files changed, 9 insertions(+), 41 deletions(-) diff --git a/examples/embedded/raycasting/raycasting.cpp b/examples/embedded/raycasting/raycasting.cpp index d37b9f5d2e..7213811213 100644 --- a/examples/embedded/raycasting/raycasting.cpp +++ b/examples/embedded/raycasting/raycasting.cpp @@ -255,11 +255,7 @@ public: protected: void resizeEvent(QResizeEvent*) { -#if defined(Q_OS_WINCE_WM) - touchDevice = true; -#else touchDevice = false; -#endif if (touchDevice) { if (width() < height()) { trackPad = QRect(0, height() / 2, width(), height() / 2); diff --git a/src/corelib/global/qoperatingsystemversion_win.cpp b/src/corelib/global/qoperatingsystemversion_win.cpp index 2da190da48..798d985a76 100644 --- a/src/corelib/global/qoperatingsystemversion_win.cpp +++ b/src/corelib/global/qoperatingsystemversion_win.cpp @@ -84,7 +84,6 @@ static inline OSVERSIONINFOEX determineWinOsVersion() #define pGetModuleHandle GetModuleHandleW #endif -#ifndef Q_OS_WINCE HMODULE ntdll = pGetModuleHandle(L"ntdll.dll"); if (Q_UNLIKELY(!ntdll)) return result; @@ -104,9 +103,6 @@ static inline OSVERSIONINFOEX determineWinOsVersion() // GetVersionEx() has been deprecated in Windows 8.1 and will return // only Windows 8 from that version on, so use the kernel API function. pRtlGetVersion(reinterpret_cast(&result)); // always returns STATUS_SUCCESS -#else // !Q_OS_WINCE - GetVersionEx(&result); -#endif return result; } diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index 75cc813298..65e1db3745 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -64,8 +64,6 @@ using namespace Microsoft::WRL::Wrappers; QT_BEGIN_NAMESPACE -int appCmdShow = 0; - Q_CORE_EXPORT QString qAppFileName() // get application file name { /* @@ -175,16 +173,12 @@ Q_CORE_EXPORT HINSTANCE qWinAppPrevInst() // get Windows prev app Q_CORE_EXPORT int qWinAppCmdShow() // get main window show command { -#if defined(Q_OS_WINCE) - return appCmdShow; -#else STARTUPINFO startupInfo; GetStartupInfo(&startupInfo); return (startupInfo.dwFlags & STARTF_USESHOWWINDOW) ? startupInfo.wShowWindow : SW_SHOWDEFAULT; -#endif } #endif diff --git a/src/corelib/tools/qalgorithms.h b/src/corelib/tools/qalgorithms.h index f1243b5c61..b01ce0db58 100644 --- a/src/corelib/tools/qalgorithms.h +++ b/src/corelib/tools/qalgorithms.h @@ -524,7 +524,7 @@ QT_DEPRECATED_X("Use std::binary_search") Q_OUTOFLINE_TEMPLATE RandomAccessItera # if (defined __apple_build_version__ && __clang_major__ >= 7) || (Q_CC_CLANG >= 307) # define QT_HAS_CONSTEXPR_BUILTINS # endif -#elif defined(Q_CC_MSVC) && !defined(Q_CC_INTEL) && !defined(Q_OS_WINCE) && !defined(Q_PROCESSOR_ARM) +#elif defined(Q_CC_MSVC) && !defined(Q_CC_INTEL) && !defined(Q_PROCESSOR_ARM) # define QT_HAS_CONSTEXPR_BUILTINS #elif defined(Q_CC_GNU) # define QT_HAS_CONSTEXPR_BUILTINS @@ -588,7 +588,7 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) noexcept { return __builtin_popcountll(v); } -#elif defined(Q_CC_MSVC) && !defined(Q_OS_WINCE) && !defined(Q_PROCESSOR_ARM) +#elif defined(Q_CC_MSVC) && !defined(Q_PROCESSOR_ARM) #define QT_POPCOUNT_CONSTEXPR #define QT_POPCOUNT_RELAXED_CONSTEXPR #define QT_HAS_BUILTIN_CTZ diff --git a/src/plugins/bearer/nla/qnlaengine.cpp b/src/plugins/bearer/nla/qnlaengine.cpp index bf10e0cc1f..e1e60389f1 100644 --- a/src/plugins/bearer/nla/qnlaengine.cpp +++ b/src/plugins/bearer/nla/qnlaengine.cpp @@ -119,9 +119,6 @@ static void printBlob(NLA_BLOB *blob) static QNetworkConfiguration::BearerType qGetInterfaceType(const QString &interface) { -#ifdef Q_OS_WINCE - Q_UNUSED(interface) -#else unsigned long oid; DWORD bytesWritten; @@ -175,8 +172,6 @@ static QNetworkConfiguration::BearerType qGetInterfaceType(const QString &interf #ifdef BEARER_MANAGEMENT_DEBUG qDebug() << medium << physicalMedium; -#endif - #endif return QNetworkConfiguration::BearerUnknown; @@ -307,16 +302,12 @@ void QNlaThread::run() break; } -#ifndef Q_OS_WINCE // Not interested in unrelated IO completion events // although we also don't want to block them while (WaitForSingleObjectEx(changeEvent, WSA_INFINITE, true) != WAIT_IO_COMPLETION && handle) { } -#else - WaitForSingleObject(changeEvent, WSA_INFINITE); -#endif mutex.lock(); if (handle) { diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp index a6b9781252..b75c64c40e 100644 --- a/src/plugins/platforms/windows/qwindowstheme.cpp +++ b/src/plugins/platforms/windows/qwindowstheme.cpp @@ -170,15 +170,9 @@ public: if (m_params) { const QString fileName = m_params->fileName; SHFILEINFO info; -#ifndef Q_OS_WINCE - const UINT oldErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); -#endif const bool result = SHGetFileInfo(reinterpret_cast(fileName.utf16()), m_params->attributes, &info, sizeof(SHFILEINFO), m_params->flags); -#ifndef Q_OS_WINCE - SetErrorMode(oldErrorMode); -#endif m_doneMutex.lock(); if (!m_cancelled.load()) { *m_params->result = result; diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index a6b6df4045..2911fc94ad 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1621,7 +1621,7 @@ void QColorDialogPrivate::_q_pickScreenColor() q->grabMouse(); #endif -#ifdef Q_OS_WIN32 // excludes WinCE and WinRT +#ifdef Q_OS_WIN32 // excludes WinRT // On Windows mouse tracking doesn't work over other processes's windows updateTimer->start(30); diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index 1379c788d1..155f5b953d 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -33,7 +33,7 @@ #include #include #include -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) # include #endif @@ -131,7 +131,7 @@ static const char * const enumNames[MaxStandardLocation + 1 - int(QStandardPaths void tst_qstandardpaths::initTestCase() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) // Disable WOW64 redirection, see testFindExecutable() if (QSysInfo::buildCpuArchitecture() != QSysInfo::currentCpuArchitecture()) { void *oldMode; @@ -140,7 +140,7 @@ void tst_qstandardpaths::initTestCase() qErrnoWarning("Wow64DisableWow64FsRedirection() failed"); QVERIFY(disabledDisableWow64FsRedirection); } -#endif // Q_OS_WIN && !Q_OS_WINRT && !Q_OS_WINCE +#endif // Q_OS_WIN && !Q_OS_WINRT QVERIFY2(m_localConfigTempDir.isValid(), qPrintable(m_localConfigTempDir.errorString())); QVERIFY2(m_globalConfigTempDir.isValid(), qPrintable(m_globalConfigTempDir.errorString())); QVERIFY2(m_localAppTempDir.isValid(), qPrintable(m_localAppTempDir.errorString())); diff --git a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp index 1a8e7920d3..5c66ef6520 100644 --- a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp +++ b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp @@ -29,14 +29,14 @@ #include #include -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) && defined(Q_CC_MSVC) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && defined(Q_CC_MSVC) # include #endif int main(int argc, char *argv[]) { // Windows: Suppress crash notification dialog. -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) && defined(Q_CC_MSVC) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && defined(Q_CC_MSVC) _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG); #endif QCoreApplication app(argc, argv); diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp index cb829c81a6..d6ba85d61f 100644 --- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp +++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp @@ -113,10 +113,7 @@ private slots: void check_escKey(); #endif -#ifndef Q_OS_WINCE void allowActiveAndDisabled(); -#endif - void taskQTBUG56860_focus(); void check_endKey(); void check_homeKey(); diff --git a/tests/shared/filesystem.h b/tests/shared/filesystem.h index 9f4527a992..0e7e6ba867 100644 --- a/tests/shared/filesystem.h +++ b/tests/shared/filesystem.h @@ -79,7 +79,7 @@ public: return file.isNull() ? qint64(-1) : file->write(relativeFileName.toUtf8()); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) static DWORD createNtfsJunction(QString target, QString linkName, QString *errorMessage) { typedef struct { -- cgit v1.2.3