diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2016-04-05 13:58:20 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@theqtcompany.com> | 2016-04-05 13:49:27 +0000 |
commit | f63f86f7d38a182b41a85af27bf0baba3db03941 (patch) | |
tree | bc9ebff4b5e0591c106b1bb47b1a1111224a1962 /src/imports/layouts | |
parent | 7c18dcf79abbcc4de085e73ca7abe4eeeb7f140c (diff) |
Replace qQNaN() and friends with qt_qnan().
These constexpr functions can be inlined, and the compiler can be a bit
smarter with code generation.
Change-Id: I4ea87c794dd8e375749e18d273d01bb848231113
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/imports/layouts')
-rw-r--r-- | src/imports/layouts/qquicklayout.cpp | 14 | ||||
-rw-r--r-- | src/imports/layouts/qquicklinearlayout.cpp | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/imports/layouts/qquicklayout.cpp b/src/imports/layouts/qquicklayout.cpp index d4d4e1703d..abc8f97cec 100644 --- a/src/imports/layouts/qquicklayout.cpp +++ b/src/imports/layouts/qquicklayout.cpp @@ -40,7 +40,7 @@ #include "qquicklayout_p.h" #include <QEvent> #include <QtCore/qcoreapplication.h> -#include <QtCore/qnumeric.h> +#include <QtCore/private/qnumeric_p.h> #include <QtCore/qmath.h> #include <limits> @@ -134,7 +134,7 @@ QQuickLayoutAttached::QQuickLayoutAttached(QObject *parent) */ void QQuickLayoutAttached::setMinimumWidth(qreal width) { - if (qIsNaN(width)) + if (qt_is_nan(width)) return; m_isMinimumWidthSet = width >= 0; if (m_minimumWidth == width) @@ -162,7 +162,7 @@ void QQuickLayoutAttached::setMinimumWidth(qreal width) */ void QQuickLayoutAttached::setMinimumHeight(qreal height) { - if (qIsNaN(height)) + if (qt_is_nan(height)) return; m_isMinimumHeightSet = height >= 0; if (m_minimumHeight == height) @@ -186,7 +186,7 @@ void QQuickLayoutAttached::setMinimumHeight(qreal height) */ void QQuickLayoutAttached::setPreferredWidth(qreal width) { - if (qIsNaN(width) || m_preferredWidth == width) + if (qt_is_nan(width) || m_preferredWidth == width) return; m_preferredWidth = width; @@ -207,7 +207,7 @@ void QQuickLayoutAttached::setPreferredWidth(qreal width) */ void QQuickLayoutAttached::setPreferredHeight(qreal height) { - if (qIsNaN(height) || m_preferredHeight == height) + if (qt_is_nan(height) || m_preferredHeight == height) return; m_preferredHeight = height; @@ -232,7 +232,7 @@ void QQuickLayoutAttached::setPreferredHeight(qreal height) */ void QQuickLayoutAttached::setMaximumWidth(qreal width) { - if (qIsNaN(width)) + if (qt_is_nan(width)) return; m_isMaximumWidthSet = width >= 0; if (m_maximumWidth == width) @@ -259,7 +259,7 @@ void QQuickLayoutAttached::setMaximumWidth(qreal width) */ void QQuickLayoutAttached::setMaximumHeight(qreal height) { - if (qIsNaN(height)) + if (qt_is_nan(height)) return; m_isMaximumHeightSet = height >= 0; if (m_maximumHeight == height) diff --git a/src/imports/layouts/qquicklinearlayout.cpp b/src/imports/layouts/qquicklinearlayout.cpp index 2f8af4c58b..0b4a1968d7 100644 --- a/src/imports/layouts/qquicklinearlayout.cpp +++ b/src/imports/layouts/qquicklinearlayout.cpp @@ -40,7 +40,7 @@ #include "qquicklinearlayout_p.h" #include "qquickgridlayoutengine_p.h" #include "qquicklayoutstyleinfo_p.h" -#include <QtCore/qnumeric.h> +#include <QtCore/private/qnumeric_p.h> #include "qdebug.h" #include <limits> @@ -566,7 +566,7 @@ qreal QQuickGridLayout::columnSpacing() const void QQuickGridLayout::setColumnSpacing(qreal spacing) { Q_D(QQuickGridLayout); - if (qIsNaN(spacing) || columnSpacing() == spacing) + if (qt_is_nan(spacing) || columnSpacing() == spacing) return; d->engine.setSpacing(spacing, Qt::Horizontal); @@ -588,7 +588,7 @@ qreal QQuickGridLayout::rowSpacing() const void QQuickGridLayout::setRowSpacing(qreal spacing) { Q_D(QQuickGridLayout); - if (qIsNaN(spacing) || rowSpacing() == spacing) + if (qt_is_nan(spacing) || rowSpacing() == spacing) return; d->engine.setSpacing(spacing, Qt::Vertical); @@ -867,7 +867,7 @@ qreal QQuickLinearLayout::spacing() const void QQuickLinearLayout::setSpacing(qreal space) { Q_D(QQuickLinearLayout); - if (qIsNaN(space) || spacing() == space) + if (qt_is_nan(space) || spacing() == space) return; d->engine.setSpacing(space, Qt::Horizontal | Qt::Vertical); |