Debugger: Fix deprecation warning

symbolpathsdialog.cpp(26): warning C4996: 'QMessageBox::standardIcon': Use QStyle::standardIcon() instead.

Change-Id: I9d2eb34dfead3cca6e5e14d2bcbe890fc95cf888
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Orgad Shaneh
2024-08-05 20:10:47 +03:00
committed by Orgad Shaneh
parent c347fecf2e
commit 1a669df0f1

View File

@@ -5,9 +5,11 @@
#include "../debuggertr.h"
#include <QApplication>
#include <QDialogButtonBox>
#include <QHBoxLayout>
#include <QMessageBox>
#include <QStyle>
#include <QVBoxLayout>
using namespace Utils;
@@ -23,7 +25,11 @@ SymbolPathsDialog::SymbolPathsDialog(QWidget *parent) :
m_pixmapLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
m_pixmapLabel->setAlignment(Qt::AlignHCenter|Qt::AlignTop);
m_pixmapLabel->setMargin(5);
m_pixmapLabel->setPixmap(QMessageBox::standardIcon(QMessageBox::Question));
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));
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 "