diff options
Diffstat (limited to 'src/corelib/tools/qrect.cpp')
-rw-r--r-- | src/corelib/tools/qrect.cpp | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp index dc46f85fb5..35cf2d5e5b 100644 --- a/src/corelib/tools/qrect.cpp +++ b/src/corelib/tools/qrect.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -36,8 +36,6 @@ #include "qdebug.h" #include "qmath.h" -#include <math.h> - QT_BEGIN_NAMESPACE /*! @@ -295,7 +293,7 @@ QT_BEGIN_NAMESPACE \sa isValid(), isEmpty() */ -QRect QRect::normalized() const +QRect QRect::normalized() const Q_DECL_NOTHROW { QRect r; if (x2 < x1 - 1) { // swap bad x values @@ -804,7 +802,7 @@ QRect QRect::normalized() const \sa intersects() */ -bool QRect::contains(const QPoint &p, bool proper) const +bool QRect::contains(const QPoint &p, bool proper) const Q_DECL_NOTHROW { int l, r; if (x2 < x1 - 1) { @@ -868,7 +866,7 @@ bool QRect::contains(const QPoint &p, bool proper) const rectangle (not on the edge). */ -bool QRect::contains(const QRect &r, bool proper) const +bool QRect::contains(const QRect &r, bool proper) const Q_DECL_NOTHROW { if (isNull() || r.isNull()) return false; @@ -946,7 +944,7 @@ bool QRect::contains(const QRect &r, bool proper) const \sa operator|=(), united() */ -QRect QRect::operator|(const QRect &r) const +QRect QRect::operator|(const QRect &r) const Q_DECL_NOTHROW { if (isNull()) return r; @@ -1017,7 +1015,7 @@ QRect QRect::operator|(const QRect &r) const \sa operator&=(), intersected() */ -QRect QRect::operator&(const QRect &r) const +QRect QRect::operator&(const QRect &r) const Q_DECL_NOTHROW { if (isNull() || r.isNull()) return QRect(); @@ -1096,7 +1094,7 @@ QRect QRect::operator&(const QRect &r) const \sa contains() */ -bool QRect::intersects(const QRect &r) const +bool QRect::intersects(const QRect &r) const Q_DECL_NOTHROW { if (isNull() || r.isNull()) return false; @@ -1522,7 +1520,7 @@ QDebug operator<<(QDebug dbg, const QRect &r) \sa isValid(), isEmpty() */ -QRectF QRectF::normalized() const +QRectF QRectF::normalized() const Q_DECL_NOTHROW { QRectF r = *this; if (r.w < 0) { @@ -1935,7 +1933,7 @@ QRectF QRectF::normalized() const \sa intersects() */ -bool QRectF::contains(const QPointF &p) const +bool QRectF::contains(const QPointF &p) const Q_DECL_NOTHROW { qreal l = xp; qreal r = xp; @@ -1981,7 +1979,7 @@ bool QRectF::contains(const QPointF &p) const otherwise returns \c false. */ -bool QRectF::contains(const QRectF &r) const +bool QRectF::contains(const QRectF &r) const Q_DECL_NOTHROW { qreal l1 = xp; qreal r1 = xp; @@ -2119,7 +2117,7 @@ bool QRectF::contains(const QRectF &r) const \sa united(), operator|=() */ -QRectF QRectF::operator|(const QRectF &r) const +QRectF QRectF::operator|(const QRectF &r) const Q_DECL_NOTHROW { if (isNull()) return r; @@ -2188,7 +2186,7 @@ QRectF QRectF::operator|(const QRectF &r) const \sa operator&=(), intersected() */ -QRectF QRectF::operator&(const QRectF &r) const +QRectF QRectF::operator&(const QRectF &r) const Q_DECL_NOTHROW { qreal l1 = xp; qreal r1 = xp; @@ -2273,7 +2271,7 @@ QRectF QRectF::operator&(const QRectF &r) const \sa contains() */ -bool QRectF::intersects(const QRectF &r) const +bool QRectF::intersects(const QRectF &r) const Q_DECL_NOTHROW { qreal l1 = xp; qreal r1 = xp; @@ -2340,7 +2338,7 @@ bool QRectF::intersects(const QRectF &r) const \sa toRect() */ -QRect QRectF::toAlignedRect() const +QRect QRectF::toAlignedRect() const Q_DECL_NOTHROW { int xmin = int(qFloor(xp)); int xmax = int(qCeil(xp + w)); |