From 907fdeae67ec30fcdd1a45699114913cdbe07f97 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Sat, 3 Jun 2023 15:24:04 +0800 Subject: [PATCH] fix ci: remove unused functions Signed-off-by: Yuhang Zhao <2546789017@qq.com> --- include/FramelessHelper/Core/utils.h | 2 -- src/core/utils.cpp | 20 -------------------- 2 files changed, 22 deletions(-) diff --git a/include/FramelessHelper/Core/utils.h b/include/FramelessHelper/Core/utils.h index 97421ab..70e3b95 100644 --- a/include/FramelessHelper/Core/utils.h +++ b/include/FramelessHelper/Core/utils.h @@ -85,8 +85,6 @@ FRAMELESSHELPER_CORE_API void registerThemeChangeNotification(); [[nodiscard]] FRAMELESSHELPER_CORE_API bool isValidGeometry(const QRect &rect); [[nodiscard]] FRAMELESSHELPER_CORE_API QColor getAccentColor(); [[nodiscard]] FRAMELESSHELPER_CORE_API quint32 defaultScreenDpi(); -[[nodiscard]] FRAMELESSHELPER_CORE_API qreal getRealDevicePixelRatio(const QWindow *window); -[[nodiscard]] FRAMELESSHELPER_CORE_API qreal getQtDevicePixelRatio(const QWindow *window); #ifdef Q_OS_WINDOWS [[nodiscard]] FRAMELESSHELPER_CORE_API bool isWindowsVersionOrGreater(const Global::WindowsVersion version); diff --git a/src/core/utils.cpp b/src/core/utils.cpp index d6231bf..8cce42a 100644 --- a/src/core/utils.cpp +++ b/src/core/utils.cpp @@ -564,26 +564,6 @@ quint32 Utils::defaultScreenDpi() #endif // Q_OS_MACOS } -qreal Utils::getRealDevicePixelRatio(const QWindow *window) -{ - Q_ASSERT(window); - if (!window) { - return qreal(1); - } - // Qt doesn't support device pixel ratio smaller than 1. - return std::max(qreal(getDpiForWindow(window)) / qreal(defaultScreenDpi()), qreal(1)); -} - -qreal Utils::getQtDevicePixelRatio(const QWindow *window) -{ - Q_ASSERT(window); - if (!window) { - return qreal(1); - } - // Apply the rounding policy from Qt, most probably set by the user. - return roundScaleFactor(getRealDevicePixelRatio(window)); -} - QColor Utils::getAccentColor() { #if (QT_VERSION >= QT_VERSION_CHECK(6, 6, 0))