summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
Commit message (Collapse)AuthorAgeFilesLines
* Change to release licenses for 4.6.3.Jason McDonald2010-05-3051-663/+663
| | | | Reviewed-by: Trust Me
* An improvement to the previous commit.Denis Dzyubenko2010-05-101-6/+5
| | | | | | | This fixes 005dc6c7448a724d3df496a1e528199f5a638ce0 that was pushed by mistake. Task-number: QT-3349 Reviewed-by: trustme
* Fixes a crash in gestures.Denis Dzyubenko2010-05-101-1/+10
| | | | | | | | This is a partial backport of a fix that was pushed to 4.7 (734ba1f540aaedc4a3558268bd7350c0b15325a4) Task-number: QT-3349 Reviewed-by: trustme
* QGraphicsWidget was not working properly when ItemSendsPositionChanges is falseAlexis Menard2010-05-054-7/+17
| | | | | | | | | | | The geometry was not properly set because QGraphicsWidget rely on itemChange to update its own geometry. Now when calling setPos we also ensure that for a widget the geometry will be up to date. Setting the flag ItemSendsPositionChanges to false for a given widget will give a small performance boost. Reviewed-by:janarve Reviewed-by:bnilsen
* Ensured that WA_InputMethodEnabled was set before FocusInEvent was sent.Jan-Arve Sæther2010-04-291-3/+3
| | | | | | | | | | | | | | | | | When focusInEvent is called we need to ensure that WA_InputMethodEnabled is set, since FocusInEvent might lead to that QInputContext::setFocusWidget is called (with the QGraphicsView as the widget parameter). However, if the widget still does not have WA_InputMethodEnabled set yet it will assert in QInputContext::setFocusWidget (it requires that the widget has the flag set). This was a problem for the morbit bridge, where Dui requires the attribute to be set (while Orbit actually does not require) Task-number: QTBUG-10276 Reviewed-by: jasplin Reviewed-by: Alexis Menard
* No repaint when resizing graphics item with an effect.Bjørn Erik Nilsen2010-04-201-0/+7
| | | | | | | | | | | | | | Problem was that the item's cache was not invalidated from prepareGeometryChange(). We did invalidate the cache for all the ancestors, but not for the item itself. To avoid looping through the whole parent chain twice, we invalidate the item's cache before walking the parent chain. It would be nice to centralize the cache invalidating mechanism, but for now it's OK to solve it like this. Auto test included. Task-number: QTBUG-9551 Reviewed-by: samuel
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-191-2/+6
|\ | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: QMenu: Behavior regression Mac: Graphics View starving user events and sometimes crashes. Fixed a crash on Windows 7 systems with invalid PrinterPorts entries.
| * Mac: Graphics View starving user events and sometimes crashes.Bjørn Erik Nilsen2010-04-161-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that we called processEvents() and excluded user input events. The idea was to only process pending update requests, but by doing that there's also a chance that user input events will starve. Also, there's no gurantee that only update requests will be processed by processEvents(), so a safer solution is to call "HIViewRender" on Carbon and "displayIfNeeded" on Cocoa. This will for sure dispatch pending update requests and nothing else (which is exactly what we want). No auto test regressions. Fixes tst_qgraphicsproxywidget::updateAndDelete failure on Carbon. Benchmarks indicate an increase in performance. Task-number: QTBUG-7502 Reviewed-by: richard
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-04-151-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Symbol visibility fixes for RVCT4 on Symbian Symbol visibility fixes for RVCT4 on Symbian Symbol visibility fixes for RVCT4 on Symbian
| * Symbol visibility fixes for RVCT4 on SymbianIain2010-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | RVCT 4 is far more strict with regards to symbol visiblity that RVCT 2.2, and will hide symbols unless all references have default visibility in the object files. Update the various places in Qt code where the symbol visibility was set incorrectly for DLL-based platforms (those that use __declspec(dllimport) and (dllexport). Note: QtWebkit and QtScript are fixed in different commits. Task-number: QTBUG-9903 Reviewed-by: Jason Barron
* | Fixes tooltips for QGraphicsProxyWidget.Yoann Lopes2010-04-153-0/+39
|/ | | | | | | | | Help event was not propagated to the widget. Also fixes tooltip value propagation when setting it on the proxy or on the widget. Autotest included. Task-number: QTBUG-5349 Reviewed-by: bnilsen
* Fixes CursorChange and TooltipChange events delivery for QGraphicsWidgetYoann Lopes2010-04-071-2/+2
| | | | | | | | | | | | As the documentation mentions, these two events are delivered respectively after the cursor has changed and after the tooltip has changed. These two events were previously delivered just before. This patch is needed for fixing QTBUG-5349 even if it is not directly related. Auto-test included. Reviewed-by: bnilsen
* Fixes painting artifacts when scaling a QGraphicsProxyWidget.Yoann Lopes2010-04-071-1/+1
| | | | | | | | Incorrect simple conversion of the exposed rect from QRectF to QRect when rendering the widget. Task-number: QTBUG-7296 Reviewed-by: bnilsen
* Revert "Add a children private property needed for QML to support ↵Alexis Menard2010-03-316-245/+0
| | | | | | | | | | | | QGraphicsObject" This reverts commit 4be83fa7337c5a4eb7b0ce085aa5854af5d33252. Conflicts: src/gui/graphicsview/qgraphicswidget.cpp This drops the support of QML on top of 4.6
* Revert "struct -> class, it's better."Alexis Menard2010-03-311-2/+1
| | | | This reverts commit 1d094129c0c3994df4e59cd9eda6981a7b131903.
* Revert "Add NOTIFY to size property so QML bindings are working fine."Alexis Menard2010-03-312-9/+1
| | | | | | | | | | This reverts commit 79a02c86c445e50630bcae62a4505f212281ec8b. Conflicts: src/gui/graphicsview/qgraphicswidget.cpp This drop the support of QML on top of 4.6
* Revert "Better handling for NOTIFY in QGraphicsWidget regarding geometry ↵Alexis Menard2010-03-312-4/+6
| | | | | | | | | | | | changes" This reverts commit 13bccd4ade76dd8a9c1cc067cc2b8da69c11def2. Conflicts: src/gui/graphicsview/qgraphicswidget.cpp Drop the support of QML on top of 4.6
* Revert "Add a a layout property in QGraphicsWidget."Alexis Menard2010-03-312-3/+0
| | | | | | This reverts commit 87fae30fc63460e0ed2cc98f55a22e28d7520311. This drop the support of QML on top of 4.6
* struct -> class, it's better.Alexis Menard2010-03-301-1/+2
| | | | Reviewed-by:TrustMe
* Add a a layout property in QGraphicsWidget.Alexis Menard2010-03-302-0/+3
| | | | Reviewed-by:michael brasser
* Reverts using composition mode when using DeviceCoordinateMode cache.Yoann Lopes2010-03-261-7/+6
| | | | | | | | | | Going back to always blitting the newly painted areas to the cache (and not blending it like before). To avoid painting artifacts when the item is rotated and when it uses DeviceCoordinateMode cache mode, the entire cache is always repainted in that case. Task-number: QTBUG-7863 Reviewed-by: trustme
* Fix linking errorAnders Bakken2010-03-261-6/+4
| | | | | | | | | | | | | | The #include "moc_qgraphicswidget.cpp" is superfluous and caused these link errors: .obj/debug-shared-emb-x86_64/moc_qgraphicswidget.o:(.data.rel.ro+0x0): multiple definition of `QGraphicsWidget::staticMetaObject' .obj/debug-shared-emb-x86_64/qgraphicswidget.o:(.data.rel.ro+0x0): first defined here .obj/debug-shared-emb-x86_64/moc_qgraphicswidget.o: In function `QGraphicsWidget::metaObject() const': Presumably this only happens when you have a stale moc file sitting around but it's a bug none-the-less. Reviewed-by: TrustMe
* Prevents a useless repaint with QGraphicsItem cache mode.Yoann Lopes2010-03-251-1/+2
| | | | | | | | | No repaint is triggered anymore when setting the cache mode to DeviceCoordinateMode when already using that mode. Also added an autotest for checking repaints when setting cache modes. Task-number: QTBUG-9391 Reviewed-by: ahanssen
* Add a children private property needed for QML to support QGraphicsObjectAlexis Menard2010-03-246-0/+251
| | | | | | | | | | | | | | | | | | | | Commit adds a private property that QML can use to add children for a given item. This is a custom list that calls a callback which actually reparent the item instead of just appending in the list (otherwise it will mess up the state of QGraphicsView). This is needed because childItems() is pretty useless you get a list but if you append something on it then it adds that into a copy. Also the children property is the default property a concept used by QML. Width and Height private properties has been added in order to support better the integration with QGraphicsWidget in QML. The actual implementation is in the private class of QGI and QGraphicsWidget reimplements it to return the geometry. (In 4.7 QDeclarativeItem reimplements it too). This change should be harmless everything is private. Task-number:QT-2757 Reviewed-by:andreas
* Invalidate the cache of QGraphicsEffect if a child becomes visible.Alexis Menard2010-03-241-1/+5
| | | | | | | | The effect might rely on a child to draw itself. So we need to redraw if a child become visible or invisible. Task-number:QTBUG-7843 Reviewed-by:janarve
* Fix a crash when reparenting an item in QGraphicsView.Alexis Menard2010-03-241-2/+3
| | | | | | | | | | Before calling addItem we need to invalidate the depth otherwise if someone call anything relating to sorting when itemChange is called (because of the scene change for instance) then qt_closestItemFirst for example can crash because of an invalid state. Task-number:QTBUG-6932 Reviewed-by:janarve
* Better handling for NOTIFY in QGraphicsWidget regarding geometry changesAlexis Menard2010-03-192-6/+4
| | | | | | We bundle the size and the geometry into the same NOTIFY signal. Reviewed-by:akennedy
* Add NOTIFY to size property so QML bindings are working fine.Alexis Menard2010-03-192-1/+5
| | | | | | | Just add the notify + the signal. Task-number:QTBUG-8277 Reviewed-by:yoann
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-03-181-0/+6
|\ | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Stabilize taskQTBUG_7863_paintIntoCacheWithTransparentParts auto-test. Optimize getting bearings of a glyph on Windows for true type fonts Fixes blending problem when paiting non-opaque items with cache enabled. Optimize speed of QTextLayout and QPainter::drawText Fix a crash in animation groups when deleting uncontrolled animations
| * Fixes blending problem when paiting non-opaque items with cache enabled.Yoann Lopes2010-03-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In most cases when partially updating an item, the old content of the cache needs to be replaced with the new content (CompositionMode_Source). But in a specific case when using DeviceCoordinateCache and when the item is transformed, the new content needs to be blended (CompositionMode_SourceAtop) with the old one to avoid incorrect fully transparent background. Autotest included. Task-number: QTBUG-7863 Reviewed-by: bnilsen
* | Fixed a bug where a proxy widget received FocusIn over and over.axis2010-03-182-1/+5
|/ | | | | | | | | | | This also fixed the issue where an input panel would not be requested by the widget, because it thought it was being focused over and over, instead of focused, and then clicked (focus followed by click is default input panel popup behavior on Symbian). AutoTest: Included and passed RevBy: yoann RevBy: Jan-Arve
* QGraphicsSceneEvent: add Q_DISABLE_COPYOlivier Goffart2010-03-091-0/+10
| | | | | | | | | | | Add Q_DISABLE_COPY to QGraphicsSceneEvent and all the sublasses The code would anyway not compile before as the QScopedPointer does not know QGraphicsSceneEventPrivate in use code. But now we have better error reporting. Reviewed-by: Thierry Task-number: QTBUG-8803 (related)
* Fixes wrong composition mode for cached backgrounds in Graphics View.Bjørn Erik Nilsen2010-03-031-6/+0
| | | | | | | | | | | This change partially reverts commit a589005f and therefore fully reverts 68be6457. We cannot assume that only opaque pixels are painted in drawBackground(). Regression against 4.5. Auto-test included. Task-number: QTBUG-8168 Reviewed-by: trond
* Properly fixes crash when destroying a QGraphicsItem.Yoann Lopes2010-03-032-37/+69
| | | | | | | | | | | The focus is now properly cleared when hiding or showing focus scopes or when a child of a focus scope is destroyed. No change of behavior in how focus scope works for QML. Autotest included. Task-number: QT-2649 Reviewed-by: Andreas Aardal Hanssen
* Fixed rendering bugs when scrolling graphics items with drop shadows.Samuel Rødal2010-03-022-43/+8
| | | | | | | | We can't clip source pixmaps to the device rect, as there's no way of knowing which parts of the source pixmap are needed for the part of the graphics effect that's unclipped. Reviewed-by: Bjørn Erik Nilsen
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6Sami Merila2010-02-253-12/+37
|\
| * GV: Update issues if drawItems() is overridden and IndirectPainting is used.Bjørn Erik Nilsen2010-02-241-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that the cached view bounding rect was never updated when overriding QGraphicsScene::drawItems or QGraphicsView::drawItems, without calling the base class implementation. The same for 'updateAll' boolean. We also have to make sure there are no unpolished items before we draw. Regression against 4.5. Auto-test included. Task-number: QTBUG-7880 Reviewed-by: yoann
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-02-231-9/+10
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QLineEdit shows leftovers of edit cursor after clear() doc: Added indication of default modality value for panels. doc: Added QScopedArrayPointer and corrected QScopedPointer snippet. Improve test coverage of QScriptString::toArrayIndex() QColorDialog::open() freezes the app the *second* time it is used on Mac doc: Corrected typo. doc: Removed bad grammar. doc: Added \obsolete. doc: Added \since 4.6 to the properties. doc: Removed some erroneous text.
| | * doc: Added indication of default modality value for panels.Martin Smith2010-02-231-3/+10
| | | | | | | | | | | | Task: QTBUG-7970
| | * doc: Removed some erroneous text.Martin Smith2010-02-231-6/+0
| | | | | | | | | | | | Task: QTBUG-7965
| * | Regression: QGraphicsScene::render fails to render the entire scene correctly.Bjørn Erik Nilsen2010-02-231-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only happened with items that had either negative width or height (boundingRect().width()|height()). Problem was that in case of not having an exposed region (drawing items from QGraphicsScene::render), we simply checked whether the bounding rect was empty or not. This is fine, however we have to normalize the rect first. (Note that QRegion::intersects(rect) always normalizes the rect, so that's why this use case broke only when calling QGraphicsScene::render). Auto-test included. Task-number: QTBUG-7775 Reviewed-by: yoann
* | Crash in QGraphicsScenePrivate::setFocusItemHelperSami Merila2010-02-251-1/+2
|/ | | | | | | | | | | QGraphicsScenePrivate::setFocusItemHelper accesses views.at(i)->inputContext() without checking if it is null. This leads to a crash if it really is null. Fixed by adding a null pointer check. Task-number: QT-3008 Reviewed-by: axis
* Doc fix, ensure that the \obsolete tag is placed correctlyAndy Shaw2010-02-171-1/+3
| | | | | | | If its not placed in the right place then it will cause the doc to lose the line that \obsolete is on Reviewed-by: TrustMe
* Don't crash when QTouchEvent is accepted but not handled by aBradley T. Hughes2010-02-161-1/+8
| | | | | | | | | | | | | | | | | | QGraphicsItem After propagating QEvent::TouchBegin, if there is no item that has accepted and handled the event, we must remove the touch point from our data structures. In this situation, QGraphicsScene will ignore the TouchBegin, as will QGraphicsView, and QApplication will respond by not sending any more touch events to the view/scene/item. This means our logic for handling TouchPointReleased points will never be called (and the QGraphicsScene's itemForTouchPointId and sceneCurrentTouchPoints state will be incorrect). Reviewed-by: Denis Dzyubenko Reviewed-by: Marius Storm-Olsen
* Correctly mark QGraphicsScene::drawItems() as obsoleteAndy Shaw2010-02-151-1/+3
| | | | | | | Since the \obsolete was not at the beginning of the function documentation it was not showing it correctly Reviewed-by: TrustMe
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6Martin Smith2010-02-121-6/+14
|\
| * Implemented GraphicsView Panel support for gestures.Denis Dzyubenko2010-02-121-6/+14
| | | | | | | | | | | | | | | | | | Events should not propagate outside the panel. Also when delivering gesture events we should respect panels modality. Task-number: QTBUG-7451 Reviewed-by: Mikko Harju Reviewed-by: Bradley T. Hughes
* | doc: Added some since version information.Martin Smith2010-02-121-13/+17
|/ | | | Task: QTBUG-7967
* doc: Fixed several typos.Martin Smith2010-02-121-1/+1
| | | | Task: QTBUG-7997
* QGraphicsItem: Do not crash at exit if there is static QGraphicsItem.Olivier Goffart2010-02-081-1/+2
| | | | | | | | | | The DataStore could have been destroyed before. Even if having static QGraphicsItem is not really supported, it is better not to crash Task-number: QTBUG-7629 Reviewed-by: bnilsen