From ab585356bd8815bdc17cecac0a0d5fcf54d50dff Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 15 Feb 2021 12:31:02 +0100 Subject: [PATCH] Fix deprecated API in network/torrent example Pick-to: 6.1 Change-Id: Ie4493f0d93cdeff281c3826d2ca3beb4e68d7a0f Reviewed-by: Shawn Rutledge --- examples/network/torrent/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp index 129ded3fa4..10a54e7962 100644 --- a/examples/network/torrent/mainwindow.cpp +++ b/examples/network/torrent/mainwindow.cpp @@ -93,7 +93,7 @@ public: progressBarOption.state = QStyle::State_Enabled; progressBarOption.direction = QApplication::layoutDirection(); progressBarOption.rect = option.rect; - progressBarOption.fontMetrics = QApplication::fontMetrics(); + progressBarOption.fontMetrics = QFontMetrics(QApplication::font()); progressBarOption.minimum = 0; progressBarOption.maximum = 100; progressBarOption.textAlignment = Qt::AlignCenter;