| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This reverts commit 66fe4167b123c644874216af4f1c1a2fb3c478b2.
Oops, missed the bit in the comment about not fixing for a 4.5 patch
release.
|
|
|
|
|
|
|
| |
RevBy: mauricek
Details: using prefix qt_ instead of ::global namespace
(cherry picked from commit 9904f77b26d3b75f8ed53e82c14ff8e9baf710dc)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Regression caused by optimizations in QGraphicsItem and QGraphicsScene.
The changes in QGraphicsItem fix bugs in QGraphicsItem::mapToParent
functions, which did the translation before applying the transformation,
instead of the other way (transform, then translate). This bug caused
almost all mapToParent and mapRectToParent functions to behave wrongly.
Unfortunately the new helper functions in QGraphicsScene for discovering
items made use of these functions, which introduced a regression. Fixing
these functions also fixes item discovery.
The other part of this change fixes a regression caused by c1909321,
which luckily happened after 4.5.0 and never saw the light of day. The
fix is to also invalidate the cached clip path even if there is no scene,
which is necessary if you build your scene graph outside the scene, and
finish off by adding the root item to the scene.
Task-number: 250680
Reviewed-by: Alexis
(cherry picked from commit 7a0f9ae94ca7a47dc285431d31f6839c07870194)
|
|
|
|
|
|
|
|
|
|
|
|
| |
[regression]
The problem was that we didn't update the new region when we paint the
rubber band and we scroll at the same time
BT:yes
Task-number: 245766
Reviewed-by: bnilsen
Reviewed-by: andreas
(cherry picked from commit 0f6950e11389a3ddf657116a98ee8f4ec0753eb4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change shows a limitation in Graphics View caused by QPen's
default width being 0 (cosmetic), while Graphics View actually
does not support cosmetic pens at all. Because items are at risk of
drawing lines that poke 1 pixel outside their bounding rect,
QGraphicsView must look for items that are up to one pixel
larger than their bounding rect mapped to viewport coordinates.
Furthermore, mapToScene(QRect) forces us to adjust the
input rectangle by (0, 0, 1, 1), because it uses QRect::bottomRight()
(etc) when mapping the rectangle to a polygon (which is _wrong_). Since
this behavior has been there since 4.2, we don't want to fix it in
a 4.5 patch release...
The only _proper_ fix to this problem is for the view to know the item's
"adjust" in device coordinates, allowing items to use cosmetic pens
freely. Fex, we could introduce QGraphicsItem::viewportMargins() or so.
Added an autotest to ensure this doesn't break again.
Reviewed-by: bnilsen
(cherry picked from commit cc18633fe45d599bfeac2a8b2737d155f1dd5564)
|
|
|
|
|
|
|
|
|
|
|
| |
0aa2ef27249dc8e782c2942340776bb19de80a0d
RevBy: TrustMe
AutoTest: tst_QGraphicsItem::boundingRegion() pass again
Details: The original code adjusted the QRect version of a mapped bounding rect,
wheras my patch adjusted a mapped bounding rect (QRectF) and then
converted it to a QRect.
(cherry picked from commit 416fd77e653d089b7832002a68d5b7725fa492db)
|
|
|
|
|
|
|
|
|
| |
RevBy: Andreas
AutoTest: Still pass
Details: QRectF::intersects does not work with flat rectangles, so
we cannot intersect the bounding rect without adjusting it
first.
(cherry picked from commit 3dc62362f3380fa653bc1225ce06e5e4cefa745a)
|
|
|
|
|
|
| |
RevBy: Olivier
AutoTest: Still pass
(cherry picked from commit 32767aa5699937a3737b9515f4f82acc04ccdfcd)
|
|
|
|
|
|
|
|
|
|
|
| |
RevBy: Andreas
AutoTest: tst_QGraphicsView::itemAt2 pass again
Details: A QPoint in the view has to be mapped to a pixel in the
scene, otherwise it won't be possible to e.g. click
on items that are smaller than a pixel.
So...we have to optimize the hit-testing code in another way
(cherry picked from commit 79799ec4788692d44862832d85f80953d386cb27)
|
|
|
|
|
|
| |
RevBy: Andreas
AutoTest: included
(cherry picked from commit d516e5fbed3a7eac20229ead34221c732f85cdb6)
|
|
|
|
|
|
|
| |
We can shortcut quite some calculations for the common case
by first checking whether the point is contained in the
control point rect.
(cherry picked from commit bc3d96a902d16a9bb358c05de9f6bfede3594731)
|
|
|
|
|
|
| |
Implement specialized (and more efficient versions) of item_helper()
and child_helper() that test for QPointF in the scene.
(cherry picked from commit 30d01c387179160c8c418ecedfb4506a55d282e8)
|
|
|
|
|
|
| |
AutoTest: Still pass.
Details: It's easier to read and understand the code now.
(cherry picked from commit 73ce29e6bc09651a4e70b5e61c36d56e568905c7)
|
|
|
|
|
|
|
|
|
| |
AutoTest: Still pass.
Details: Update requests can be discarded if the item itself is
clipped away and the item clips all its children to shape.
This cut-off is extremely effective (and aggressive:))
(cherry picked from commit 23c73210fc79055f4bac44de0e43f9917f8d0e7f)
|
|
|
|
|
| |
AutoTest: Still pass
(cherry picked from commit d85835580463f88df6a71d27d2577739e5366f68)
|
|
|
|
|
| |
AutoTest: Still pass
(cherry picked from commit 15098c5ec73db5de8ca724f744a1484f888ed271)
|
|
|
|
|
| |
Details: It's clipped away regardless.
(cherry picked from commit 5564ef89f46fe96aa0b22b888a9a8ba053eea6c7)
|
|
|
|
|
| |
RevBy: TrustMe
(cherry picked from commit a914eb155e085ba0efa5b95154bf7345d4be7cd7)
|
|
|
|
|
|
|
|
| |
AutoTest: Still pass
Details: Get rid of QTransform::inverted()/operator*= and do
nothing if the item clips all its children and the update
rect is outside the bounding rect.
(cherry picked from commit 9ed299a3edba92791e1c5af64b8fd9c9fe74c0ea)
|
|
|
|
|
|
|
|
|
| |
AutoTest: Still pass.
Details: Update requests can be discarded if the item itself is
clipped away and the item clips all its children to shape.
This cut-off is extremely effective (and aggressive:))
(cherry picked from commit 0d959a6c402ea3a3a55d7076d453d4bdbf8dce8e)
|
|
|
|
|
| |
RevBy: Andreas
(cherry picked from commit deccc867b244fbc52ca58e21623febbc27310b05)
|
|
|
|
|
| |
RevBy: TrustMe
(cherry picked from commit 95fa7a93bc840e0f49ee30e76abb2b4f8579c997)
|
|
|
|
|
|
|
|
|
| |
RevBy: Andreas
AutoTest: still pass
Details: Adds emptyClipPath bit, a cut-off to test if the item
has an empty clip path (i.e., is clipped away). Also adds
code for invalidating the cache from inside setPos().
(cherry picked from commit c1909321a486621ef196dd4bb3cf354406d86d46)
|
|
|
|
| |
(cherry picked from commit 5910dbe6e7a024301d431102703f9abe323ebd13)
|
|
|
|
|
|
|
|
| |
RevBy: Olivier
AutoTest: Still pass.
Details: Items usually don't have effective opacity, i.e. it is 1.0, so
don't bother doing fuzzy compare if that's the case.
(cherry picked from commit bd4b177e051852f0fb94df9c0ee2e512478e0d38)
|
|
|
|
|
|
| |
RevBy: TrustMe
Details: ...otherwise it'll be empty and too much will be clipped away.
(cherry picked from commit 4d019e66fb62d6f25627144539abd7f59413abee)
|
|
|
|
|
|
|
|
|
| |
Make sure we use the rect-variation of QGraphicsScene's item lookup
functions if the view has a simple transform and a simple expose
region.
Reviewed-by: Bjoern Erik Nilsen <bjorn.nilsen@nokia.com>
(cherry picked from commit 4020327503eaefae42da4bd6e71125b6972ac97f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RevBy: Alexis
AutoTest: Still pass
Details: findItems() does almost exactly the same as
QGraphicsView::items, the only difference is that it checks
whether we are about to redraw all items. Next step
is to optimize the items_helper functions.
The patch does also include a fix for
::items/childItems_helper(const QPainterPath ...); it didn't
take Qt::Intersects/ContainsItemBoundingRect into account
(in the same fashion as we do in the other helper functions).
(cherry picked from commit f4547b98b52bfc95fb0c14ec58df204cfcec0db2)
|
|
|
|
|
|
|
| |
RevBy: Alexis
AutoTest: Still pass
Details: No-brainer.
(cherry picked from commit 4556bcbd40c8feb7185aae7da5f0686f12d87565)
|
|
|
|
|
|
| |
RevBy: bnilsen
AutoTest: All pass + plasma ok
(cherry picked from commit 0985805ab3c7de5b15c115a98afb15944b6d93b9)
|
|
|
|
|
|
|
|
|
| |
RevBy: bnilsen
AutoTest: Bench
Details : if we come from setPosHelper (so itemChange) we don't need to do all the stuff regarding the size in setGeometry because the size doesn't change.
I remove two calls to fullUpdateHelper and update() because prepareGeometryChange already call updateHelper and setPosHelper call fullUpdaterHelper too so we don't need to call them inside setGeometry.
We can only call prepareGeometryChange only if we don't come from setPos.
(cherry picked from commit d74f1a91b05b943c1a8ae7847de6ee50b2093b89)
|
|
|
|
|
|
|
| |
RevBy: Andreas
Details: Use QPainterPath::addRect() rather than addPolygon() and
closeSubPath().
(cherry picked from commit b67dffcccea9166918ac93c281d87fd5eb3baf84)
|
|
|
|
|
|
| |
RevBy: Andreas
AutoTest: Still pass
(cherry picked from commit 7f50f45da0ad4a9eedd3ad7d8a82f719f7f8dd73)
|
|
|
|
|
|
| |
RevBy: Andreas
AutoTest: tst_QGraphicsItem::opacity still passes
(cherry picked from commit ab130a0019fadeff4622778ca9f8b3e630da14da)
|
|
|
|
|
|
|
|
| |
Task: none
RevBy: Samuel
AutoTest: Still pass
Details: Please do not perform (potentially expensive) calculations just for fun :)
(cherry picked from commit fac3c7b73ba2c6b39332445ae00b2fe26a578913)
|
|
|
|
|
| |
Details: Be a little bit smarter before doing *= :)
(cherry picked from commit b4456f8775c36bcb2ceef9ca1a00c7765f1d2735)
|
|
|
|
|
|
|
|
|
|
|
| |
Task: none
RevBy: Ariya Hidayat
AutoTest: Still pass.
Details: QTransform::type() is cached, so only the first call to it
should be expensive. However, it is not inlined so there's
an overhead involved (especially when these functions are
called a gazillion times).
(cherry picked from commit eda77b7c410a59d1b77c263994679452613d9d0b)
|
|
|
|
|
|
|
| |
RevBy: Andreas
Details: Note that isNull() implies isEmpty(), but it only catches
the cases where width and height is 0.
(cherry picked from commit 8a2ebc96220f50be3a9c382c32d7eaab89921ff7)
|
|
|
|
|
|
|
| |
Details: Checking for QRect::isNull() was wrong in the first place, and
checking for isEmpty()/isNull() is overhead after
4a491a84aeba68279927597a261522dcc23bb3ff.
(cherry picked from commit e9fa8ba1ad0b0b2d3363fb33635071677f42b983)
|
|
|
|
|
|
|
|
|
| |
Details: Those cut-offs are extremely important. After few seconds
interaction with the iphone demo, updateRect() was called
approx. 3000 times with an empty rect. Then imagine what
happens when having e.g. FullViewportUpdate. We do
q->viewport()->update() JUST FOR FUN!
(cherry picked from commit be6be8c73929f2ddee9a02f59db05c3ba453a63e)
|
|
|
|
|
|
|
|
|
| |
Task: -
RevBy: Andreas
AutoTest: -
Details: Accumulate the parentToItem transform as we iterate instead of
creating it from bottom-up each time.
(cherry picked from commit e27743bdeda7aa3cb42f2d81a521121f8ee04eae)
|
|
|
|
|
|
|
|
|
|
|
| |
When QString::replace was optimized, this specific overload missed out
on sanity checking of the arguments.
Task-number: 249517
Reviewed-by: Joao
Reviewed-by: hjk
BT: yes
(cherry picked from commit afb3848e0abe0cd2355e7ee7319fd904288e4636)
|
|
|
|
|
| |
Reviewed-by: hjk <qtc-committer@nokia.com>
(cherry picked from commit a59488d4799f6ac9ea034c0a88a468e73a64d517)
|
|
|
|
|
|
|
|
|
|
| |
same value -> crash on SetTitle()
Task: 242484
RevBy: mauricek
AutoTest:
Details: Since we do not respect binary compatibility on Windows CE we just change the enum
(cherry picked from commit c1c30037292711f0fb05677e77ed2eb2112eca78)
|
|
|
|
| |
(cherry picked from commit 3568aeef72bec8333650eb2200b12eba8fac1b71)
|
|
|
|
|
|
|
| |
Error was introduced in change 52f87de53328c661049acf09d5fedc1850aa9bfa.
Reviewed-by: Trust Me
(cherry picked from commit e3462ae7868c679bc88dc01de85ca39454651ff7)
|
|
|
|
|
| |
Reviewed-by: ogoffart
(cherry picked from commit a94b601866740e483f093233f59f43b022a68735)
|
|
|
|
|
| |
Reviewed-by: TrustMe
(cherry picked from commit 94a9f77b41c2d924983e92df30e3e4cc7882cb75)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem here is that we are filling the sceneEventFilters map
when we install evenfilter but we never remove the references of an
item if it has been removed from the scene or deleted. The deletion can
keep stale pointers into the map and a crash can happen.
BT:yes
Task-number:250272
Reviewed-by: bnilsen
Reviewed-by: andreas
(cherry picked from commit 0bb526f8fab33a42df56c8a60c272e2cca4cc792)
|
|
|
|
|
|
|
|
| |
The previous version would get confused because the embedded package
also contains _x11 files.
Reviewed-by: Thiago
(cherry picked from commit 28d2b22a940174b4e64f6fa2f5548a7832fc07e8)
|