Debugger: Make QMessageBox::standardIcon replacement a bit shorter

Change-Id: I3f26699230759cc5b508b0f303b343603cc947d3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2024-09-03 08:30:28 +02:00
parent 887b65bcc3
commit 62dbaceb9c

View File

@@ -5,7 +5,6 @@
#include "../debuggertr.h"
#include <QApplication>
#include <QDialogButtonBox>
#include <QHBoxLayout>
#include <QMessageBox>
@@ -25,11 +24,9 @@ SymbolPathsDialog::SymbolPathsDialog(QWidget *parent) :
m_pixmapLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
m_pixmapLabel->setAlignment(Qt::AlignHCenter|Qt::AlignTop);
m_pixmapLabel->setMargin(5);
const QStyle *style = QApplication::style();
const int iconSize = style->pixelMetric(QStyle::PM_MessageBoxIconSize);
const QIcon icon = style->standardIcon(QStyle::SP_MessageBoxQuestion);
const qreal dpr = qApp->devicePixelRatio();
m_pixmapLabel->setPixmap(icon.pixmap(QSize(iconSize, iconSize), dpr));
const int iconSize = style()->pixelMetric(QStyle::PM_MessageBoxIconSize);
const QIcon icon = style()->standardIcon(QStyle::SP_MessageBoxQuestion);
m_pixmapLabel->setPixmap(icon.pixmap(QSize(iconSize, iconSize), devicePixelRatio()));
m_msgLabel = new QLabel(Tr::tr("<html><head/><body><p>The debugger is not configured to use the "
"public Microsoft Symbol Server.<br/>This is recommended for retrieval of the symbols "