summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Fixes: We have to adjust the item's bounding rect.Bjoern Erik Nilsen2009-04-061-2/+16
| | | | | | | | 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.
* Fixes: Optimize the way we adjust rectangles.Bjoern Erik Nilsen2009-04-062-47/+68
| | | | | RevBy: Olivier AutoTest: Still pass
* Fixes: Partially revert 9b0af2395c84a6895a5ce6368f151d4ec00c8755Bjoern Erik Nilsen2009-04-061-2/+2
| | | | | | | | | | 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
* Fixes: Minimize QVariant overhead related to QGraphicsItem::itemChange.Bjoern Erik Nilsen2009-04-062-43/+51
| | | | | RevBy: Andreas AutoTest: included
* Optimise QPainterPath::contains(QPointF)Lars Knoll2009-04-061-1/+1
| | | | | | We can shortcut quite some calculations for the common case by first checking whether the point is contained in the control point rect.
* Optimise QGraphicsScene/View::items(const QPointF &pos)Lars Knoll2009-04-063-14/+88
| | | | | Implement specialized (and more efficient versions) of item_helper() and child_helper() that test for QPointF in the scene.
* Fixes: Simplify the cut-offs and be more agressive :-)Bjoern Erik Nilsen2009-04-063-42/+68
| | | | | AutoTest: Still pass. Details: It's easier to read and understand the code now.
* Fixes: Discard update requests if possible.Bjoern Erik Nilsen2009-04-062-10/+35
| | | | | | | | 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:))
* Fixes: Don't bother updating hidden items.Bjoern Erik Nilsen2009-04-062-1/+4
| | | | AutoTest: Still pass
* Fixes: Do not update children if not required.Bjoern Erik Nilsen2009-04-061-1/+2
| | | | AutoTest: Still pass
* Fixes: Don't check the force boolean.Bjoern Erik Nilsen2009-04-061-1/+1
| | | | Details: It's clipped away regardless.
* Fixes: Minimize QVariant constr/destr in setPosHelper.Bjoern Erik Nilsen2009-04-061-2/+3
| | | | RevBy: TrustMe
* Fixes: Optimize QGraphicsViewPrivate::itemUpdated.Bjoern Erik Nilsen2009-04-061-21/+19
| | | | | | | 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.
* Fixes: Discard update requests if possible.Bjoern Erik Nilsen2009-04-063-21/+44
| | | | | | | | 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:))
* Fixes: Don't bother processing items that are clipped away.Bjoern Erik Nilsen2009-04-062-52/+67
| | | | RevBy: Andreas
* Fixes: Optimization: Clip path is empty if the bounding rect is empty.Bjoern Erik Nilsen2009-04-061-1/+10
| | | | RevBy: TrustMe
* Fixes: Clever invalidating of the cached clip path.Bjoern Erik Nilsen2009-04-062-13/+129
| | | | | | | | 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().
* Fixes: Compile on funky scratchbox ARM compiler.Bjoern Erik Nilsen2009-04-061-1/+1
|
* Fixes: Get rid of lots of calls to qFuzzyCompare.Bjoern Erik Nilsen2009-04-062-3/+9
| | | | | | | 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.
* Fixes: Only use the parent's cached clip path if it is clipped.Bjoern Erik Nilsen2009-04-061-2/+3
| | | | | RevBy: TrustMe Details: ...otherwise it'll be empty and too much will be clipped away.
* Add a cut-off for simple rectangle lookups.Andreas Aardal Hanssen2009-04-061-0/+5
| | | | | | | | 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>
* Fixes: Cleanup/Optimize QGraphicsView::findItems.Bjoern Erik Nilsen2009-04-063-115/+94
| | | | | | | | | | | | | | 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).
* Fixes: Optimization: Cache QGraphicsItem::clipPath().Bjoern Erik Nilsen2009-04-062-7/+53
| | | | | | RevBy: Alexis AutoTest: Still pass Details: No-brainer.
* Fixes: Don't fill the pixmap because we will copy the cache into it.Alexis Menard2009-04-061-3/+1
| | | | | RevBy: bnilsen AutoTest: All pass + plasma ok
* Fixes: Be a bit more smarter when calling setGeometry from itemChangeAlexis Menard2009-04-064-29/+39
| | | | | | | | 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.
* Fixes: Small optimization in QGraphicsItem::clipPath().Bjoern Erik Nilsen2009-04-061-7/+6
| | | | | | RevBy: Andreas Details: Use QPainterPath::addRect() rather than addPolygon() and closeSubPath().
* Fixes: Optimize: QGraphicsItem::clipPath.Bjoern Erik Nilsen2009-04-061-31/+15
| | | | | RevBy: Andreas AutoTest: Still pass
* Fixes: Speed up QGrahicsItemPrivate::effectiveOpacity().Bjoern Erik Nilsen2009-04-062-1/+13
| | | | | RevBy: Andreas AutoTest: tst_QGraphicsItem::opacity still passes
* Fixes: Optimization: Important cut-offs for QTransform.Bjoern Erik Nilsen2009-04-062-3/+34
| | | | | | | Task: none RevBy: Samuel AutoTest: Still pass Details: Please do not perform (potentially expensive) calculations just for fun :)
* Fixes: Get rid of a gazillion calls to QTransform::operator*=.Bjoern Erik Nilsen2009-04-062-16/+27
| | | | Details: Be a little bit smarter before doing *= :)
* Fixes: Small optimization: reduce calls to QTransform::type().Bjoern Erik Nilsen2009-04-061-7/+8
| | | | | | | | | | 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).
* Fixes: Use QRect::isEmpty() rather than isNull() if possible.Bjoern Erik Nilsen2009-04-063-7/+7
| | | | | | RevBy: Andreas Details: Note that isNull() implies isEmpty(), but it only catches the cases where width and height is 0.
* Fixes: Cleanup calls to QGraphicsViewPrivate::updateRect()/updateRegion()Bjoern Erik Nilsen2009-04-061-14/+5
| | | | | | Details: Checking for QRect::isNull() was wrong in the first place, and checking for isEmpty()/isNull() is overhead after 4a491a84aeba68279927597a261522dcc23bb3ff.
* Fixes: Optimize QGraphicsViewPrivate::updateRect()/updateRegion().Bjoern Erik Nilsen2009-04-061-0/+6
| | | | | | | | 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!
* Fixes: Optimize QGraphicsView::itemUpdated.Bjoern Erik Nilsen2009-04-061-3/+10
| | | | | | | | Task: - RevBy: Andreas AutoTest: - Details: Accumulate the parentToItem transform as we iterate instead of creating it from bottom-up each time.
* Doc - Mentioned what the default filters are forKavindra Devi Palaraja2009-04-061-1/+4
| | | | | | | QFileSystemModel::filter(). Task-number: 250285 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* Doc - Clarified that button style on X11 platforms may depend on theKavindra Devi Palaraja2009-04-061-1/+2
| | | | | | | desktop environment. Task-number: 250338 Reviewed-by: Jens Bache-Wiig <jbache@trolltech.com>
* BT: Fix a crash when running a widget window modal when it has no parentNorwegian Rock Cat2009-04-061-7/+5
| | | | | | | | We changed the logic for determining sheets, but it seems we forgot to take the parentWidget() into account. It's required for WindowModality to make any sense. Reviewed-by: Richard Moe Gustavsen
* Fix up color matching on 64-bit Cocoa.Norwegian Rock Cat2009-04-061-7/+38
| | | | | | | | | | | | | | | | It seems that GetThemeTextColor is not available at all for 64-bit versions of the operating system and there is no good equivalent. We were using a technique where we would create a small pixmap and then use HIThemeSetTextFillColor() with the proper enum. However, this function will silently set a black color if it doesn't know about the enum. So, we get black when we really shouldn't. It also seems to produce colors that are a bit different from the Carbon function. So, in the meantime, just hard code the values in. It might break if you are hacking the resources in Mac OS X, but we'll have to live with that until we get a real function. Task-number: 248918 Reviewed-by: Prasanth Ullattil
* QGtkStyle: Fix styling and palette issues related to combo boxJens Bache-Wiig2009-04-035-39/+89
| | | | | | | | | | | | | | | | | | | | | | Well actually this change is a bit bigger than just that. *We no longer override the palette you provide in polish so it should be a bit more frienly toward custom application changes. * Another issue was that we would generate the palette information when we got the style callback from gtkButton but then the line edits might not yet have been polished. Hence we now return from the callback and instead post the update for later. * We had to modify the PE_Frame entry to draw a raised menu when the custom combo box delegate was used. * We now simply ignore custom qtconfig palette entries when using GtkStyle since they only cause trouble with it. Task-number: 250142 Reviewed-by: nrc
* Fixes crash in QTreeView with QSortFilterProxyModelOlivier Goffart2009-04-031-0/+1
| | | | | | | | | If we get an hover event while the model gets invalidated, we might ends up calling itemDecorationAt before the viewitem is refreshed. Can be reproduced in KTorrent (Relates to KDE bug 172198) or Kopete trunk Reviewed-by: Thierry
* Do not loose WindowType flags when setting translucent background in X11Olivier Goffart2009-04-031-1/+1
| | | | | | | | This fixes KRunner on XMonad. The Qt::Dialog flag of the krunner dialog was lost when the Qt::WA_TranslucentBackground was set, leading to incorrect behaviour in some window manager (such as xmonad) Reviewed-by: Samuel
* Fix a crash in QFileDialog with a proxy on it.Alexis Menard2009-04-032-22/+44
| | | | | | | | | | | | The main problem is that enterDirectory received a QModelIndex that can be a proxy index and not a source index if there is a proxy set on the QFileDialog. This fix basically discover some other crashes in the completer. The problem was that we didn't apply the proxy to the completer too. So we basically messed up source and proxy indexes. Both have a proxy set now and convert the model indexes if needed. Task-number:250194 Reviewed-by:jasplin
* Fix focus policy propagation bug in QCompleter.jasplin2009-04-031-0/+7
| | | | | | | | | | | | | | | Commit 4a00810cc394b7da99ddb2d13eb045352ede25d3 ensures that setting the focus policy of a widget applies to its proxy (if any) as well. This propagation effect is however unfortunate for a QCompleter in PopupCompletion mode. The client widget (typically a QLineEdit or a QTextEdit) acts as the focus proxy to the popup menu. Internally, the completer sets the focus policy of the popup menu to NoFocus, but this should not affect the focus policy of the editor. Reviewed-by: janarve Task-number: 250064
* Only set system style when it actually changesJens Bache-Wiig2009-04-021-1/+5
| | | | | | | | | | | This issue would cause Qt Creator and similar apps with proxy styles to loose their custom styling whenever any x11 system settings changed. This happened because we would re-read the settings and override the system style even if the system style did not actually change would be set on the application. We Task-number: 250199 Reviewed-by: ogoffart
* Improved stylesheet support for setting background and foreground rolesJens Bache-Wiig2009-04-024-23/+19
| | | | | | | | | | This makes sure that style sheets set both ButtonText and WindowText roles for all widgets. This fixes among other things the fact that you could not configure text colors for combo box popups on Mac, Gtk and CleanLooks or set the background for the whole scrollbar. Task-number: 160713 Reviewed-by: ogoffart
* Fixing some CoreText errors.Norwegian Rock Cat2009-04-022-14/+19
| | | | | | | | | | | | Apparently CoreText is too good for us and always gives us fractional information. Which would be food for design metrics, but not good for drawing to the screen. The upshot of it is that we do the ceiling of every value we get. This is as stop gap solution for the moment. Things in Creator should look better now. Also added the ability to disable kerning. Reviewed-by: Simon Hausmann
* Fix slowdown regression in QGraphicsItem::ItemCoordinateCacheAndreas Aardal Hanssen2009-04-021-4/+7
| | | | | | | | | | | | | | | Right before Qt 4.5.0 was released, Alexis and I submitted change 7e9b000ee418ef2d9c8fadb2c6b8870e0335bd5e, which accidentally introduced a rounding error causing items whose bounding rect contains fractional numbers (e.g., QRectF(-0.5, -0.5, 11, 11)), to always be drawn with a one-pixel strech even if otherwise untransformed. This caused a significant slowdown for pixmap items and any shape item that uses almost any pen width != 0, if they enable ItemCoordinateCache. The fix is to consistently use the aligned rectangle both when generating the cache pixmap and when drawing it. Reviewed-by: Alexis
* Doc: Clarified the usage of QImage::dotsPerMeterX() and QImage::dotsPerMeterY().David Boddie2009-04-011-6/+10
| | | | | Task-number: 240164 Reviewed-by: Jan Erik Hanssen <janerik@trolltech.com>
* Doc - clarified that QMessageBox's predefined icons are not defined inKavindra Devi Palaraja2009-04-011-16/+16
| | | | | | | QMessageBox, but provided by the style. Task-number: 249946 Reviewed-by: TrustMe