From 5f5c342924a0d9a2856b2f2d6db373e25723f2b0 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Mon, 2 Nov 2020 07:00:18 +0100 Subject: Remove Windows 7, 8, and 8.1 codepaths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pick-to: 6.2 Task-number: QTBUG-84432 Change-Id: I970d7d7e9ebdcf246a5be32d60066b4e5e948c27 Reviewed-by: MÃ¥rten Nordheim --- src/plugins/platforms/windows/qwindowscontext.cpp | 27 ++++++++-------------- .../styles/windowsvista/qwindowsvistastyle.cpp | 15 ------------ 2 files changed, 10 insertions(+), 32 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 79db0b74e6..78961472b0 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -200,18 +200,16 @@ void QWindowsUser32DLL::init() getDisplayAutoRotationPreferences = (GetDisplayAutoRotationPreferences)library.resolve("GetDisplayAutoRotationPreferences"); setDisplayAutoRotationPreferences = (SetDisplayAutoRotationPreferences)library.resolve("SetDisplayAutoRotationPreferences"); - if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows8) { - enableMouseInPointer = (EnableMouseInPointer)library.resolve("EnableMouseInPointer"); - getPointerType = (GetPointerType)library.resolve("GetPointerType"); - getPointerInfo = (GetPointerInfo)library.resolve("GetPointerInfo"); - getPointerDeviceRects = (GetPointerDeviceRects)library.resolve("GetPointerDeviceRects"); - getPointerTouchInfo = (GetPointerTouchInfo)library.resolve("GetPointerTouchInfo"); - getPointerFrameTouchInfo = (GetPointerFrameTouchInfo)library.resolve("GetPointerFrameTouchInfo"); - getPointerFrameTouchInfoHistory = (GetPointerFrameTouchInfoHistory)library.resolve("GetPointerFrameTouchInfoHistory"); - getPointerPenInfo = (GetPointerPenInfo)library.resolve("GetPointerPenInfo"); - getPointerPenInfoHistory = (GetPointerPenInfoHistory)library.resolve("GetPointerPenInfoHistory"); - skipPointerFrameMessages = (SkipPointerFrameMessages)library.resolve("SkipPointerFrameMessages"); - } + enableMouseInPointer = (EnableMouseInPointer)library.resolve("EnableMouseInPointer"); + getPointerType = (GetPointerType)library.resolve("GetPointerType"); + getPointerInfo = (GetPointerInfo)library.resolve("GetPointerInfo"); + getPointerDeviceRects = (GetPointerDeviceRects)library.resolve("GetPointerDeviceRects"); + getPointerTouchInfo = (GetPointerTouchInfo)library.resolve("GetPointerTouchInfo"); + getPointerFrameTouchInfo = (GetPointerFrameTouchInfo)library.resolve("GetPointerFrameTouchInfo"); + getPointerFrameTouchInfoHistory = (GetPointerFrameTouchInfoHistory)library.resolve("GetPointerFrameTouchInfoHistory"); + getPointerPenInfo = (GetPointerPenInfo)library.resolve("GetPointerPenInfo"); + getPointerPenInfoHistory = (GetPointerPenInfoHistory)library.resolve("GetPointerPenInfoHistory"); + skipPointerFrameMessages = (SkipPointerFrameMessages)library.resolve("SkipPointerFrameMessages"); if (QOperatingSystemVersion::current() >= QOperatingSystemVersion(QOperatingSystemVersion::Windows, 10, 0, 14393)) { @@ -232,8 +230,6 @@ bool QWindowsUser32DLL::supportsPointerApi() void QWindowsShcoreDLL::init() { - if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows8_1) - return; QSystemLibrary library(QStringLiteral("SHCore")); getProcessDpiAwareness = (GetProcessDpiAwareness)library.resolve("GetProcessDpiAwareness"); setProcessDpiAwareness = (SetProcessDpiAwareness)library.resolve("SetProcessDpiAwareness"); @@ -405,9 +401,6 @@ bool QWindowsContext::initPointer(unsigned integrationOptions) if (integrationOptions & QWindowsIntegration::DontUseWMPointer) return false; - if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows8) - return false; - if (!QWindowsContext::user32dll.supportsPointerApi()) return false; diff --git a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp index f7496b62ca..67d6b0c460 100644 --- a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp +++ b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp @@ -1773,21 +1773,6 @@ void QWindowsVistaStyle::drawComplexControl(ComplexControl control, const QStyle theme.partId = flags & State_Horizontal ? SBP_THUMBBTNHORZ : SBP_THUMBBTNVERT; theme.stateId = stateId; d->drawBackground(theme); - - if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows8) { - const QRect gripperBounds = QWindowsXPStylePrivate::scrollBarGripperBounds(flags, widget, &theme); - // Draw gripper if there is enough space - if (!gripperBounds.isEmpty() && flags & State_Enabled) { - painter->save(); - XPThemeData grippBackground = theme; - grippBackground.partId = flags & State_Horizontal ? SBP_LOWERTRACKHORZ : SBP_LOWERTRACKVERT; - theme.rect = gripperBounds; - painter->setClipRegion(d->region(theme));// Only change inside the region of the gripper - d->drawBackground(grippBackground);// The gutter is the grippers background - d->drawBackground(theme); // Transparent gripper ontop of background - painter->restore(); - } - } } } } -- cgit v1.2.3