diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-08-01 01:00:09 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-08-01 01:00:10 +0200 |
commit | 5ee1c86d10e2efbd4fc48c5af046a2e08cf925fd (patch) | |
tree | aca0092605f88601fab50992f2a1b8de38cb839a /src/gui/painting/qpainterpath.cpp | |
parent | 0642444e7277a7fd8177f0a610e54f80bacc538e (diff) | |
parent | 4d7271087e84096abd75fa806bea234daee0cd94 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I4505ec6fe17a1aa2c8d1e6576234d06a34eb9f99
Diffstat (limited to 'src/gui/painting/qpainterpath.cpp')
-rw-r--r-- | src/gui/painting/qpainterpath.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index 8801e66b0f..b1d1f30800 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -661,6 +661,7 @@ void QPainterPath::clear() detach(); d_func()->clear(); + d_func()->elements.append( {0, 0, MoveToElement} ); } /*! @@ -2337,12 +2338,12 @@ bool QPainterPath::operator==(const QPainterPath &path) const { QPainterPathData *d = reinterpret_cast<QPainterPathData *>(d_func()); QPainterPathData *other_d = path.d_func(); - if (other_d == d) + if (other_d == d) { return true; - else if (!d || !other_d) { - if (!d && other_d->elements.empty() && other_d->fillRule == Qt::OddEvenFill) + } else if (!d || !other_d) { + if (!other_d && isEmpty() && elementAt(0) == QPointF() && d->fillRule == Qt::OddEvenFill) return true; - if (!other_d && d && d->elements.empty() && d->fillRule == Qt::OddEvenFill) + if (!d && path.isEmpty() && path.elementAt(0) == QPointF() && other_d->fillRule == Qt::OddEvenFill) return true; return false; } |