forked from qt-creator/qt-creator
Debugger: Make QMessageBox::standardIcon replacement a bit shorter
Change-Id: I3f26699230759cc5b508b0f303b343603cc947d3 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
#include "../debuggertr.h"
|
#include "../debuggertr.h"
|
||||||
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
@@ -25,11 +24,9 @@ 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);
|
||||||
const QStyle *style = QApplication::style();
|
const int iconSize = style()->pixelMetric(QStyle::PM_MessageBoxIconSize);
|
||||||
const int iconSize = style->pixelMetric(QStyle::PM_MessageBoxIconSize);
|
const QIcon icon = style()->standardIcon(QStyle::SP_MessageBoxQuestion);
|
||||||
const QIcon icon = style->standardIcon(QStyle::SP_MessageBoxQuestion);
|
m_pixmapLabel->setPixmap(icon.pixmap(QSize(iconSize, iconSize), devicePixelRatio()));
|
||||||
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