From 8113a50d71cb9ea320e69c2b10452972e3310f4d Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 10 Feb 2025 10:40:44 +0100 Subject: [PATCH] qhighdpiscaling: pass QStringView by value QStringViews should be passed by value, not cref, so sane ABIs pass it in registers instead of forcing the variable to the stack. As a drive-by, s/QVector/QList/ in the return type. Amends 51e2a64ed9360c8e889726c3fbaf649a4d260e0d. Pick-to: 6.9 6.8 6.5 Change-Id: I6b51dfda87643f6c7ec219ac4a8970537bb6b2ed Reviewed-by: Thiago Macieira --- src/gui/kernel/qhighdpiscaling.cpp | 2 +- src/gui/kernel/qhighdpiscaling_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp index a0e1b48dcb6..3d518409a9e 100644 --- a/src/gui/kernel/qhighdpiscaling.cpp +++ b/src/gui/kernel/qhighdpiscaling.cpp @@ -690,7 +690,7 @@ QScreen *QHighDpiScaling::screenForPosition(QHighDpiScaling::Point position, QSc return nullptr; } -QVector QHighDpiScaling::parseScreenScaleFactorsSpec(const QStringView &screenScaleFactors) +QList QHighDpiScaling::parseScreenScaleFactorsSpec(QStringView screenScaleFactors) { QVector screenFactors; diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h index f2b798bdf1e..4a2f4b7a1a3 100644 --- a/src/gui/kernel/qhighdpiscaling_p.h +++ b/src/gui/kernel/qhighdpiscaling_p.h @@ -102,7 +102,7 @@ private: static QDpi effectiveLogicalDpi(const QPlatformScreen *screen, qreal rawFactor, qreal roundedFactor); static qreal screenSubfactor(const QPlatformScreen *screen); static QScreen *screenForPosition(Point position, QScreen *guess); - static QVector parseScreenScaleFactorsSpec(const QStringView &screenScaleFactors); + static QList parseScreenScaleFactorsSpec(QStringView screenScaleFactors); static qreal m_factor; static bool m_active;