diff options
author | Juha Vuolle <[email protected]> | 2024-12-30 11:59:48 +0200 |
---|---|---|
committer | Juha Vuolle <[email protected]> | 2025-01-05 15:16:46 +0200 |
commit | f9376703c92e957c7334a2ff42a801237f53c8bf (patch) | |
tree | 6f36d4bcb67e4471039a948084046c9990bb49b5 | |
parent | 3c57c7357422bdfda60f56901a7590b258915b6b (diff) |
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 <[email protected]>
Reviewed-by: Axel Spoerl <[email protected]>
-rw-r--r-- | src/gui/kernel/qtestsupport_gui.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qtestsupport_gui.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qtestsupport_gui.cpp b/src/gui/kernel/qtestsupport_gui.cpp index 5867028b630..ca62798ddfd 100644 --- a/src/gui/kernel/qtestsupport_gui.cpp +++ b/src/gui/kernel/qtestsupport_gui.cpp @@ -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, diff --git a/src/gui/kernel/qtestsupport_gui.h b/src/gui/kernel/qtestsupport_gui.h index 581e13713e8..0ae62cefacd 100644 --- a/src/gui/kernel/qtestsupport_gui.h +++ b/src/gui/kernel/qtestsupport_gui.h @@ -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); |