summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-101-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
| * Fix QGraphicsWidget window frame section logicDyami Caliri2015-02-021-2/+2
| | | | | | | | | | | | | | | | | | CppCat detected duplicate sub-expressions in the code that checked for BottomLeftSection and BottomRightSection. It was fairly obvious to see what the values should be. Change-Id: Id45ca5bbd26c92b800c60867fef5170578216eee Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | QtWidgets: use Q_ENUM instead of Q_ENUMSOlivier Goffart2015-02-081-1/+3
| | | | | | | | | | Change-Id: Id5280c1d9feab95e1506569f3d0eb23eeb74935f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Remove unnecessary math.h and limits.h includesAllan Sandfeld Jensen2015-02-041-2/+0
| | | | | | | | | | Change-Id: I28c898f869ed3f03b08ff55f2972a38667c755ad Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Fix 1700 override warnings [-Winconsistent-missing-override]Sérgio Martins2015-02-031-8/+8
| | | | | | | | | | | | | | | | | | | | | | Classes should either use or not use override, otherwise it hurts code readability. Some inline keywords were removed because of an error with MSVC2010: error C2216: 'override' cannot be used with 'inline' Change-Id: I7276d5525a92281bd0d743beb11d0dc73441443b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Make it more obvious that Q_WS_ is dead code, and should perhaps be portedTor Arne Vestbø2015-02-036-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | We still have a bunch of Q_WS_ ifdefs in our code, which are easy to mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming the ifdefs we make it clear that the code in question is dead. In incremental follow-ups, we can then selectively either remove, or port, the pieces that are dead code. Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Extend selections in QGraphicsView when selection extension key downAndy Maloney2015-01-134-7/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user has some objects selected and holds down the "extend selection" key (Control on Windows, Command on Mac OS X), clicking and dragging a rubber band selection deselects the current selection. This is counter-intuitive and confusing for users. This commit fixes the behavior so users can extend selections using the rubber band when the proper key is held down. Task-number: QTBUG-6523 Change-Id: Ieda4aaa50adb351c0405f5cb8aae23332eec58a9 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Remove Q_NO_USING_KEYWORDThiago Macieira2014-12-204-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a lot of code now requiring it. Any compiler that doesn't support the keyword is too old for Qt now. The last time anyone asked about this macro was for QTBUG-27393 and we don't know which compiler that was. As a necessity, this patch contains a reversal of a0c3a57aed5cde37017733e7cf5e41cc6a1174aa [ChangeLog][Compiler Specific Changes] Qt 5.5 now unconditionally uses the "using" keyword. Compilers that do not support this keyword are deprecated and will not be able to build Qt. Previous versions of Qt may or may not compile, as no testing was done to ensure it worked. Change-Id: Ief042f34aba555a095d1f342a0ee7ee9feadf42d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-182-1/+2
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/platformsupport/platformcompositor/qopenglcompositor.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I5422868500be695584a496dbbbc719d146bc572d
| * Propagate the source of mouse eventsAlexander Volkov2014-12-111-0/+1
| | | | | | | | | | | | | | | | | | Set the source for mouse events which were caused by other mouse events. Change-Id: Ifca1648883ef2b94bb317ed9340759475d350146 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Removed redundancy in QGraphicsItem documentation.Benjamin Summerton2014-12-101-1/+1
| | | | | | | | | | | | | | | | Snippets [1] and [QGraphicsItem type] are the exact same, each referenced once, and only in the same file. Removed the later snippet. Change-Id: I4f35a8322034b00e9b5f5d6c6d96e652f11f8384 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-0316-236/+236
| | | | | | | | | | | | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Don't rely on hasChanged() in ensureGeometriesJan Arve Saether2014-12-013-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | It can be removed now because we now have a better caching mechanism than before. It should therefore not be needed anymore. Since nothing else calls hasChanged, we can finally get rid of it. This simplifies the code and enables us to further improvements to the code. Change-Id: I51afe5a97311e3e361ae8b491ecbcd21bbedacd1 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-241-5/+33
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * QGraphicsTextItem: document that adjustSize can center/right align textGiuseppe D'Angelo2014-11-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Unlike QTextEdit, there's no implicit width for a QGraphicsTextItem, meaning any rich text that is supposed to be centered or right aligned will not be unless the user explicitly sets the width. There's also another possibility: calling adjustSize() manually. Document that. Task-number: QTBUG-312 Change-Id: I83023269f4c63643e8224887efe2143dd1bb1908 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * QGraphicsItem: document that setOpacity(0) almost makes the item invisibleGiuseppe D'Angelo2014-11-111-2/+11
| | | | | | | | | | | | | | | | | | This particular "feature" leaked into QtQuick1 back in the day. Still it was never documented in QGraphicsView. Task-number: QTBUG-18267 Change-Id: Ib5fb446015176f6e9b4095f6ec9030258cbd1ad4 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| * QGraphicsItem: clarify the documentation about caching modes and update()Giuseppe D'Angelo2014-11-071-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible that Qt calls paint() several times for an item that has caching enabled, even without any explicit call to update(). There are various reasons why that is possible (memory pressure, item gets transformed, etc.); the important part is that 1) the user must not rely into "caching enabled" = "1 paint() call" 2) the user must always draw the same content from within paint(), unless update() was called before that call to paint(). Task-number: QTBUG-18410 Change-Id: I2c8d77e6e11aaceffc9a21003dd3f4cc46edd582 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * Doc: corrected wrong equivalent of obsolete QGraphicsItem::rotateNico Vertriest2014-11-031-1/+1
| | | | | | | | | | | | Task-number: QTBUG-39027 Change-Id: Icb5998a4e28edbc6952bc79d970c5ce6dbe57d69 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-276-3/+31
|\| | | | | | | | | | | | | Conflicts: src/gui/text/qfontdatabase.cpp Change-Id: I6ac1f55faa22b8e7b591386fb67f0333d0ea443d
| * QGraphicsScene: stabilize stacking order of toplevel itemsaavit2014-10-241-1/+1
| | | | | | | | | | | | | | | | | | Removing and adding toplevel items could result in invalid stacking order (not corresponding to insertion order). Task-number: QTBUG-19316 Change-Id: Ia8646784a2181cfa936b101e2adaf7e7e73bb83d Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| * Fix rubberband selection in rotated GraphicsViewaavit2014-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | Selection rectangle was incorrectly mapped to scene space when the view was rotated. It became a rotated rectangle instead of the correct polygon (rhombus). Task-number: QTBUG-42008 Change-Id: Ib7b366bec7e1f83109e03c434268ad6897138f30 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| * Adjust the layout if a QGraphicsWidget is explicitly hiddenJan Arve Saether2014-10-233-0/+28
| | | | | | | | | | | | | | | | | | Since layout items can now be hidden, this also makes sure we respect the QSizePolicy::retainSizeWhenHidden Task-number: QTBUG-20132 Change-Id: Iab59fc9b61d4ca1bb2208c479a027da6eb0283a9 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
| * Produce more correct clip path for QGraphicsShapeItemLars Knoll2014-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | If no pen is set on the item, we can completely ignore the pen for the creation of the items shape. This both speeds up the creation of the shape and applying it as a clip mask as well as creating more correct results. Task-number: QTBUG-32846 Change-Id: I5f6f690256c71309713d8f746e67599af3088dd7 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-1/+1
|\| | | | | | | Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
| * Doc: Use title case in section1 titlesNico Vertriest2014-09-301-1/+1
| | | | | | | | | | | | | | | | Using Python script title-cased.py Task-number: QTBUG-41250 Change-Id: I00d3d7a0b30db7304a7904efd6d63abd9a7b493b Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-2953-1008/+606
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/image/qimage.cpp src/gui/image/qppmhandler.cpp src/gui/kernel/qguiapplication.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765
| * Update license headers and add new license filesMatti Paaso2014-09-2453-1008/+584
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
| * Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-232-0/+22
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| | * Add missing private headers warningSamuel Gaist2014-09-042-0/+22
| | | | | | | | | | | | | | | Change-Id: I7a4dd22ea3bcebf4c3ec3ad731628fd8f3c247e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QGraphicsView: use qEnvironmentVariableIntValue()Marc Mutz2014-09-122-2/+2
|/ / | | | | | | | | | | | | | | It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I774ae9011b855f746b5e3fdf25995d81ec60b82a Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | GraphicsView: Fix resolvePalette() for QGraphicsItem's childrenMaks Naumov2014-09-052-3/+3
| | | | | | | | | | | | | | Use a proper function for that. Change-Id: I166ce44b8987d522cb01bae57009b2b862851b92 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Speed up the removal of items from a QGraphicsSceneDimitar Asenov2014-09-031-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a linear index, all items in a scene are stored in a QList. While adding new items is a constant operation, removal requires a traversal through the entire list. This is especially problematic when the scene contains millions of items and many of them are removed, which requires a linear search for each item, resulting in a very slow operation. Moreover, this behavior is actually inconsistent with the current documentation which states for the linear index: "Adding, moving and removing items, however, is done in constant time." With this change, the list is sorted once an item needs to be removed. The item to be removed is then found using binary search. To reduce the overhead of sorting the list is not sorted from scratch. First the newly inserted items are sorted and then the two parts of the list are merged. [ChangeLog][QtWidgets][QGraphicsScene] Speed up the removal of items when using the linear index. Change-Id: I28708622605d7fb0fac656df1f9b2f2fa3136759 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Revert "Speed up the removal of items from a QGraphicsScene"Dimitar Asenov2014-09-032-39/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bf2ec0183cb62034f2a4e700b7ab741371fcb106. That patch changed the way the linear index works in QGraphicsScene in order to speed up item removal. That patch occasionally rebuilt the index by recursively exploring all items in the scene, starting with the top level. Further testing revealved that in some circumstances, rebuilding the index in this way can be slow, thereby significantly slowing down the index compared to the unpatched version. The original patch only exists in the qt 5.4 branch and has not been released. Change-Id: I081dbcdcc86196ef382466c3e800a33eab9a5b79 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Fix error reported by address sanitizerOlivier Goffart2014-08-131-4/+6
| | | | | | | | | | | | | | | | It is not valid to dereference a null pointer, even if it's just in order to access enum constants Change-Id: Id404c308ae7ffd879afdd678302e3ac4e0c69001 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Make QOpenGLWidget publicLaszlo Agocs2014-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QOpenGLWidget is now public. In addition Qt::WA_AlwaysStackOnTop is introduced to support the special case of semi-transparent QOpenGLWidget or QQuickWidget on top of regular widgets. hellogl_es2 becomes the qopenglwidget example. This example performs painting both via QPainter and native GL commands and has the OpenGL widget combined with other, normal widgets. The widget stack receives some changes when it comes to renderToTexture widgets like QQuickWidget and QOpenGLWidget. Calling update() will now result in a paint event, which is essential for QOpenGLWidget since we want it to behave like a regular widget. The dirty region handling is extended specially for such widgets due to performance reasons. (an OpenGL content update must not result in any backingstore painting, and is thus handled as a different kind of dirtiness) [ChangeLog] Added QOpenGLWidget. This widget serves as a replacement for QGLWidget. Task-number: QTBUG-36899 Task-number: QTBUG-40086 Change-Id: Ibf7f82fea99b39edfffd2fc088e7e0eadbca25cf Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-011-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * Fix typo in QGraphicsTextItem::defaultTextColor() documentation.Mitch Curtis2014-06-101-1/+1
| | | | | | | | | | Change-Id: I6e255483d63a3024d9cbfe09a12f33d7fddf36c0 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Propagate source/flags of QMouseEvent to QGraphicsSceneMouseEvent.Friedemann Kleint2014-06-253-1/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is useful to be able to detect synthesized mouse events in GraphicsView as well. [ChangeLog][QtWidgets][QGraphicsSceneMouseEvent] Accessors for Qt::MouseEventSource and Qt::MouseEventFlags were added to QGraphicsSceneMouseEvent to enable detection of synthesized mouse events. Task-number: QTBUG-39814 Change-Id: Ib5835fef1f484005f9b0fc86518ed32ea79cd80f Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Speed up the removal of items from a QGraphicsSceneDimitar Asenov2014-06-162-7/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a linear index, all items in a scene are stored in a QList. While adding new items is a constant operation, removal requires a traversal through the entire list. This is especially problematic when the scene contains millions of items and many of them are removed, which requires a linear search for each item, resulting in a very slow operation. Moreover, this behavior is actually inconsistent with the current documentation which states for the linear index: "Adding, moving and removing items, however, is done in constant time." Instead of removing items from the list in the index, this patch just marks the list as invalid. The next time the list is required it will be rebuilt from scratch by traversing all items from the scene. This new behavior more accurately matches the documentation. Testing this change in a scene with over 1 million objects, resulted in a massive speed up, effectively eliminating the overhead of item removal. [ChangeLog][QtWidgets][QGraphicsScene] Speed up the removal of items when using the linear index. Change-Id: I95c7b90b9f1fe426018695b6429138530e6d2f3e Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-131-1/+1
|\| | | | | | | | | | | | | Manually changed enum to LibGL in src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: If34ee6cce3d1d51fb4bb1fdfa59c30389ea0d207
| * Fix typo in QGraphicsView's interactive property doc.Mitch Curtis2014-05-061-1/+1
| | | | | | | | | | Change-Id: Iccc58490b330657d5d23c333fc408cde33231d95 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-061-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp src/opengl/qglpixelbuffer.cpp src/opengl/qglshaderprogram.cpp tests/auto/opengl/qglthreads/tst_qglthreads.cpp Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
| * Fix crash when deleting top level windows embedded into QGraphicsProxyWidget.Friedemann Kleint2014-04-141-0/+4
| | | | | | | | | | | | | | | | | | | | Clear proxyWidget pointer in slot QGraphicsProxyWidgetPrivate::_q_removeWidgetSlot(). Task-number: QTBUG-29684 Task-number: QTBUG-33213 Change-Id: Ibdbd52aa810ca908e3d98daa00954345e7a93a48 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Add a new optimization flag to QGraphicsItem.Dimitar Asenov2014-03-316-23/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new flag ItemContainsChildrenInShape is similar to the existing flag ItemClipsChildrenToShape. Setting the new flag makes QGraphicsScene assume that children are drawn within the shape of the current item but this is not enforced by clipping. When an application manually ensures this clipping boundary, setting the new flag removes the overhead of enforcing the clip with ItemClipsChildrenToShape, while still allowing other routines to behave more optimially by assuming children are within the shape of the current item. [ChangeLog][QtWidgets][QGraphicsItem] Added the ItemContainsChildrenInShape flag that enables using optimizations of ItemClipsChildrenToShape without the overhead of enforcing the clip. Change-Id: I5496fe1ca331b77fd51e0df8a3ace2b8e939eaf2 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-03-241-5/+5
|\| | | | | | | | | | | | | Conflicts: src/gui/image/qjpeghandler.cpp Change-Id: I9db3acea7d5c82f5da679c8eaeb29431136665f0
| * QGraphicsSimpleTextItem: Fix drawing the outline with pen, when setKonstantin Ritt2014-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | QTextLayout's setAdditionalFormats() is expected to invalidate the shaping results, so that the layouting must be done *after* the format range(s) gets applied. Task-number: QTBUG-33475 Change-Id: I6b948fc179da915545a98ac36f2c20163947ec9e Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix high-dpi QGraphicsPixmapItem bounding rects.Morten Johan Sørvig2014-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsPixmapItem did not take the pixmaps devicePixelRatio into account when calculating the bounding rect. As a consequence, a 512x512@2x pixmap would get a 512x512 bounding size instead of the correct 256x256 bounding size. Task-number: QTBUG-37008 Change-Id: I266e418b7e5d92bf1d4c96bd9380a27708dc2b4a Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| * correct send vs sent grammarDavid Fries2014-03-141-2/+2
| | | | | | | | | | | | | | | | Correct the tense of send vs sent in comments and documentation. Change-Id: I1c5ce9a7b1e49b8b0e8dcfde7d732e4c69acf73a Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Add a new optimization property to QGraphicsSceneDimitar Asenov2014-03-183-9/+79
|/ | | | | | | | | | | | | | | | | The minimumRenderSize is a qreal value that is used as a lower bound to determine what items are visible when a scene is rendered. If an item's view-transformed width or height are less than minimumRenderSize then this item is considered to insignificantly affect the final result and is not drawn. If the item clips its children to its shape they are automatically not drawn. This greatly reduces the drawing overhead for scenes with many items rendered in a zoomed out view. [ChangeLog][QtWidgets][QGraphicsScene] Added the minimumRenderSize property which can be used to speed up rendering by not painting items, smaller than a give size. Change-Id: Ie208234707dffb4d2fc620fc5d1514e0c144d9a8 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Doc: fix documentation for QGraphicsScene::focusItemChanged()Marc Mutz2014-03-041-1/+1
| | | | | | | The name was misspelled in \fn. Change-Id: I09824b72423b116612ee6e1069793de95d76f883 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>