summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
Commit message (Collapse)AuthorAgeFilesLines
* Resize the window when the screen's dpi changesOlivier Goffart2017-02-164-3/+24
| | | | | | | | | | | | | That's what the MSDN documentation say one should do in the handler for WM_DPICHANGED [ChangeLog][QtGui][Windows] Windows are now automatically resized when they are moved on a screen to adapt to the new pixel ratio. Task-number: QTBUG-55510 Task-number: QTBUG-48242 Change-Id: I7688f12165f76585d75686e2e94b0fc562627be2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Use the native algorithm to find out the window's screenOlivier Goffart2017-02-153-4/+12
| | | | | | | | | QPlatformWindow::screenForGeometry uses the screen where the center of the window is, but native application use the one which intersects with the bigger area. It might not be the same. Change-Id: I831a5fcaea0e293e9f0f93ef5e562cce57fae2f4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-141-1/+5
|\ | | | | | | Change-Id: I2bd2e61bae1eab4fc74fa6accd741ed9ae1f0669
| * Windows QPA: Include GL header depending on presence of dynamic GLFriedemann Kleint2017-02-131-1/+5
| | | | | | | | | | | | | | | | Amends change 7780ee9e5f20f80ab9e053058d0b6d92586cf876. Task-number: QTBUG-58178 Change-Id: I0b6e064dfdbdafb7fba9c20c56cfd873fa594c44 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Blacklist Intel HD Graphics IronLake (Arrandale) on WindowsAndy Nichols2017-02-091-1/+13
| | | | | | | | | | | | | | | | | | | | More poor quality Intel OpenGL drivers causing issues when using OpenGL in Qt. Change-Id: I76ad023a1f1e92d57dc0b081c665a3b066206068 Task-number: QTBUG-53888 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Add QPlatformWindow::isForeignWindow()Tor Arne Vestbø2017-02-093-11/+10
| | | | | | | | | | | | | | | | Simplifies code at call sites and allows for refactoring how to decide if a window is foreign or not at a later point. Change-Id: Icc51a83bac187f4975535366b53b4990832b6c82 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'gerrit/dev' into HEADOswald Buddenhagen2017-02-017-43/+68
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-302-6/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network-chat/peermanager.cpp src/widgets/util/qsystemtrayicon.cpp src/widgets/util/qsystemtrayicon_qpa.cpp src/widgets/util/qsystemtrayicon_win.cpp src/widgets/util/qsystemtrayicon_x11.cpp Change-Id: I1c026df83818c0ccaf956980370e7522960627db
| | * Merge remote-tracking branch 'origin/5.8.0' into 5.8Liang Qi2017-01-251-5/+0
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/android/qandroidinputcontext.cpp Change-Id: I80f35a3d722f1e218ff338b6652e551da45c38e7
| | | * Windows QPA: Do not return QPlatformIntegration::ShowIsMaximized in tablet modev5.8.0Friedemann Kleint2017-01-181-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hint is not appropriate for Windows 10 tablet mode as it affects only main windows. Dialogs should still show up in normal size. Partially reverts change d377f14fd5b4fe3ed64392c6b743bac395f9f891. Task-number: QTBUG-58227 Change-Id: If9cf4990eb40913904cd97e17a7622bc6cbe84ca Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | * | Ensure a pixel density of at least 1 for Qt::AA_EnableHighDpiScalingJocelyn Turcotte2017-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Very large 1080p TVs or any display which is running at an abnormally low resolution can have a DPI lower than 48, which means that qRound(dpi/96) will result in a 0 pixel density, causing critical issues for applications using Qt::AA_EnableHighDpiScaling. Make sure that we always have a pixel density of at least 1 to allow applications not having to worry about such displays. Task-number: QTBUG-56140 Change-Id: I1dafbf7794a99ae6f872984c0337d8ff0d1fc1c0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | | Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/devLiang Qi2017-01-266-27/+56
| |\ \ \
| | * | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-256-27/+56
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/common/msvc-version.conf mkspecs/common/winrt_winphone/qmake.conf mkspecs/features/mac/default_post.prf mkspecs/features/mac/sdk.prf mkspecs/features/qt.prf mkspecs/features/uikit/default_post.prf mkspecs/features/winrt/default_pre.prf mkspecs/winphone-arm-msvc2013/qmake.conf mkspecs/winphone-x86-msvc2013/qmake.conf mkspecs/winrt-arm-msvc2013/qmake.conf mkspecs/winrt-x64-msvc2013/qmake.conf mkspecs/winrt-x86-msvc2013/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/gui/kernel/qwindowsysteminterface.cpp src/network/kernel/qhostaddress.cpp src/plugins/platforms/mirclient/qmirclientplugin.cpp src/plugins/platforms/mirclient/qmirclientplugin.h src/widgets/util/qsystemtrayicon.cpp tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp tools/configure/Makefile.mingw tools/configure/Makefile.win32 Done-with: Jake Petroules <jake.petroules@qt.io> Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
| | | * | Windows QPA: Prevent usage of child windows as transient parentFriedemann Kleint2017-01-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using foreign window integrations such as MFC/winmigrate, it is possible that a child window is found which can cause issues with modality. Loop up to top level. Task-number: QTSOLBUG-71 Task-number: QTBUG-57159 Change-Id: Ib36e0f8f4f6b1e22ba1240013871facef2c0c1ab Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | * | Windows QPA: Call InvalidateRect() in WM_PAINT/GL Software renderingFriedemann Kleint2017-01-191-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring back the call to InvalidateRect() removed by change 6086c81e4d999d88ce4d412 since it seems that GL Software rendering requires it (also for single buffer mode). Task-number: QTBUG-58178 Change-Id: I197a1b3c3906c4afa43943db30dbc07dfb656cc7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | | * | Windows QPA: Fix QScreen::grabWindow(0) for non-primary screensFriedemann Kleint2017-01-181-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the code grabbed the client rectangle of GetDesktopWindow(), which is always the primary screen. Fix by using the geometry of the QPlatformScreen. In addition, subtract x, y from the effective size when sizes < 0 were passed in as does XCB. Task-number: QTBUG-58110 Change-Id: I6ed439d2e1da8affd0a1475717d5570017fb1f2b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | | * | Windows: Check if the fallback key matches the shift modifier case tooAndy Shaw2017-01-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some keyboard layouts where pressing shift will give something different to what the expected key would be. For example, on a French keyboard layout, pressing SHIFT+! gives 1 as opposed to SHIFT+1 giving ! on a US keyboard layout. Therefore it should check against both cases to ensure it does not end up adding a new entry. Task-number: QTBUG-57938 Change-Id: I11c52619c048b98500f2d79876bb912720af6e65 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | * | Win: Account for windows which are WindowTransparentForInputAndy Shaw2017-01-052-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-57864 Change-Id: I8793aaa3719fbcf97f95ae462135cbf6b5823097 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | * | windows: use lowercase #includeAndrew Knight2016-12-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MinGW's headers are lowercase, and MSVC is generally run on a case- insensitive file system. Including in the lowercase is the more compatible option. Change-Id: I288cecb77ddd8029bb3925e613a830dd9ce96a6c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | | | Windows QPA: More fine-grained suppression of geometry/state change eventsFriedemann Kleint2017-01-251-10/+11
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When switching windows from fullscreen to maximized, move and resize events are triggered when changing the window decorations, ending up in QWindowsWindow::handleResized(), QWindowsWindow::handleMoved() which then may call handleGeometryChange(). Change 917ef5787444403ce0f7f035e27b1740c7672e34 blocks the emission of events depending on flag WithinSetStyle from handleGeometryChange() for Windows CE. This has issues which become visible when switching from fullscreen to maximized repeatedly: - State change events are still sent from QWindowsWindow::handleResized(), QWindowsWindow::handleMoved() when changing the window style programmatically causing the maximized state to be lost after a few cycles(QTBUG-53368). - Geometry change events are actually needed on the desktop for proper redrawing (QTBUG-53577). Make this more fine-grained by suppressing all state changed events while WithinSetStyle is set and allowing geometry changes. Amends 917ef5787444403ce0f7f035e27b1740c7672e34. Task-number: QTBUG-53368 Task-number: QTBUG-53577 Change-Id: Icc8dc935cfc29b314aab2d6fac02c97174c79c3e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* / / / Win: If the combined key is unknown then fall back to the original key pressedAndy Shaw2017-01-271-1/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When pressing a combination of keys it is possible that it ends up being seen as a Key_unknown and as a result it can give strange results when used. Therefore if the key is Key_unknown in that case then it should fallback to the unmodified key. For example on a French keyboard, this means it will correctly allow CTRL+< as a shortcut instead of showing it as CTRL+\. Task-number: QTBUG-58304 Change-Id: Iae4c11a1e6e2d4343134ed1e3f9049b6df2613af Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Windows platform headers: Add isTabletMode()Friedemann Kleint2017-01-182-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a bool function querying Windows 10 tablet mode. Task-number: QTBUG-56831 Change-Id: Ief728a7d80a11ba79f7859033ff4be6ef79bbd4e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | Windows QPA/Open file dialog: Copy non-filesystem itemsFriedemann Kleint2017-01-111-6/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the introduction of the new IFileDialog interfaces in Qt 5, the open file dialog no longer was able to open items on MTP mounted devices. The Win32 API GetOpenFileName() used in Qt 4 would hide this by creating a local copy of the file in the INetCache folder. Add code to emulate the behavior in QWindowsNativeOpenFileDialog::dialogResult(). Task-number: QTBUG-57070 Change-Id: I88cccfbf9697585225356cc864df67c86a912c91 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | Windows QPA: Refactor conversion of IShellItemFriedemann Kleint2017-01-111-119/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a light wrapper class around IShellItem which hides its idiosyncracies. Task-number: QTBUG-57070 Change-Id: I60a825ea7a826d67859ab82537d614ecc3367692 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | Windows QPA: Implement setting the "Cancel" button text of file dialogsFriedemann Kleint2017-01-101-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | The functionality was missing in IFileDialog. As of Windows 7; IFileDialog can be queried for IFileDialog2, which provides it. Task-number: QTBUG-44112 Change-Id: I0c0345d516bbc36f9bb519545f5eda1289c9ef23 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Split QPlatformWindow::isEmbedded into isAncestorOf to separate concernsTor Arne Vestbø2017-01-052-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function was doing two things, both checking window ancestry and whether or the window was a direct child of non-Qt window. The former has now been split of in a QPlatformWindow::isAncestorOf(), which simplifies the code in e.g. QApplicationPrivate::isWindowBlocked(). Change-Id: I259a190e03ef8def23356005474eeeee74c9ae89 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | QWindowsTheme: Run dedicated SHGetFileInfo() threadGabriel de Dietrich2016-12-212-32/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes are motivated by the following reasons: 1. SHGetFileInfo() needs to be COM-intialized per thread. Microsoft's documentation for CoInitalizeEx() is quite unambiguous about this. 2. Following point 1, using a thread from the global thread pool means we would taint every such thread with the COM-initialization state. This may result in unexpected behavior in other parts of the application. Moreover, systematic COM-uninitialization can be expensive and can't be recommended in this case. 3. Even though the timeout duration is pretty generous, the logic is wrong and could lead to serious errors should the call to SHGetFileInfo() actually take too long. This is because we let the thread run with references to the main thread's stack, namely a reference to the file name string, and pointers to the result variable and SHFILEINFO struct. Running a dedicated thread allows us to ensure points 1 and 2. Point 3 is ensured by making a local copy of the file name and using local instances for the info struct and the result. Then, provided the thread has not been cancelled, we can copy the info and result values back into the main thread's stack referenced memory areas. This also removes all need for QWindowsThreadPoolRunner which will remain in the code base nonetheless. Change-Id: Ic9c2d6204ac015aa409db2b57a09837361203291 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Windows QPA: Initialize all members of QWindowsMouseHandlerFriedemann Kleint2016-12-201-3/+3
| | | | | | | | | | | | | | | | | | | | | Amends change 9ef93fa153e9093f7b1b9c901192dcf8282b6c3d. Change-Id: I74dd4cb81e2830552d465a5e855c08fe798617f1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-161-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure configure.pri examples/widgets/painting/fontsampler/mainwindow.cpp examples/widgets/painting/fontsampler/mainwindow.h mkspecs/features/moc.prf src/corelib/global/qglobal.h src/gui/text/qtextdocument.cpp Change-Id: Ica65512e00871695190a14ccea5c275b0165f787
| * | Merge remote-tracking branch 'origin/5.8.0' into 5.8Liang Qi2016-12-161-1/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/plugins/platforms/android/qandroidplatformopenglcontext.h src/plugins/platforms/android/qandroidplatformtheme.h Change-Id: I13d51cc66f708138ff4d667ceea7d515992e58a4
| | * Windows QPA: Fix build with MSVC2015 on Windows 7Friedemann Kleint2016-11-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The installation uses SDK 8.1 which does not have the required include files. Add a check depending on NTDDI_VERSION. Change-Id: I6323496aed2a2d6e22d41ec14bdf8c6cf1bf2f31 Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-137-2/+235
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/Makefile.unix.macos qmake/Makefile.unix.win32 qmake/generators/win32/msvc_vcproj.cpp src/3rdparty/pcre/qt_attribution.json src/corelib/io/qsettings.cpp src/corelib/kernel/qdeadlinetimer.cpp src/platformsupport/kmsconvenience/qkmsdevice.cpp src/platformsupport/kmsconvenience/qkmsdevice_p.h src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h tests/manual/qstorageinfo/printvolumes.cpp tools/configure/configureapp.cpp Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
| * | Plugins: use QStringBuilder moreAnton Kudryavtsev2016-12-121-1/+1
| |/ | | | | | | | | | | Change-Id: I6f026b81fdc403d99d37dfa22ea6a27a95ead347 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-251-0/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qcoregraphics.mm src/gui/painting/qcoregraphics_p.h src/plugins/platforms/cocoa/qcocoahelpers.h src/plugins/platforms/cocoa/qcocoahelpers.mm Change-Id: Ibe5efcae73526b3d3931ed22730b13d372dcf54e
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-251-0/+3
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qml_module.prf src/corelib/tools/qdatetimeparser_p.h Change-Id: I5382cee3ddb33107dc61ee20f7a9188c4a68a882
| | | * Windows QPA: Do not send key events for mouse-synthesized app commandsFriedemann Kleint2016-11-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sending key events in addition causes applications to respond twice to for example the back / forward extra mouse buttons. Suppress the keypress by checking on the device. This is in line with the other platforms, which do not send keypresses either. Native event filters will still be able to listen for WM_APPCOMMAND. Task-number: QTBUG-48117 Task-number: QTBUG-57198 Change-Id: I219e17244087663f06ab2c5a8cf4b880c3655700 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | | Windows QPA: Detect Windows 10 tablet modeFriedemann Kleint2016-11-225-1/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new file for dynamically loading Window 10 Helpers via combase.dll and add function qt_windowsIsTabletMode() querying UIViewSettings::get_UserInteractionMode() for "Touch" mode. The style hint QPlatformIntegration::ShowIsMaximized will then reflect the tablet mode setting. Task-number: QTBUG-56831 Change-Id: Ia361dd172fcf0e54fdfc70863c43527f3ea72fe2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | | Windows: Replace Q_DECL_OVERRIDE by overrideAlexander Volkov2016-12-0822-223/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use 'override' directly since Qt 5.7. Also remove redundant 'virtual'. Change-Id: Ib478f19381d53642e1ed1c2a589d6b9c4d663e3c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | Windows QPA plugin: Use member initializationFriedemann Kleint2016-11-3029-224/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use C++ 11 member initialization in value-type structs. Task-number: QTBUG-51673 Change-Id: I668389b4a0ad1d862a505b740d67357cb9c2a3dc Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | | qwindowsnativeinterface.cpp: Add missing enumeration OpenVGSurfaceFriedemann Kleint2016-11-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes MinGW developer build: qwindowsnativeinterface.cpp: In member function 'virtual void* QWindowsNativeInterface::nativeResourceForWindow(const QByteArray&, QWindow*)': qwindowsnativeinterface.cpp:100:12: error: enumeration value 'OpenVGSurface' not handled in switch [-Werror=switch] switch (window->surfaceType()) { ^ cc1plus.exe: all warnings being treated as errors Amends change dafd0955c601fc00f9164f9b955ec9f28b627565. Change-Id: I43f7148281fcf47613958427e25a784f42920806 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | | Windows QPA: Use new EnableNonClientDpiScaling() for Windows decorationFriedemann Kleint2016-11-223-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use newly introduced EnableNonClientDpiScaling() function to fix the decoration having the wrong size in multimonitor setups with per-monitor DPI awareness. Task-number: QTBUG-53255 Change-Id: Ic6e2f2a92f790259107d2a0837b96177cf3adb5f Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | | | Windows QPA: Reimplement calculation of window framesFriedemann Kleint2016-11-184-28/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of relying on AdjustWindowRectEx() and dirty-handling, capture the rectangles before and after the processing of WM_NCCALCSIZE and calculate the frame from that. This allows for changing window frames by handling WM_NCCALCSIZE and monitor-dependent window frames when using High DPI scaling. Task-number: QTBUG-53255 Task-number: QTBUG-40578 Task-number: QTBUG-56591 Change-Id: If8364a5440a6324ea5d470bf5b74e68942285abe Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | | Windows QPA: Improve some debug operatorsFriedemann Kleint2016-11-152-4/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add WINDOWPOS, fix RECT and NCCALCSIZE_PARAMS to be in the Qt style. Change-Id: I0a0a960115d704cf704df85597ce0940bd8d7211 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-0226-5531/+45
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blacklist tst_QMenuBar::taskQTBUG46812_doNotLeaveMenubarHighlighted() on macOS. Conflicts: mkspecs/features/mac/default_post.prf mkspecs/features/mac/sdk.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/sdk.prf src/angle/src/libEGL/libEGL.pro src/platformsupport/fontdatabases/fontdatabases.pro src/platformsupport/platformsupport.pro src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro tests/auto/widgets/widgets/qmenubar/BLACKLIST tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp Task-number: QTBUG-56853 Change-Id: If58785210feee3550892fc7768cce90e75a2416c
| * | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-011-0/+12
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/win/msvc_version.cpp configure.pri mkspecs/macx-ios-clang/features/default_post.prf mkspecs/macx-ios-clang/features/resolve_config.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/resolve_config.prf src/corelib/io/qsettings_mac.cpp src/corelib/json/qjsondocument.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.h src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro src/plugins/platforms/ios/qiosintegration.h src/plugins/platforms/minimalegl/qminimaleglintegration.cpp tests/auto/gui/painting/qpainter/tst_qpainter.cpp tools/configure/environment.cpp Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-311-0/+12
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/minimalegl/qminimaleglintegration.cpp Change-Id: Ia6ab42a6daadbf8abc085c971545904d49ea4b56
| | | * windows: Disable OpenGL proper on Intel 945Laszlo Agocs2016-10-281-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I77fbf5bafcd6b0fe5040513ef6b0d049600f9b33 Task-number: QTBUG-40991 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | | Windows QPA: Do not use QSettings to access the registryFriedemann Kleint2016-10-282-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When commenting out the warning in createOrOpenKey() (src\corelib\io\qsettings_win.cpp:157), applications produce warnings: QSettings: Failed to create subkey "Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes": Access is denied. indicating that an attempt to open the registry in read/write mode fails. Add a utility function to read out registry strings in read-only mode to the font database and use that instead. Change-Id: I4187344cac7ec2ba27f15b51e237575efc171853 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * | | Move Windows font DB and engines to QtFontDatabaseSupportGabriel de Dietrich2016-10-2819-5516/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows creating or extending QPA plugins to provide access to QFont and related types. It concerns both GDI and DirectWrite engines, as well as the regular and the freetype based font databases. The qt.qpa.fonts logging category has been moved together into the QWindowsFontDatabase related files to avoid depending on the qwindowscontext.h header file. Finally, QwindowsNativeImage is following pending a future refactor with similar code in qpixmap_win.cpp and the Windows XP style. Change-Id: Iddff2f3d715e3ab7695e6c2052b7596a01fd6fa8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | | Plugins: optimize string usageAnton Kudryavtsev2016-10-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefer QStringRef methods to avoid allocations. Use startsWith/endsWith rather than comparing substrings; and avoid substrings where references suffice. Use new QStringList::join(QL1S). Change-Id: I46c44aca96578633370006d613eb0ac13f7cfc03 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>