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 <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
bb10
Christian Ehrlicher 2024-02-16 22:19:56 +01:00
parent b9e5e5ea69
commit e379203aed
1 changed files with 0 additions and 40 deletions

View File

@ -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<QPlatformTheme::StandardPixmap>(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<QPlatformTheme::StandardPixmap>(standardPixmap);
desktopIcon = theme->standardPixmap(sp, QSizeF());
}
break;
default:
break;
}
if (!desktopIcon.isNull()) {
return desktopIcon;
}
#endif // Q_OS_WIN
return QCommonStyle::standardPixmap(standardPixmap, opt, widget);
}