forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
c347fecf2e
commit
1a669df0f1
@@ -5,9 +5,11 @@
|
|||||||
|
|
||||||
#include "../debuggertr.h"
|
#include "../debuggertr.h"
|
||||||
|
|
||||||
|
#include <QApplication>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QStyle>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
@@ -23,7 +25,11 @@ SymbolPathsDialog::SymbolPathsDialog(QWidget *parent) :
|
|||||||
m_pixmapLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
m_pixmapLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||||
m_pixmapLabel->setAlignment(Qt::AlignHCenter|Qt::AlignTop);
|
m_pixmapLabel->setAlignment(Qt::AlignHCenter|Qt::AlignTop);
|
||||||
m_pixmapLabel->setMargin(5);
|
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 "
|
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 "
|
"public Microsoft Symbol Server.<br/>This is recommended for retrieval of the symbols "
|
||||||
|
Reference in New Issue
Block a user