summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsintegration.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Windows QPA: Introduce command line options for DirectWriteFriedemann Kleint2016-08-051-0/+4
| | | | | | | | | | Add option "nodirectwrite" to turn off DirectWrite fonts and "nocolorfonts" to turn off DirectWrite for colored fonts. Task-number: QTBUG-55096 Task-number: QTBUG-55097 Change-Id: If12133fbd20dc7657b3616eff833a8e8c116e070 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Windows QPA: Add missing parameter to qWarning()Friedemann Kleint2016-08-031-1/+1
| | | | | | | | | | The warning printed when wrapping foreign windows is missing a parameter. Amends change f2ef587906062706e576e376e4c6481ab192f50d. Task-number: QTBUG-41186 Change-Id: Iefbd174c1acc42e87fd1a764d96452b1745aa4c0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QWindow::fromWinId(): Return 0 when foreign window cannot be wrappedFriedemann Kleint2016-07-281-1/+6
| | | | | | | | | | | | | | Change window creation code in QWindow to not assert should platform window creation fail for foreign windows. Prototypically add check to the Windows QPA plugin. [ChangeLog][Windows][Important Behavioral Changes] QWindow::fromWinId() may return 0 when passing invalid window handles. Task-number: QTBUG-41186 Change-Id: I936112607ec6e0838d36ac2a72aa88b869df5c23 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Windows QPA: Format window title correctly when creating a window.Friedemann Kleint2016-05-231-1/+3
| | | | | | | | | Add convenience QWindowsWindow::formatWindowTitle() and use that in QWindowsIntegration::createPlatformWindow(). Task-number: QTBUG-53394 Change-Id: I76ebade97c5af71ffa3d11075511b94a54a3dbf8 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| * Fix threading issue in creating static opengl contextMäättä Antti2016-05-091-2/+4
| | | | | | | | | | | | | | | | Add mutex lock for static opengl context creation. Task-number: QTBUG-53202 Change-Id: Iba22339776ec8885efd82b13ae56f6781a426f4b Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-271-3/+2
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_win.cpp src/widgets/itemviews/qheaderview.cpp Change-Id: I0a59ade9cd6e91f770fdf298a7d72a41e79fd761
| * Windows QPA/GL: Avoid crash in GL driver.Friedemann Kleint2016-04-221-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | QWindowsStaticOpenGLContext::doCreate(): Invoke QWindowsOpenGLTester::supportedRenderers() only when needed; specifically, do not unnecessarily call it when GLES/SW renderer is specified. Amends change b4c8e1517455becb138876c08b3bdd880a80770d. Task-number: QTBUG-49541 Task-number: QTBUG-52693 Change-Id: I58d1c584d194f8e7fee35ee16b77575f86d3c22e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-071-2/+6
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qftp.cpp src/widgets/itemviews/qheaderview.cpp src/widgets/itemviews/qlistview.cpp tests/auto/network/access/qftp/tst_qftp.cpp Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
| * Windows QPA: Don't send geometry change after window creation for ↵Friedemann Kleint2016-04-051-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | maximized/fullscreen. For these states, geometry change will be sent from the code called by setWindowState(); the geometry obtained immediately after window creation is then no longer valid. Task-number: QTBUG-52231 Change-Id: Ia7cbe95e73c5dd4126bb63d448b83f2cab6a53a1 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-241-2/+2
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/plugins/platforms/windows/qwindowsfontengine.cpp src/plugins/platforms/windows/qwindowsnativeimage.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
| * Windows QPA: Fix warnings as shown by Qt Creator's Clang based code model.Friedemann Kleint2016-02-191-2/+2
| | | | | | | | | | | | | | | | Code except font, accessibility and file qwindowswindow.cpp. Task-number: QTBUG-50804 Change-Id: I40848264f9fa16eea00cf70d7be009c484c49e92 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Windows QPA: Improve handling of windows of type Qt::ForeignWindow.Friedemann Kleint2016-01-301-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract a base class QWindowsBaseWindow from QWindowsWindow that provides _sys() getters for geometry and margin calculation and implements QPlatformWindow::geometry()/ frameMargins() to be calculated from the HWND. Implement a QWindowsDesktopWindow class directly inheriting QWindowsBaseWindow which does not allow any manipulation. Add a thin QWindowsForeignWindow class that wraps a foreign window id and always returns correct geometry/margin information when queried. Simple reparenting and manipulation of geometry for child windows is also implemented, allowing for embedding foreign windows into Qt. When calling other setters on it, the unimplemented warnings of QPlatformWindow will trigger. Remove the special casing for foreign/desktop window from QWindowsWindow. The existing mechanism to cache the geometry/margin values in QWindowsWindow remains as is. Rename the existing QWindowsWindow::baseWindowOf() and add checks there. Task-number: QTBUG-50206 Task-number: QTBUG-41186 Change-Id: Ib57cb87e3981312d32920fe3e49f0b1c4ad516a3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2016-01-121-1/+2
|\| | | | | | | Change-Id: I5839bded07e23af65ced9491c4f50242f964dd31
| * Windows: Output resulting DPI awareness in debug and warning output.Friedemann Kleint2016-01-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix the signature of QWindowsShcoreDLL::GetProcessDpiAwareness and output the value in the warning about failures of SetProcessDpiAwareness and in debug output. Failures occur when Qt is embedded into another application, for example Active Qt servers. Task-number: QTBUG-41186 Task-number: QTBUG-50206 Change-Id: I3fd6cba26826ee8bbfa0a34f129deb64797c947f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | iOS: Implement support for QApplication::beep()Tor Arne Vestbø2015-12-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Vibrates the device or plays an alert sound on devices that do not support vibration. The other implementations of beep() have been moved to QPlatformIntegration as a proper API instead of having them as invokables in QPlatformNativeInterface. Change-Id: Ic597dbef04b46d49862b070e78ddfc0d763829a2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-021-3/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
| * Avoid dynamic switching between backingstore composition pathsLaszlo Agocs2015-12-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it opt-in because doing a normal backingstore flush does not seem to work on Cocoa once we use OpenGL on the window. Windows and Linux should be able to cope with this. This means that platforms outside Windows and Linux will continue to have the problem of having GL-based compositing enabled for ever after having a QOpenGL/QuickWidget shown in the window once, but the issue is most prevalent on Windows anyway, OS X machines can deal with OpenGL better in general. Task-number: QTBUG-49172 Change-Id: I30fd2efa95cc4f6eed9cf7f7613d0750355c775c Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| * Windows Open GL blacklist: Introduce keyword "disable_rotation".Friedemann Kleint2015-11-271-3/+14
| | | | | | | | | | | | | | | | | | | | | | Add a flag to disable rotation to the Renderers enumeration of QWindowsOpenGLTester triggered by the keyword "disable_rotation". Specifying this keyword forces the application to landscape mode for Desktop GL. It is intended for drivers that have issues with rotation. Task-number: QTBUG-49541 Change-Id: I0f0bb7415c59e98648be09b34a59dd201d52b211 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-181-13/+21
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/network/kernel/qnetworkinterface_winrt.cpp tools/configure/configureapp.cpp Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
| * Windows: Move GUI event dispatcher to QtPlatformSupport.Friedemann Kleint2015-11-141-2/+2
| | | | | | | | | | | | | | This makes it possible to reuse it for the minimalegl QPA plugin. Change-Id: I1c3dbaf67f32294a5d0e03cc1eb8557049b810a5 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * Windows/Direct2D: Handle screen changes after window creation.Friedemann Kleint2015-11-131-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call QWindowSystemInterface::handleWindowScreenChanged() in QWindowsIntegration::createPlatformWindow() should the effective screen be different from the initial screen due to the geometry. In order to avoid code duplication in the Direct2D plugin, fold the helper method createWindowData() into QWindowsIntegration::createPlatformWindow() and introduce a new virtual helper to create the actual platform window for QWindowsDirect2DIntegration to hook in. Task-number: QTBUG-48379 Change-Id: I49c7a50a12245691414ab49bffe802239a87d2d6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-041-11/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/ptrsize.test configure src/corelib/global/qnamespace.h src/network/socket/qabstractsocket.cpp tests/auto/other/networkselftest/networkselftest.pro Change-Id: Ic78abb4a34f9068567cea876861d4220f5a07672
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-11-041-11/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstorageinfo_unix.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/styles/qwindowsvistastyle.cpp Change-Id: Ie1725933815891cc8c86258d4c0e8ed0ab386edf
| | * Windows: Delay-initialize pluggable touch devices.Friedemann Kleint2015-10-281-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move touch device initialization code to QWindowsContext and replace the assert on the touch device in QWindowsMouseHandler by a call to the initTouch(). Task-number: QTBUG-48849 Change-Id: If8573b8283ef94e7fd015f6edc626e3c8cc0b139 Reviewed-by: Joni Poikelin <joni.poikelin@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | qevent.h: Add fixme comments to remove include directives for Qt 6.Friedemann Kleint2015-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Mark include directives in qevent.h for removal and preemptively add missing headers in code base. Change-Id: I81011d7bfad4a09d80deeda6d1bed67b5c0e63c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-09-251-4/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/io.pri src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/network/socket/qabstractsocket.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h src/widgets/styles/qgtkstyle.cpp tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro tests/auto/dbus/qdbusconnection/qdbusconnection.pro tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp Change-Id: I347549a024eb5bfa986699e0a11f96cc55c797a7
| * | Harmonize input context selectionBernd Weimer2015-08-251-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Input context selection works differently across platforms. On some platforms it is not possible to request a specific context at all (e.g. Wayland). This will be unified, depending on the environment variable "QT_IM_MODULE", you will get: - null: default (platform) context, if defined (otherwise no context) - empty: no context - set: set one, if it exists and is valid (otherwise no context) [ChangeLog][Platform Specific Changes] Haromnized input context selection. QT_IM_MODULE environment variable will be taken into account. Change-Id: Ic8f826fbc6ace25941cd19b9b086943e848fbe01 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
* | | Windows: Do not set process DPI awareness when Qt runs in a plugin.Friedemann Kleint2015-09-071-3/+5
|/ / | | | | | | | | | | | | | | | | Disable the call depending on Qt::AA_PluginApplication. Task-number: QTBUG-47556 Change-Id: Id50a09d99a9e1fb4f57d85798a7554e124cfafa5 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-061-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| * Windows: Fix handling of cursor flash time.Friedemann Kleint2015-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | Check for special return value INFINITE (unsigned -1) of GetCaretBlinkTime() (indicating cursor should not flash) and return 0 in that case. Change-Id: Iead41a20a68b79d04b03f77a3caf063d4e1d577e Task-number: QTBUG-47208 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Highdpi changes for WindowsFriedemann Kleint2015-07-301-1/+2
| | | | | | | | | | | | | | | | | | | | Adapt the Windows plugin to work with the new cross-platform high-DPI scaling. Task-number: QTBUG-38993 Task-number: QTBUG-46615 Change-Id: I108d319255925a290b75611e95ef006d4aaf7ace Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Revert "Add devicePixelRatio support to the Windows QPA plugin."Friedemann Kleint2015-07-291-8/+3
|/ | | | | | | | | This change reverts c47b04696a9d1dab04c4a59ed9ce4c28aa00fe98 . Task-number: QTBUG-38993 Task-number: QTBUG-46615 Change-Id: I180dcac3a65a33498b90a71bbcad5e45a12af77c Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Windows QPA plugin: Fix debug formatting.Friedemann Kleint2015-04-301-6/+5
| | | | | | | | | | | | | | | | - Introduce QDebugStateSaver for all debug operators. - Remove the "Flags=" from enumerations since their type is now output by default. - Added some spaces since the previous formatting relied on space=true as a result of some debug operators erroneously returning debug.space(), which is now fixed in qtbase. - Fixed formatting, added noquote() where necessary, added some newlines, used stream modifiers instead of QString::number(n, 16) to output hex numbers. - Fix indentation. Change-Id: I64123a4262916e21448cda2aa61ae1100f07291a Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* windows: Introduce a built-in GPU blacklistLaszlo Agocs2015-03-111-3/+5
| | | | | | | | | | | | | | | | | | | | | | | Use a built-in JSON file in case the QT_OPENGL_BUGLIST environment variable is not set. When QT_OPENGL_BUGLIST is set, the built-in list is ignored. To make the implementation simpler and more readable, some of the code in QWindowsOpenGLTester is reshuffled a bit. It also caches the results now, so it is safe and fast to call supportedRenderers() and friends multiple times. The blacklist currently contains the Intel card from QTBUG-43263 (Intel GMA / HD3000 ?) and may also apply to QTBUG-42240. [ChangeLog][QtGui] Qt now contains a built-in GPU driver blacklist for Windows that disables the usage of desktop OpenGL with some older cards that are known to be unstable with opengl32.dll. Task-number: QTBUG-42240 Task-number: QTBUG-43263 Change-Id: I1ecd65b51fca77925317d52048e7ab01d9b8797c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Avoid crashing when there is no QWindowsIntegration anymoreLaszlo Agocs2015-03-061-1/+4
| | | | | | | | | | | When destroying the QWindowsIntegration, the global instance is set to null in the destructor. This is followed by a lot of additional steps when destroying the members. Some of that cleanup calls to staticOpenGLContext() which was not handling the case of the integration global instance being null. Change-Id: Ib74faf491d4c81635934547968ec91e9dceec6e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Remove debug formatting functions obsoleted by the new debug operator for ↵Friedemann Kleint2015-03-051-2/+2
| | | | | | | | QFlag<T>. Change-Id: I6d737eb86b790eeefb537ca5e6a075bf30a3dcfb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Decide whether to synthesize mouse events on a per device basisAlexander Volkov2015-02-251-7/+12
| | | | | | | | | | | | | | | | | | | | | Currently Qt uses the QPlatformIntegration::StyleHint SynthesizeMouseFromTouchEvents to check whether to synthesize mouse events from touch events. But not only platform plugins can produce touch events, they can be created by e.g. QTest::touchEvent() and in this case we almost definitely need synthesizing regardless of the platform. This commit introduces a QTouchDevice::MouseEmulation capability which replaces use of the QPlatformIntegration::SynthesizeMouseFromTouchEvents. So it's possible to pass QTouchDevice without this capability to QTest::touchEvent() and be sure that mouse events will be synthesized. Notice that touch pads always emulate mouse events. As a result we can activate some tests which were disabled for specific platform configurations by commits 6c1670d8c273819435867c42725c0db0eee597dc and e9760f1559361c39f269fb89f1ebd01f6ee8378d. Change-Id: Idc82fa4007a095fc1cb5934979361b0023d2b793 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Have XCB/Windows platform integration classes keep their own instance pointerSandro Mani2015-02-251-5/+4
| | | | | | | | | | | | Through the chain of code called by QPlatformIntegrationFactory::create, there are cases where QGuiApplicationPrivate::platform_integration is accessed (typically through QGuiApplicationPrivate::platformIntegration()) before the call to QPlatformIntegrationFactory::create has returned. Change-Id: I7805b72be5b56aed5cb8ce30cb908743c9b1f91b Task-number: QTBUG-44388 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Windows: Delay creation of the static OpenGL context.Friedemann Kleint2015-01-191-22/+13
| | | | | | | | | | Delay initialization/GL detection until a surface is requested. Remove member variable from window and access static context from QWindowsIntegration only. Task-number: QTBUG-43832 Change-Id: I4b9a324b58af4399df5c314bfb2b952455b1e080 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Windows: Add infrastructure to be able to a GL renderer based on GPU.Friedemann Kleint2015-01-151-31/+45
| | | | | | | | | | | Introduce flags for the renderer type and move code to qwindowsopengltester. Introduce QWindowsOpenGLTester::supportedGlesRenderers() where type-dependent checking can be added. Change-Id: I4bbffaf861cb0fdbea0919e081e3626fb5a872de Task-number: QTBUG-43263 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Don't use QByteArrayLiteral in comparisonsMarc Mutz2014-10-091-3/+3
| | | | | | | | | | | | | | | For const char*s, operator== is overloaded, so comparing to a (C) string literal is efficient, since qstrcmp doesn't require the length of the strings to compare. OTOH, QByteArrayLiteral, when not using RVO, litters the code with QByteArray dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare with a (C) string literal instead. Change-Id: Id3bfdc89558ba51911f6317a7a73c287f96e6f24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Warn when loading opengl32sw.dll failsKai Koehne2014-10-021-1/+3
| | | | | | | | | Print a warning when the developer/user has explicitly requested the software backend, but loading openglsw.dll fails. Change-Id: I8b1f079538ac70ceacbf1a397a276659c760a4cc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Add devicePixelRatio support to the Windows QPA plugin.Friedemann Kleint2014-08-251-2/+9
| | | | | | | | | | | This adds support for the environment variable QT_DEVICE_PIXEL_RATIO for the Windows platform plugin. Task-number: QTBUG-38993 Task-number: QTBUG-38858 Change-Id: I6831eb6d3a09a80be7bbef46395e91531b61cc50 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Windows: Ensure DPI awareness is set only once.Friedemann Kleint2014-08-051-1/+5
| | | | | | | | | | | | Fix warning: QWARN : tst_QGuiApplication::execAfterExit() SetProcessDpiAwareness failed: "COM error 0xffffffff80070005 (Unknown error 0x0ffffffff80070005)" occurring when instantiating QGuiApplication repeatedly in tests. Task-number: QTBUG-38993 Change-Id: Id6c8e915b25011bb60c2f8b1d0e4a794cd345647 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Load winsys and gl dynamically in the windows pluginLaszlo Agocs2014-05-221-54/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dynamic builds (-opengl dynamic) are now functional on Windows. In such a build no components in Qt link to any OpenGL libraries directly and qmake will not automatically add any such libraries to the applications' makefiles. Instead, the libraries are chosen and loaded during runtime and applications are expected to use QOpenGLFunctions instead of direct OpenGLfunction calls. Set the environment variable QT_OPENGL to desktop or angle to skip testing and force the given implementation. The application attributes (AA_UseOpenGLES and such) are also taken into account. The testing logic is same as before: We try to load opengl32 and resolve a shader related function. If this fails, ANGLE is chosen. This allows utilizing full desktop OpenGL on systems that have proper drivers, while a transparent fallback to ANGLE will be done automatically for systems that don't. The latter includes also remote desktop connections. Software rendering via Mesa llvmpipe is supported too. The fallback is automatic on systems where the desktop test fails and ANGLE fails to load or initialize (e.g. due to missing libs like d3dcompiler), as long as a suitable patched build of Mesa is available. [ChangeLog][QtGui] Dynamic OpenGL implementation loading is now supported on Windows. This requires Qt to be configured with -opengl dynamic. Task-number: QTBUG-36483 Change-Id: Ie8bb25a6d55b3a1609b00150aeccd909aec27313 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Windows: Improve checking of options to the QPA plugin.Friedemann Kleint2014-05-141-6/+30
| | | | | Change-Id: I59129132c7caa13d5c9d8f1e6211da68505dd838 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>