From f87e32840f3dd425a0ffd0eb7120a4a6e70aeaf4 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 18 May 2020 00:39:57 +0200 Subject: DolphinQt: Remove another usage of QFontMetrics::width QFontMetrics::width breaks building with CMake on Windows, due to a deprecation warning which gets promoted to an error. --- Source/Core/DolphinQt/Debugger/ThreadWidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Source/Core/DolphinQt/Debugger/ThreadWidget.cpp') diff --git a/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp b/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp index 3d943b2f0c..d222e89942 100644 --- a/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp @@ -17,6 +17,7 @@ #include "Core/PowerPC/MMU.h" #include "Core/PowerPC/PowerPC.h" #include "DolphinQt/Host.h" +#include "DolphinQt/QtUtils/FontMetricsHelper.h" #include "DolphinQt/Settings.h" ThreadWidget::ThreadWidget(QWidget* parent) : QDockWidget(parent) @@ -133,7 +134,8 @@ QLineEdit* ThreadWidget::CreateLineEdit() const { QLineEdit* line_edit = new QLineEdit(QLatin1Literal("00000000")); line_edit->setReadOnly(true); - line_edit->setFixedWidth(line_edit->fontMetrics().width(QLatin1Literal(" 00000000 "))); + line_edit->setFixedWidth( + FontMetricsWidth(line_edit->fontMetrics(), QLatin1Literal(" 00000000 "))); return line_edit; } -- cgit v1.2.3