From e379203aedb0979146104f3f21b73cea87050f28 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Fri, 16 Feb 2024 22:19:56 +0100 Subject: [PATCH] QWindowsStyle: remove unused code in QWindowsStyle::standardPixmap() The code in QWindowsStyle::standardPixmap() is reimplemented in QCommonStylePrivate::iconFromWindowsTheme() in a better way (as it honors the dpr) so no need to leave it here. Change-Id: Icc418d2bd0cff06a8a8e5bc6c14a99bfb34cfc68 Reviewed-by: Timur Pocheptsov Reviewed-by: Volker Hilsheimer --- src/widgets/styles/qwindowsstyle.cpp | 40 ---------------------------- 1 file changed, 40 deletions(-) diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index a62ca65428..bae182b467 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -435,46 +435,6 @@ int QWindowsStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QW QPixmap QWindowsStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget) const { -#if defined(Q_OS_WIN) - QPixmap desktopIcon; - switch(standardPixmap) { - case SP_DriveCDIcon: - case SP_DriveDVDIcon: - case SP_DriveNetIcon: - case SP_DriveHDIcon: - case SP_DriveFDIcon: - case SP_FileIcon: - case SP_FileLinkIcon: - case SP_DirLinkIcon: - case SP_DirClosedIcon: - case SP_DesktopIcon: - case SP_ComputerIcon: - case SP_DirOpenIcon: - case SP_FileDialogNewFolder: - case SP_DirHomeIcon: - case SP_TrashIcon: - case SP_VistaShield: - if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { - QPlatformTheme::StandardPixmap sp = static_cast(standardPixmap); - desktopIcon = theme->standardPixmap(sp, QSizeF(16, 16)); - } - break; - case SP_MessageBoxInformation: - case SP_MessageBoxWarning: - case SP_MessageBoxCritical: - case SP_MessageBoxQuestion: - if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { - QPlatformTheme::StandardPixmap sp = static_cast(standardPixmap); - desktopIcon = theme->standardPixmap(sp, QSizeF()); - } - break; - default: - break; - } - if (!desktopIcon.isNull()) { - return desktopIcon; - } -#endif // Q_OS_WIN return QCommonStyle::standardPixmap(standardPixmap, opt, widget); }