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 --- 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 +- 6 files changed, 3 insertions(+), 28 deletions(-) (limited to 'src') 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); -- cgit v1.2.3