Rename Gui test utility's factor() to scaleFactor()

This makes it more clear which 'factor' the function is about.
The function internally calls a pre-existing 'factor()' function,
but since that is a static method of QHighDpiScaling, there the
meaning of 'factor' is more clear from the call context:
QHighDpiScaling::factor(window).

Resulted from API review.

Amends: 5ac4f04325a56d47812f528fe31ceb0d4932f664

Pick-to: 6.9
Task-number: QTBUG-132090
Change-Id: I869bc05116d334b53b23a46aa2bb788432f250de
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
Juha Vuolle 2024-12-30 11:59:48 +02:00
parent 3c57c73574
commit f9376703c9
2 changed files with 2 additions and 2 deletions

View File

@ -426,7 +426,7 @@ QRect QtGuiTest::toNativePixels(const QRect &value, const QWindow *window)
\internal
\return scaling factor of \a window relative to Qt.
*/
qreal QtGuiTest::factor(const QWindow *window)
qreal QtGuiTest::scaleFactor(const QWindow *window)
{
Q_ASSERT_X(window,
Q_FUNC_INFO,

View File

@ -96,7 +96,7 @@ namespace QtGuiTest
QPoint toNativePixels(const QPoint &value, const QWindow *window);
QRect toNativePixels(const QRect &value, const QWindow *window);
qreal factor(const QWindow *window);
qreal scaleFactor(const QWindow *window);
void setEventPointId(QEventPoint &p, int arg);
void setEventPointPressure(QEventPoint &p, qreal arg);