summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-105-4/+27
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Merge remote-tracking branch 'origin/5.4.1' into 5.4Frederik Gladhorn2015-01-293-1/+16
| |\ | | | | | | | | | Change-Id: Idadb5639da6e55e7ac8cc30eedf76d147d8d5d23
| | * Fix drag and drop regressionGatis Paeglis2015-01-193-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix regression introduced by e4becdc3d310a0dd1a6d34d0796a52b21dedeb2d Add QPlatformDrag::ownsDragObject() function, QDragManager can use the return value of this function to decide if it should take care of deleting QDrag object or platform plugin will take care of deleting QDrag. XCB platform plugins uses async dnd data delivery mechanism. It allows user to drop something and then continue working with the assurance that the target will get the data regardless of how slow the network connections are, which means that a source window should preserve QDrag data until dnd has finished. Change-Id: I1fbad7380cddec98b756698993dd397409833150 Task-number: QTBUG-43436 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * | Safeguard QScreen::refreshRate against buggy platform behaviorGunnar Sletta2015-01-212-3/+11
| | | | | | | | | | | | | | | | | | Change-Id: I891bd5272db76e8562f6722b633cc0fdaac5f7a2 Task-number: QTBUG-43853 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | remove stray QGuiApplicationPrivate::wheelEventSource declarationShawn Rutledge2015-02-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | It is unimplemented and probably unnecessary. Unintentionally included in commit 74443d7bbb319e949928dd081fde04bccb5f7845. Change-Id: I3a1afb20e673fa0611b602a11ceca1953231ac14 Reviewed-by: Andrew Knight <qt@panimo.net>
* | | QtGui: use Q_ENUM instead of Q_ENUMSOlivier Goffart2015-02-085-7/+7
| | | | | | | | | | | | | | | Change-Id: I92ac2ea218e9134aa36ecb179b8ae790a2dba56a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Avoid the initializeOpenGLFunctions() call after versionFunctions()Laszlo Agocs2015-02-071-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Try making it compatible with QOpenGLContext::functions() which returns an already initialized QOpenGLFunctions. Unfortunately we cannot make them 100% compatible because functions() conveniently requires that the context (or a sharing context) is current. versionFunctions() has no such requirement and we cannot safely introduce it anymore. What we can do is to state that as long as the context is the current one, the initializeOpenGLFunctions() call can be omitted. If another context (or no context) is current, the call will still be needed, like it is today. Also, we require that the exact same context is current. Sharing does not count since the exact behavior of sharing contexts with different versions is unknown. [ChangeLog][QtGui] initializeOpenGLFunctions() no longer needs to be called when querying a versioned function wrapper object via QOpenGLContext::versionFunctions(). Change-Id: I0b4d1ae1f780da3f5dec9fc8dc67255c13faab6e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | QOpenGLWidget/Window: improve docs for the dtorGiuseppe D'Angelo2015-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | Remove a typo and add the standard sentence about a dtor. Change-Id: Ie21ad6d2e83977705ea43fdc872d08f496a32376 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Handle gracefully the removal and re-attachment of all QScreensShawn Rutledge2015-02-075-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't crash; restore windows when all screens are removed and re-added. xcb: on configure notify, check for screen change: it may be that a window belonging to a screen which was removed has now gotten mapped to the new screen. On screen change, send a synthetic expose event, because the real expose events already happened. Task-number: QTBUG-38326 Task-number: QTBUG-32973 Task-number: QTBUG-42985 Change-Id: If334f55c248468ad3c95e7066bb14eca377d2050 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | | Revert "Introducing QPlatformHardwareCompositor."Gunnar Sletta2015-02-065-188/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm having seconds thoughts about this api. Better to not commit to it just yet. This reverts commit ebdd4a0ba7daf74b11f716d291a97f7cd28c2aca. Change-Id: I9725e3172b0166b56364a34db246eabb685e855d Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | | Fix regression from Qt4 with layout directionJan Arve Saether2015-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt4, if the result of the translation QApplication::translate("QT_LAYOUT_DIRECTION") returned "RTL", Qt usually called QApplication::setLayoutDirection(Qt::RightToLeft) in order for a translation file to specify if the UI should be left-to-right or right-to-left. However, due to modularization, we could no longer call QApplication::translate(), so the code was wrongly changed to call QCoreApplication::translate(....) instead. This was wrong, and in addition the translation files was never updated with the new context. This patch fixes it to only translate it with the QGuiApplication context. This is the only sensible context, since QApplication would lack QtQuick support, and QCoreApplication would not know how to change layout direction. [ChangeLog][QtGui][i18n] Fixed bug where layout direction did not switch according to the instruction in the translation file. Task-number: QTBUG-43447 Change-Id: Id0409a42d41b3b9ff1cd53d090c4d9c9802f5659 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Fix 1700 override warnings [-Winconsistent-missing-override]Sérgio Martins2015-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | WGL: support reset notifications via GL_ARB_robustnessLaszlo Agocs2015-02-032-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handling context losses is unavoidable with ANGLE. Introduce some level of support for desktop GL too by making it possible to opt in via a new flag. Support is added for Windows (WGL, opengl32) only for now. In case of Windows with ANGLE setting the flag is not necessary, context losses will be reported regardless. Change-Id: Ic354c1382e876566538c52a4381f7ff328b7477e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | QStyleHints: restore CONSTANT to non-NOTIFYable propertiesJ-P Nurmi2015-02-021-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The removal of CONSTANT keywords broke intended QML usage: property string: Qt.styleHints.passwordMaskCharacter and leads to such warnings: QQmlExpression: Expression ... depends on non-NOTIFYable properties: QStyleHints::passwordMaskCharacter Change-Id: Iadc5ddcbe5c5704f146e073f514845426ff0ec4d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Expose the ThreadedOpenGL cap to appsLaszlo Agocs2015-02-022-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applications have no public API to check for the ThreadedOpenGL flag reported by the platform plugins. Add a static function to QOpenGLContext to give interested applications a way to decide if they should do rendering on separate threads. Task-number: QTBUG-44208 Change-Id: I629332512ab31fe49f842065a911270cd6cea7aa Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Utilize EGL_KHR_surfaceless_context in QOffscreenSurface when availableLaszlo Agocs2015-02-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use it also in the context initialization code which also relied on pbuffers until now. This is safe to do since QOffscreenSurface is deliberately kept minimal: we only support it for rendering to FBOs or uploading textures, it is quite useless for any rendering type of operation. Therefore simply not creating a surface when the extension is available is viable and should not break anything. While we should have done this a long time ago, the real inspiration now is to avoid crashes with some bad EGL implementations. Mesa in particular tends to crash in its interal configuration handling when trying to create a pbuffer surface with more exotic attributes, for example with multisampling enabled. Just getting rid of those properties is not an option since the resulting pbuffer would not be compatible with the existing context. Therefore our only option is to avoid the pbuffer altogether. There's a so-far-ignored patch for Mesa http://patchwork.freedesktop.org/patch/38100/ which tries to solve some of this but it turns out it is not sufficient to avoid problems with the multisampled case. So to avoid more headache, we just stop using pbuffers there. [ChangeLog][QtGui] QOffscreenSurface is now relying on EGL_KHR_surfaceless_context when available, and avoids creating a pbuffer surface when the extension is present. Change-Id: Id18742768b8e66c8d92ce65a9bf64b0296e14db7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Track QPlatformScreen -> QScreen using QPointerTor Arne Vestbø2015-01-242-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows the QPlatformScreen to verify that the QScreen is alive before sending events to QPA for the given screen (which will assert if the screen is being destroyed). Change-Id: Ie77674fead3e0a4d4f6fedbf1f7f3c98364c7485 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | QOpenGLWidget/QOpenGLWindow: add a destructor which calls makeCurrentGiuseppe D'Angelo2015-01-242-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generally speaking, QOpenGLWindow subclasses are going to use some various QOpenGL* wrapper object to handle their buffers, FBOs, etc. Some of those QOpenGL* wrappers are QObjects, hence it should be safe to have them as child objects, and expect Qt to clean them up properly; but that doesn't happen because of how the destruction will work. In particular, when the subclass object is deleted, there may not be the right OpenGL context set as current. The deletion will go up to ~QObject, where the child objects will be deleted, resulting in a crash. That will *also* happen if someone connected to the context's aboutToBeDestroyed() signal: the context will in fact be deleted after the child objects, since it's stored in QOpenGLWindowPrivate, whose dtor will be run after ~QObject (!). Now, in the general case, QOpenGLWindow subclasses should always have a dtor in which they call makeCurrent() (also because various QOpenGL* class are not QObjects, hence they're kept around as full members instead of pointers-to); but at the same time we should clean up properly the QObject children. All of the above of course stands for QOpenGLWidget as well. Task-number: QTBUG-44094 Change-Id: I2379041fe175416936f6d40292039f773a515b35 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.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>
* | | 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>
* | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-213-6/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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>
| * 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>
* | 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-175-2/+641
| | | | | | | | | | Change-Id: Idcf8f75bd151a877c7097b79df998c1ffd56871c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | 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>
* | 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 remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-297-14/+14
|\| | | | | | | | | | | | | | | | | | | 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
| * Doc: corrected broken links qtbaseNico Vertriest2014-12-233-10/+6
| | | | | | | | | | | | | | 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>
| * 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>
* | 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>
* | Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devGiuseppe D'Angelo2014-12-201-3/+3
|\ \
| * | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-181-3/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * QOpenGLContext: Use static invocation of ↵Friedemann Kleint2014-12-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGuiApplication::platformNativeInterface(). Fix MSVC warning (release build): qopenglcontext.cpp(1116) : warning C4189: 'app' : local variable is initialized but not referenced Change-Id: I00fa5237bbac4c0e3bb63ea9d3e5096e05dbe1be Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | QOpenGLWindow: make it possible to use a shared contextJørgen Lind2014-12-202-3/+28
|/ / | | | | | | | | Change-Id: I7e9f115a9b75d38c1d6a214958d18d6fd9eac891 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Unbreak shortcut handling on embeddedLaszlo Agocs2014-12-151-4/+9
| | | | | | | | | | | | | | | | | | | | | | It went completely broken after the fix for QTBUG-32928. The crash fix I made afterwards forgot to take into account that the shortcuts must still be handled, even when the window in the input event is null. So instead of bailing out on a null tlw, we have to use the window that currently has the focus. Task-number: QTBUG-43203 Change-Id: I6cd65ee5bd021f80d9440cba8bc9dfda9abe2cfd Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Don't attempt to load an empty generic plugin if no environment variable is set.Robin Burchell2014-12-101-2/+7
| | | | | | | | | | | | | | Also warn if a requested generic plugin is not available. Change-Id: Iab1f1f87be435b4ad446881cba25d0b19a564f08 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-101-0/+6
|\| | | | | | | | | | | | | | | Conflicts: doc/global/template/style/online.css mkspecs/android-g++/qmake.conf Change-Id: Ib39ea7bd42f5ae12e82a3bc59a66787a16bdfc61
| * Take ShareOpenGLContexts into account in QOpenGLWindowLaszlo Agocs2014-12-081-0/+6
| | | | | | | | | | | | | | | | | | While the attribute was originally intended for widgets (QOpenGLWidget, QQuickWidget) only, we need a way to get multiple QOpenGLWindow instances whose contexts share with each other. Change-Id: Ib983c9c2815b0a3911bc504ffad8d8dddad192aa Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Improve TouchPoint debug outputLaszlo Agocs2014-12-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Printing a QWindowSystemInterface::TouchPoint can be misleading if it only includes the normalized position. Many backends do not provide such information so it is often 0, 0. Print also the "area" which is always set, the center of this rect is the actual touch position in screen coordinates. Change-Id: I2f3efabf6ced6fae9937518cc39d898e66b7894e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Harmonize QPA TrayIcon showMessage parameter orderShawn Rutledge2014-12-082-2/+2
| | | | | | | | | | | | | | | | | | | | Parameters were misnamed in some places but still managed to pass them through in the right order. Rename to avoid confusion, and keep the parameter order the same as in QSystemTrayIcon::showMessage. Change-Id: Ib4c8fff15eff15034c4ea64757803b118e487144 Reviewed-by: Marco Martin <mart@kde.org> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-0310-27/+27
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-2710-4/+48
|\| | | | | | | Change-Id: Id20053d261b4fbbcc0ac8ba49dd3ef2253fa4b95
| * Implement heightForWidth().Friedemann Kleint2014-11-272-0/+10
| | | | | | | | | | | | | | | | | | | | Add a virtual function QWindowPrivate::closestAcceptableGeometry() which is called from the platform plugin. Task-number: QTBUG-36220 Task-number: QTBUG-36318 Change-Id: I2b3d205e2c75f1d4dd2ba1d333b0d89bc0fcf13a Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>