From 2fb0135efa97708025dab7654a8b2f1350dc30bf Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 18 Mar 2022 08:16:20 +0100 Subject: 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 Reviewed-by: Qt CI Bot --- src/corelib/tools/qsize.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/corelib/tools/qsize.cpp') diff --git a/src/corelib/tools/qsize.cpp b/src/corelib/tools/qsize.cpp index 2779948aae..4f4ae9e75b 100644 --- a/src/corelib/tools/qsize.cpp +++ b/src/corelib/tools/qsize.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. @@ -403,6 +403,15 @@ QSize QSize::scaled(const QSize &s, Qt::AspectRatioMode mode) const noexcept \sa grownBy() */ +/*! + \fn QSize::toSizeF() const + \since 6.4 + + Returns this size as a size with floating point accuracy. + + \sa QSizeF::toSize() +*/ + /***************************************************************************** QSize stream functions *****************************************************************************/ @@ -520,7 +529,7 @@ QDebug operator<<(QDebug dbg, const QSize &s) Constructs a size with floating point accuracy from the given \a size. - \sa toSize() + \sa toSize(), QSize::toSizeF() */ /*! @@ -596,7 +605,7 @@ QDebug operator<<(QDebug dbg, const QSize &s) Note that the coordinates in the returned size will be rounded to the nearest integer. - \sa QSizeF() + \sa QSizeF(), QSize::toSizeF() */ /*! -- cgit v1.2.3