diff options
author | Liang Qi <liang.qi@qt.io> | 2017-03-20 08:44:28 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-03-20 09:00:44 +0100 |
commit | ae2695535a2f1abbd4c6596a22dd33319b9388dd (patch) | |
tree | 91df41df365a13ea71b1361d909535e5b7a7360a /src/gui/painting | |
parent | 8066ae49433ed7604e710eef7b15d15de171608e (diff) | |
parent | c1a2f97a3b3a8c058b1760b57e5c83bf7815b84a (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/corelib/io/qfilesystemengine_win.cpp
src/gui/text/qdistancefield.cpp
src/plugins/platforms/xcb/qxcbconnection.h
Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qrgba64.h | 14 | ||||
-rw-r--r-- | src/gui/painting/qtransform.h | 6 |
3 files changed, 8 insertions, 14 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 083e68fcdb..b186182c34 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -5968,7 +5968,7 @@ void QPainter::drawText(const QRect &r, int flags, const QString &str, QRect *br \snippet code/src_gui_painting_qpainter.cpp 17 \endtable - The \a boundingRect (if not null) is set to the what the bounding rectangle + The \a boundingRect (if not null) is set to what the bounding rectangle should be in order to enclose the whole text. For example, in the following image, the dotted line represents \a boundingRect as calculated by the function, and the dashed line represents \a rectangle: diff --git a/src/gui/painting/qrgba64.h b/src/gui/painting/qrgba64.h index a3ae0c9b14..2c8f8fa8c4 100644 --- a/src/gui/painting/qrgba64.h +++ b/src/gui/painting/qrgba64.h @@ -64,26 +64,14 @@ class QRgba64 { #endif }; - // No constructors are allowed in C++98, since this needs to be usable in a union. - // We however require one for constexprs in C++11/C++14 -#ifdef Q_COMPILER_CONSTEXPR explicit Q_ALWAYS_INLINE Q_DECL_CONSTEXPR QRgba64(quint64 c) : rgba(c) { } -#endif public: -#ifdef Q_COMPILER_CONSTEXPR - Q_ALWAYS_INLINE Q_DECL_CONSTEXPR QRgba64() : rgba(0) { } -#endif + QRgba64() = default; Q_DECL_CONSTEXPR static QRgba64 fromRgba64(quint64 c) { -#ifdef Q_COMPILER_CONSTEXPR return QRgba64(c); -#else - QRgba64 rgba64; - rgba64.rgba = c; - return rgba64; -#endif } Q_DECL_CONSTEXPR static QRgba64 fromRgba64(quint16 red, quint16 green, quint16 blue, quint16 alpha) diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h index 2aea19eca0..5ca1d46982 100644 --- a/src/gui/painting/qtransform.h +++ b/src/gui/painting/qtransform.h @@ -291,6 +291,10 @@ inline qreal QTransform::dy() const return affine._dy; } +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG("-Wfloat-equal") +QT_WARNING_DISABLE_GCC("-Wfloat-equal") + inline QTransform &QTransform::operator*=(qreal num) { if (num == 1.) @@ -348,6 +352,8 @@ inline QTransform &QTransform::operator-=(qreal num) return *this; } +QT_WARNING_POP + inline bool qFuzzyCompare(const QTransform& t1, const QTransform& t2) { return qFuzzyCompare(t1.m11(), t2.m11()) |