summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Keep the width as it is to ensure the underline is drawn correctlyAndy Shaw2015-01-231-1/+1
| | | | | | | | | | | When the width of the decoration was floored then in some circumstances (such as when latin and Hangul text was mixed) an underline of the text would appear to be broken on HiDpi screens. Since the width is correct then we should keep it as it is to ensure it meets up correctly. Task-number: QTBUG-44062 Change-Id: I2cbf722a9cf9c7e15caa9aad061bf28d3bd0bb59 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Deprecate QFont:: rawMode()/setRawMode()Konstantin Ritt2015-01-234-33/+29
| | | | | | | rawMode only has an effect under X11 in pre-QPA times. Change-Id: Iaff8fed8f4ae5af5dd0399bb3ebd9d590a39a758 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Expose context lossLaszlo Agocs2015-01-221-2/+11
| | | | | | | | | | | | | | | | | On platforms like Windows (and presumably on mobile devices too) the loss of the context (e.g. the underlying D3D device in case of ANGLE) is an event that can happen randomly and needs sufficient handling. Enhance QOpenGLContext::isValid() with the purpose of indicating context loss. Currently only the Windows EGL backend (ANGLE) has support for it. Other platforms may be added later. Task-number: QTBUG-43263 Change-Id: I8177694c1ee7cebbd5d330e34757fd94c563e6d6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Only show QWindows after QScreen destruction if coming from virtual siblingTor Arne Vestbø2015-01-223-29/+30
| | | | | | | | | | | | | | | | | | | | | For windows that were shown on an external screen (not a virtual sibling of the primary screen), eg. on iOS, it doesn't make sense to re-show the window when moved back to the primary screen. By moving the logic into the QScreen destructor, we ensure that the code path is hit both for the old and unsupported style way of destroying QPlatformScreen by deleting it directly, and the new and safe way of using QPlatformIntegration::destroyScreen(), while still allowing clients to manage the windows themselves by emitting screenRemoved() before applying our fallback logic. [ChangeLog][QtGui][Important Behavior Changes] QWindows will no longer be re-shown automatically when moved from a destroyed QScreen, unless that QScreen was a virtual sibling of the primary screen. Change-Id: If1105bc5ef41a5392854bb97d121c998bffa3606 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Add project/unproject methods in QVector3DPaul Lemire2015-01-222-0/+69
| | | | | | | | | | Equivalent of gluProject and gluUnproject. [ChangeLog][QtCore][QVector3D] add convenience project and unproject methods to use like gluProject and gluUnproject Change-Id: I6e4e3e79ea6e34d1fb0c375e15185c950b699ef0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QTextDocumentLayout: handle QTextBlock visibilityJ-P Nurmi2015-01-221-2/+4
| | | | | | | Task-number: QTBUG-10153 Change-Id: I0420b9c59a7a437da28675349c14e84bfa4aea54 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Move static part of angleBetween/transformBetween/mapBetween to QPlatformScreenTor Arne Vestbø2015-01-213-59/+94
| | | | | | | | | Allows the helpers to be used at QPlatformScreen construction time, before it has been associated with a QScreen. Change-Id: Iab8f863ef5c9339ef6e88b3d844915c03cacda74 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Unify input device hotplugging support for embeddedLaszlo Agocs2015-01-216-2/+233
| | | | | | | | | | | | | | | | | | | | | | On embedded the mouse cursor will now appear and reappear regardless of how the input handling code is loaded (via a generic plugin or compiled-in to the platform plugin). Instead of passing around QDeviceDiscovery instances that only works when compiling-in the code into the platform plugin, introduce a new internal central QInputDeviceManager. The single instance of this provides a place to store any future input device related signals and properties. Also introduce mouse hotplugging support to linuxfb. [ChangeLog][QtGui] The mouse cursor on Embedded Linux is now handling hotplugging correctly with eglfs and linuxfb regardless of how the input handling code is loaded (via a generic plugin or built in to the platform plugin). Change-Id: I147c1b04a193baf216598015264f2c06e1b20f84 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Introduce QFontDatabase::isPrivateFamily()Gabriel de Dietrich2015-01-212-0/+19
| | | | | | | | | | | | Some platforms have the concept of private fonts (e.g., OS X and iOS) which are generally used as system UI fonts. Since 909d3f5c7, the platform font database has a similar but private API. [ChangeLog][QtGui][Fonts] Added QFontDatabase::isPrivateFamily() Change-Id: Ibdce9de534fadbbc3965be8a942c8012edeed209 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-219-33/+39
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Doc: Fix typosSze Howe Koh2015-01-191-1/+1
| | | | | | | | | | Change-Id: I29d5576902a5d1ea25558e980081952d9157f7f0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * Doc: Remove references to QOpenGLContext::destroy()Sze Howe Koh2015-01-191-6/+8
| | | | | | | | | | | | | | | | This function is private. Task-number: QTBUG-35907 Change-Id: I370c0bfd8fda11c68ee76ee42967f117a81b381c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * QTextFormat: fix undefined behaviorMarc Mutz2015-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Left-shifting of negative values is undefined ([expr.shift]/2). Since hashValue is a uint already, rectify by casting it->key to uint prior to shifting. Found by UBSan. Change-Id: I94a5311f5a4492f514f595b8fb79726df1e7d0de Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Doc: verb "to layout" changed to "to lay out"Nico Vertriest2015-01-161-4/+4
| | | | | | | | | | | | Task-number: QTBUG-43657 Change-Id: I574186253ee423cc380ec3c6f274f1caa2a6aa2a Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Fix inlining order of functions in qpathclipper_p.h.Friedemann Kleint2015-01-161-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When compiling tst_qpathclipper with MinGW: In file included from QtGui/private/qpathclipper_p.h:1:0, from tst_qpathclipper.cpp:33: src/gui/painting/qpathclipper_p.h:469:29: warning: 'static QPathEdge::Traversal QWingedEdge::flip(QPathEdge::Traversal)' redeclared without dllimport attribute after being referenced with dll linkage inline QPathEdge::Traversal QWingedEdge::flip(QPathEdge::Traversal traversal) ^ qpathclipper_p.h:474:29: warning: 'static QPathEdge::Direction QWingedEdge::flip(QPathEdge::Direction)' redeclared without dllimport attribute after being referenced with dll linkage inline QPathEdge::Direction QWingedEdge::flip(QPathEdge::Direction direction) Change-Id: I38feb07d693768285c1d405b3fc92a58c3309547 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Fix glyph runs painted badly with perspective transformAllan Sandfeld Jensen2015-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | A mismatch between requiresPretransformedGlyphPositions and shouldDrawCachedGlyphs in QRasterPaintEngine will cause the text position to be transformed twice when using drawGlyphRun on a QPainter with a perspective transform. Since this case falls back to drawing text as paths there is no reason to require any special treatment. Change-Id: Ib1c14aee4cc6774dd8feadc5748f0b0ee59633b9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Fix build error with Intel Compiler 15 on WindowsThiago Macieira2015-01-062-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the constructor is inline, the generated code needs access to the vtable, which gets emitted with the first virtual function (in QtGui), but somehow icl.exe can't find it in debug. Looking at the .obj files it generates and comparing to MSVC, it seems that: - both generate and export the inline constructor from Qt5Guid.dll - MSVC will call that constructor from qoffscreenintegration.obj - icl.exe will inline the constructor and requires a symbol not exported from Qt5Guid.dll I can't explain why (probably a compiler bug). Change-Id: I0ab9c078ae4fc794826025d68d364124c7247e80 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * JPEG: Fix reading of EXIF orientation.Friedemann Kleint2015-01-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | The orientation is unsigned short, read it as such. In JPEG-files created by Ricoh/Pentax cameras, the data is saved in Motorola format. Reading the wrong data size will produce invalid values when converting the byte order. Change-Id: I8f7c5dc5bfc10c02e090d3654aaefa047229a962 Task-number: QTBUG-43563 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QOpenGLTexture: introduce texture comparison supportGiuseppe D'Angelo2015-01-173-1/+147
| | | | | | | | | | | | | | | | Shadow sampling is an old OpenGL feature (hello, OpenGL 1.3!), which was missing from QOpenGLTexture. This commit adds the relevant support. Change-Id: I9f6b552d806a356d24ee08121af6bc9ce684f2b5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Introducing QPlatformHardwareCompositor.Gunnar Sletta2015-01-175-1/+189
| | | | | | | | | | | | | | | | | | | | Can be used by applications to send hardware buffers directly to the hardware compositor, if available. The primary usecase right now will be from QtWayland to 2D composition of surface by bypassing the OpenGL composition. Change-Id: Ibdcdcc744c34869d3abbc11aad448a755f87161f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Introducing QPlatformGraphicsBufferJørgen Lind2015-01-177-6/+694
| | | | | | | | | | Change-Id: Idcf8f75bd151a877c7097b79df998c1ffd56871c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Improve performance of path clipping in rasterizerAllan Sandfeld Jensen2015-01-171-17/+43
| | | | | | | | | | | | | | | | | | | | | | | | This patch short cuts a common loop in the gray rasterizer where it would iterate over cells it considers invalid. This greatly speeds up clipping paths on large paint devices, but probably has little benefit for the FreeType origin of our rasterizer. Task-number: QTBUG-40559 Change-Id: I30845de0b82e53b619853c6c91903793b4267615 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | QOpenGLTexture: better document the depth/stencil featuresGiuseppe D'Angelo2015-01-171-0/+12
| | | | | | | | | | | | | | For some reason these docs were missing, add them. Change-Id: If17cf429925ee849a0817e0294a7db7f6dace79b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Remove Q_C_CALLBACKSThiago Macieira2015-01-172-22/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useless. The C++ language does require callbacks passed to C functions to also be extern "C". That's what this macro was doing. But #ifdef'ing for the macro only made the code uglier. Just let the extern "C" be there for all compilers. PS: C++ classes can't be extern "C"... Change-Id: Ic5d393bfd36e48a193fcffff13b9c9b3923443dd Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Add QWheelEvent::sourceShawn Rutledge2015-01-137-16/+78
| | | | | | | | | | | | | | | | | | | | | | | | This is analogous to 0a92295ca829a62125c9f122fd3daec991993855 which added QMouseEvent::source. For now, we say that a wheel event is synthetic when it comes from a trackpad or other device that provides scrolling by some means other than an actual wheel. Change-Id: I0452ca2080b551b18b9c2f6e42db925d14ae339e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Make QStyleHints usable in QMLJ-P Nurmi2015-01-132-18/+69
| | | | | | | | | | | | | | Change-Id: Ia8f143d12c754b4af4a29bb9542cd050b5ae2ab0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove Q_STATIC_GLOBALxxx_OPERATOR macrosThiago Macieira2015-01-115-21/+17
| | | | | | | | | | | | | | | | | | | | These macros existed for working around an RVCT compiler bug, but since we stopped trying to work around it, the macros are no longer necessary. Change-Id: I76cc88d863b41f74f60cd9975dcc1959778c2740 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QPen: mark copy/move/swap as nothrowMarc Mutz2015-01-102-7/+7
| | | | | | | | | | Change-Id: Ib13d60256d96253934e0627d4c3015248e002e3f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add OptimizedWrite & ProgressiveScanWrite options to QImageIOHandler and use ↵Andy Maloney2015-01-095-5/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | for JPEG writing Exposes two options from libjpeg: the optimize option and progressive scan option. These are both lossless operations, so they do not change the image's quality. Using these switches can result in smaller jpeg files. Task-number: QTBUG-20075 Change-Id: I8d0bd6a712b8a365265b7bd517e136b0755b90cb Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* | Remove workarounds for RVCT compiler bugsThiago Macieira2015-01-062-59/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does not try to remove support for RVCT. There has been no report of it working or failing to work, so the status continues to be unknown. In particular, the inline assembly code in atomic_armv[56].h remains in place. This commit only removes workarounds for compiler bugs or bogus warnings, assuming that anyone using this compiler has updated since Qt last tried to use it for Symbian in 2011. Note also how anonymous unions are now part of the language in C++11. Change-Id: Idc4fab092beb31239eb08b7e139bce2602adae81 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QCursor: add move ctorMarc Mutz2015-01-052-0/+11
| | | | | | | | | | | | | | QCursor already dealt with d == nullptr, so this is trivial. Change-Id: Ib2c6a3f0dc8b93035ffe3059cdce925463706e10 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devSimon Hausmann2014-12-3012-52/+30
|\ \
| * | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-2912-52/+30
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/kernel/qplatformsystemtrayicon.cpp src/gui/kernel/qplatformsystemtrayicon.h src/plugins/platforms/xcb/xcb-plugin.pro Change-Id: I00355d3908b678af8a61c38f9e814a63df808c79
| | * QRawFont: improve the thread-safety checksGiuseppe D'Angelo2014-12-231-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 384388f2 introduced some checks, and used an assignment in an assert; that sets off compiler warnings about expressions with side effects into an assertion. Hence, that code needs to be reworked a bit. Unfortunately, there's no single define we can use to know if assertions are enabled or not in Qt, so simply use QT_NO_DEBUG to enable/disable those checks. The actual "thread" data member is kept around to avoid break ABI depending on debugging flags. Change-Id: I8b07e7ff6f81359d6b0653a1d9cc2b720541d1b9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| | * Doc: corrected broken links qtbaseNico Vertriest2014-12-234-11/+7
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-43115 Change-Id: Ib441326083294a6d59d75510142b1481f7b0bc35 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
| | * Check screen before changing cursorJoni Poikelin2014-12-231-1/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-43508 Change-Id: I6b525cab2a3958f4e3528ed8102d07984f152e60 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * Check for valid receiver before sending gesture events.Jason Haslam2014-12-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gesture events sent to a disappearing tooltip can crash. This can most easily be seen by scrolling over a tooltip on OSX with a magic mouse middle scroll gesture. Task-number: QTBUG-42826 Change-Id: Id5510895f63297ca157e3d24a3f4e3a6034586e8 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * Revert "Fix printing of semitransparent images to PDF"Allan Sandfeld Jensen2014-12-181-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch was incorrect and caused semi-transparent images have inversed colors instead of fixing it. This reverts commit 624740cdcdd4abfb15bbbc8a8aa056c57712499f. Change-Id: I3f1fa17309fcb53995520843449aae972e0090b8 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| | * Remove unused code from QFontEngineFT.Rafael Roquetto2014-12-182-33/+0
| | | | | | | | | | | | | | | | | | | | | | | | This method is not being called anywhere. Change-Id: Ia32e8b48d324e4848db666de4d274a260d22b06d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| | * QPlatformSystemTrayIcon: the timeout is in msecs, not secsDmitry Shachnev2014-12-182-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What gets passed to this function is in milliseconds, not seconds (see QSystemTrayIconPrivate::showMessage_sys_qpa implementation), and the only currently existing implementation (in KDE frameworkintegration) expects milliseconds as well. Change-Id: I7a2c847530391aa73183704251c996664668a740 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Set the minimum required FreeType version to 2.1.10Konstantin Ritt2014-12-291-50/+19
| | | | | | | | | | | | | | | | | | | | | | | | ...and get rid of workarounds for older versions, which also makes the code more readable. Change-Id: I087110c5f60cd664dad241776e1a0df901989c75 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Minor improvement to Qt-HB bridging codeKonstantin Ritt2014-12-291-12/+12
| | | | | | | | | | | | | | | | | | | | | Replace C-style cast with static_cast for casts from void*. Change-Id: I4d6c602037e70afe2746a179a31fea4c5043c3d5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Report font tables are R/O blobsKonstantin Ritt2014-12-291-1/+1
| | | | | | | | | | | | | | | | | | | | | There is no point in modifying font tables, so mark them RO for clarity. Change-Id: I8ddbda9ace9c5a0eeabc0c5e5f64558060b5ee69 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [Docs] Don't propose using deprecated QFont:: rawName()/setRawName()Konstantin Ritt2014-12-291-8/+4
|/ / | | | | | | | | Change-Id: I333417b1340a56d782316c2c3628f63a504153ab Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | [QFont] Don't build datastream helpers with QT_NO_DATASTREAMKonstantin Ritt2014-12-241-3/+1
| | | | | | | | | | Change-Id: Id70491c07f5cf13d5f78ec0fc94ffd2b3134ff20 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Make it obvious we never expect QFontDatabase::Any to be supportedKonstantin Ritt2014-12-231-1/+1
| | | | | | | | | | | | | | | | | | This also unbreaks matching for scripts not covered by qt_script_for_writing_system(). Change-Id: Iddf015281a57a9dbae2e09f0408359441b020df8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Re-use cached font engines when request only differs in scriptKonstantin Ritt2014-12-231-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When looking for engine of non-Common script and lookup in the font cache failed, first check if we have already loaded that engine for the same request but different script. In general, this gives an arbitrary font engine a chance to be re-used multiple times when request only differs in script, which saves a LOT of memory (~10MB on my win7, after scrolling the QFontComboBox'es list). Change-Id: I9c752ce65c27142237a0ed74b33742b6a8d90a24 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | [QFontDatabasePrivate] Drop unused `fallbackFamilies` memberKonstantin Ritt2014-12-231-5/+1
| | | | | | | | | | | | | | | | It is probably a refactoring left-over. Change-Id: Ic6f1e1a87c8603f600cd1736cf12c03ef0188074 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | emit lastWindowClosed even if quitOnLastWindowClosed is falseShawn Rutledge2014-12-231-14/+12
| | | | | | | | | | | | | | | | | | | | | | Behavior will agree with the docs. [ChangeLog][QtGui][QWindow] lastWindowClosed will be emitted even if quitOnLastWindowClosed is not set Task-number: QTBUG-32956 Change-Id: I7bb269d53894859fee27e171eea7ad472ea86af0 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Add a function for QPA plugins to explicitly destroy QScreensGiulio Camuffo2014-12-233-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously QPlatformScreen was automatically deleting its QScreen in ~QPlatformScreen(). That means that we cannot use QScreen's methods when the screen is being removed, because doing so would call virtual methods of QPlatformScreen. By that point the QPlatformScreen subclass object does not exist anymore, and we call the default implementation instead of the subclassed one, or get a crash for the pure virtual methods. This happens for example when removing a screen which contains a QWindow with some QML item using QQuickScreenAttached. This patch adds a QPlatformIntegration::destroyScreen() function, which deletes the QScreen and later the QPlatformScreen. ~QPlatformScreen will still delete the QScreen if it was not deleted with destroyScreen(), so code not ported to the new approach will continue to work as before, with only a warning added. Task-number: QTBUG-41141 Change-Id: Ie4a03dee08ceb4c3e94a81875411f6f723273fe1 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>