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 <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2025-02-10 10:40:44 +01:00
parent c65d6319f9
commit 8113a50d71
2 changed files with 2 additions and 2 deletions

View File

@ -690,7 +690,7 @@ QScreen *QHighDpiScaling::screenForPosition(QHighDpiScaling::Point position, QSc
return nullptr;
}
QVector<QHighDpiScaling::ScreenFactor> QHighDpiScaling::parseScreenScaleFactorsSpec(const QStringView &screenScaleFactors)
QList<QHighDpiScaling::ScreenFactor> QHighDpiScaling::parseScreenScaleFactorsSpec(QStringView screenScaleFactors)
{
QVector<QHighDpiScaling::ScreenFactor> screenFactors;

View File

@ -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<QHighDpiScaling::ScreenFactor> parseScreenScaleFactorsSpec(const QStringView &screenScaleFactors);
static QList<QHighDpiScaling::ScreenFactor> parseScreenScaleFactorsSpec(QStringView screenScaleFactors);
static qreal m_factor;
static bool m_active;