From 1668b12466c001b1b3a022acfa9136536abd522f Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 15 Feb 2021 12:31:02 +0100 Subject: Fix deprecated API in network/torrent example Change-Id: Ie4493f0d93cdeff281c3826d2ca3beb4e68d7a0f Reviewed-by: Shawn Rutledge (cherry picked from commit ab585356bd8815bdc17cecac0a0d5fcf54d50dff) Reviewed-by: Qt Cherry-pick Bot --- examples/network/torrent/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') 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; -- cgit v1.2.3