summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-13 21:04:45 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-14 18:10:19 +0200
commiteed5514eaf03c04f1b93d0899789841b8488d9a6 (patch)
tree64162fe45cee1d7e8c10baa9eedb73d8fbc16b7f /src/widgets/kernel/qapplication.cpp
parenta8dd18252c4c8027e8c7956f3c5428b56014445b (diff)
Mark QApplication::fontMetrics as obsolete
It returns the QFontMetrics of the desktop widget, so just for the default screen. Any usage of it is probably wrong, esp since code should use QFontMetricsF instead. Change-Id: I0b4b85a74a2c9b6cc023ffda0b2b399f9fc3c1c4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r--src/widgets/kernel/qapplication.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index be37182ccd..41b3dd9aca 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -1559,7 +1559,9 @@ QWidget *QApplication::activeWindow()
return QApplicationPrivate::active_window;
}
+#if QT_DEPRECATED_SINCE(6,0)
/*!
+ \obsolete Use the QFontMetricsF constructor instead
Returns display (screen) font metrics for the application font.
\sa font(), setFont(), QWidget::fontMetrics(), QPainter::fontMetrics()
@@ -1569,6 +1571,7 @@ QFontMetrics QApplication::fontMetrics()
{
return QApplicationPrivate::desktop()->fontMetrics();
}
+#endif
bool QApplicationPrivate::tryCloseAllWidgetWindows(QWindowList *processedWindows)
{