summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qpoint.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-03-18 08:16:20 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-03-19 12:02:24 +0100
commit2fb0135efa97708025dab7654a8b2f1350dc30bf (patch)
tree304e6abe32e206a656757a2a46eb7e4121ce57d6 /src/corelib/tools/qpoint.cpp
parent98cbdae527b360e0e6d630848a375c6a025f572d (diff)
QSize/QPoint: add toSizeF/toPointF()
For symmetry with QSizeF::toSize(). [ChangeLog][QtCore][QSize] Added toSizeF(). [ChangeLog][QtCore][QPoint] Added toPointF(). Task-number: QTBUG-73160 Change-Id: I65b088b4f7365ab671ef2f0c75821b707f5ac26d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/corelib/tools/qpoint.cpp')
-rw-r--r--src/corelib/tools/qpoint.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp
index 80599a4caa..6edb054d0a 100644
--- a/src/corelib/tools/qpoint.cpp
+++ b/src/corelib/tools/qpoint.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -381,6 +381,15 @@ QT_BEGIN_NAMESPACE
\sa QPoint::operator/=()
*/
+/*!
+ \fn QPoint::toPointF() const
+ \since 6.4
+
+ Returns this point as a point with floating point accuracy.
+
+ \sa QPointF::toPoint()
+*/
+
/*****************************************************************************
QPoint stream functions
*****************************************************************************/
@@ -532,7 +541,7 @@ size_t qHash(QPoint key, size_t seed) noexcept
Constructs a copy of the given \a point.
- \sa toPoint()
+ \sa toPoint(), QPoint::toPointF()
*/
/*!
@@ -744,7 +753,7 @@ size_t qHash(QPoint key, size_t seed) noexcept
Rounds the coordinates of this point to the nearest integer, and
returns a QPoint object with the rounded coordinates.
- \sa QPointF()
+ \sa QPointF(), QPoint::toPointF()
*/
/*!