Skip to content

Commit

Permalink
Rename Gui test utility's factor() to scaleFactor()
Browse files Browse the repository at this point in the history
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: 5ac4f04

Pick-to: 6.9
Task-number: QTBUG-132090
Change-Id: I869bc05116d334b53b23a46aa2bb788432f250de
Reviewed-by: Volker Hilsheimer <[email protected]>
Reviewed-by: Axel Spoerl <[email protected]>
  • Loading branch information
Juha Vuolle committed Jan 5, 2025
1 parent 3c57c73 commit f937670
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui/kernel/qtestsupport_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/gui/kernel/qtestsupport_gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f937670

Please sign in to comment.