summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt
Commit message (Collapse)AuthorAgeFilesLines
* Add QFont::Weight enum valuesPierre Rossi2014-12-121-25/+1
| | | | | | | | | | And try to make good use of them in order to match the QFont request more closely. Task-number: QTBUG-38482 Change-Id: I768dfa8828e370d77a1c17ecf4796d750b3edd9b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-101-4/+19
|\ | | | | | | | | | | | | | | Conflicts: doc/global/template/style/online.css mkspecs/android-g++/qmake.conf Change-Id: Ib39ea7bd42f5ae12e82a3bc59a66787a16bdfc61
| * winrt: Fix window resizev5.4.0Andrew Knight2014-12-051-4/+6
| | | | | | | | | | | | | | | | The fixed-size EGL display must be updated on PC as well as Windows Phone. Task-number: QTBUG-43112 Change-Id: I0ba90370b67e8c065843e5754579e341b647266d Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * winrt: Fix Windows Store CertificationAndrew Knight2014-12-011-0/+13
| | | | | | | | | | | | | | | | | | WinRT requires that IDXGIDevice3::Trim() is called on application suspend in order to pass Store Certification. Task-number: QTBUG-38481 Change-Id: Ia3cb5d3f6a2db8f11e4bfa4fd5c7791e18d6c36d Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* | Make more font databases report fontsAlwaysScalable()Konstantin Ritt2014-12-092-1/+7
| | | | | | | | | | | | | | | | DirectWrite and CoreText supports scaling of non-scalable fonts. Change-Id: I910c6a35e3d94c31efa9b26dd89bcb027951ac99 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-247-17/+107
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * winrt: Resize window on Windows Phone using EGLAndrew Knight2014-11-151-13/+33
| | | | | | | | | | | | | | | | | | | | To avoid duplicating code in ANGLE, we can resize the framebuffer in QPA. This potentially allows us to synchronize rendering to avoid displaying a frame which is rendered for the new geometry but is displayed with the old geometry. Change-Id: I5f3a0634628d9ea4ca73349a02e646eb043bd757 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * winrt: Blacklist certain devices from creating a depth/stencil bufferAndrew Knight2014-11-145-5/+47
| | | | | | | | | | | | | | | | | | | | | | This passes the EGLConfig created in the platform screen to the underlying context, and certain GPUs are blacklisted to be prevented from creating a configuration which does not render properly with Qt Quick. Task-number: QTBUG-42260 Change-Id: I7e1cdc33c2f5662538723c6930fad5f13b151d6f Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * WinRT: Set WindowTitle in application switcherMaurice Kalinowski2014-11-032-0/+28
| | | | | | | | | | | | | | | | Add platform backend for QWinRTWindow::setWindowTitle. Task-number: QTBUG-40736 Change-Id: I0b03c9b5977368b38ba63044b00178c3f2bb0b86 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-0/+2
|\| | | | | | | Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
| * Revert "winrt: Remove depth/stencil from the default window format"Andrew Knight2014-09-291-0/+2
| | | | | | | | | | | | | | | | | | This reverts commit 636d2e340206664a5885656c06e1ae9eb032d446. The issue was caused by a bug in ANGLE, not a lack of hardware support. Change-Id: If2a66cd023dc7f2329dc2812169042487eecd428 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-2925-470/+269
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/image/qimage.cpp src/gui/image/qppmhandler.cpp src/gui/kernel/qguiapplication.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765
| * Update license headers and add new license filesMatti Paaso2014-09-2425-467/+267
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
| * winrt: fix compiler warning on Windows PhoneJochen Seemann2014-09-231-1/+1
| | | | | | | | | | | | | | qwinrtscreen(1010): 'd': local variable is initialized but not referenced Change-Id: Ic21a9bc087d8418ad9f01b263677438a4db8f493 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
| * qpa: Make screen geometry updates (full and available geometry) atomicTor Arne Vestbø2014-09-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updating the geometry and available geometry in two steps means that QScreen will be in an inconsistent state when emitting the geometry change signal, as the available geometry has not been updated yet. Piggy-backing changes to the availableGeometry based on the virtual geometry changing does not make sense, so we now tie geometry and availableGeometry (and their size variants) to their own separate geometryChanged and availableGeometryChanged signals. Change-Id: Iee0ced642cbb91c470cb54bc507d2c0512482c13 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | WinRT: use qEnvironmentVariableIntValue()Marc Mutz2014-09-121-1/+1
|/ | | | | | | | | It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I73d548ad4e25424fc41722961f527e63632a7b56 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Fix mouse coordinates on high-DPI displaysAndrew Knight2014-09-011-3/+5
| | | | | | | The scale factor was only being applied to touch coordinates. Change-Id: I7fc2793b1514c73986a574a95478306c1eb54c5e Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: apply text color to WindowText as wellMaurice Kalinowski2014-08-231-0/+1
| | | | | | | | Otherwise some text gets rendered black, which is the default background color on Windows Phone. Change-Id: I963875879655207e881ab0199bdac98a1e4f4ea5 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Remove QPlatformScreenPageFlipper.Robin Burchell2014-08-191-1/+0
| | | | | | | | | | | | | | | | Use of this was removed from QtWayland quite a long time ago, which was the only public user of this API. Furthermore, it isn't easily possible to implement any use of this API without full control of the graphics stack (a very rare occurrence) and there is no public demonstration of this. There is ongoing research to provide a better replacement for this in the form of QPlatformHardwareCompositor. Change-Id: I80d666a5b465aa80f73fed6c44838ce7210bbd30 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* winrt: Remove depth/stencil from the default window formatAndrew Knight2014-08-191-2/+0
| | | | | | | | | | | After the last ANGLE upgrade, some hardware fails to render proper QtQuick scenes when using a depth buffer (which is present in the default window format). As the batched renderer no longer requires a depth buffer, this workaround can be safely applied. Task-number: QTBUG-40649 Change-Id: Id0f6e418aa5c6346186678728f88a6c18af5fb74 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* winrt: Fix theme paletteAndrew Knight2014-08-111-29/+73
| | | | | | | | | | | Windows Phone didn't handle the base color enums well, and ARM was getting incorrect colors due to different byte ordering. So, use the Phone-specific enums where applicable and pass in the proper char sequence for the color. Change-Id: I7ffbc383c07d2160974560110fea221a204577ea Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Fix backing store blitAndrew Knight2014-08-111-4/+4
| | | | | | | The calculation forgot to take the mirrored texture upload into account. Change-Id: Ia69c9c4b9d852d9ac652e71aaa466c5387ff5bca Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Use native file dialogAndrew Knight2014-08-097-2/+1241
| | | | | | | | | | | | | | | | | | | | | | The native Windows Runtime file picker is required to support picking of any file/folder from the system. Due to platform security restrictions, the non-native file dialog is effectively useless when outside of the application's installation or local storage directories. This adds a QPA implementation for the WinRT file picker, as well as a simple file system engine to handle files which were opened by the picker. This necessary for platform security reasons, as it is not possible to open files from arbitrary paths - only file handles opened by the picker can be used, so these are kept inside this file system engine and acted upon when a known path is observed. The file system engine is only instantiated when needed, and may prove useful for other areas of Qt (such as known folders/standard paths) which must operate on a virtual file rather than an absolute path. Task-number: QTBUG-37748 Change-Id: Ia4fd6c5065ac92101ce34adcb6c9026fbcff56df Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* winrt: Refactor backing storeAndrew Knight2014-08-074-326/+82
| | | | | | | | | | Thanks to new features in ANGLE, the backing store implementation complexity can be greatly reduced. By using ES3 framebuffer blit, no shader code is required, and the shader loading code and blit shader can be removed. Change-Id: Iab3d915e279ad6468a75ef6257794f12acd8cb65 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Fix orientation update maskAndrew Knight2014-08-052-14/+5
| | | | | | | | | | | | | | | | | On WP8.0, setting auto rotation preferences at runtime worked like an orientation update mask, and did not modify the behavior of the window. With WP8.1, setting auto rotation preferences has the side effect that the compositor will then resize the window when moving from e.g. portrait to landscape. Because of this, the auto rotation API should not be called inside orientationUpdateMask(). The default implementation is now sufficient, so the platform override is removed. Developers looking to set auto rotation preferences should use the application manifest or call the native api directly. Task-number: QTBUG-35953 Change-Id: I90cf4290ced34df1bb350cb6aa5deff209622865 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Fix EGL context getProcAddress()Andrew Knight2014-08-052-0/+157
| | | | | | | | As ANGLE doesn't resolve non-extension functions, these need to be resolved manually. Change-Id: I0fe45005f662f7d7f2b53c09ef129efd65fb999a Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: Fix physical size of screenJochen Seemann2014-08-051-1/+11
| | | | | | | | | | | | | | Currently, the physical size of the screen is calculated with the logicalSize and the logicalDpi of the screen. This doesn't work because logicalDpi has a user-defined multiplier and a strange value. The easiest and accuratest way is to take the raw dpi of the axis and the raw pixel size (logicalSize*scaleFactor). This all is needed for a correct value of Screen.pixelDensity in QtQuick. Change-Id: I8be0139d762364140043c3fa0d203298ca7ef293 Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* winrt: Use physical window resolutionAndrew Knight2014-08-052-42/+36
| | | | | | | | | | | | | | This partially reverts eea02ff1 in that devicePixelRatio() will now always return 1. This is because non-integer ratios are bound to cause problems with pixel alignments, and their use prevents users from accessing the complete pixel grid in Qt Quick. Now, the full physical resolution of the screen/window is reported instead. The EGL initialization is adjusted to match requirements for ANGLE 2.1. Change-Id: I24c6dcf4419f30e5e4c73c592beb446a418a0b8b Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* winrt: Clean up platform message dialog helperAndrew Knight2014-07-105-221/+259
| | | | | | | | | | | | | | | | | | | | - Remove "Platform" from class name for consistency - Use ComPtr and HRESULT checking where missing - Use UICommand ID class to reduce callback complexity - Use dialog completed callback to fix failed repeated dialog opening These changes have been tested with the QtQuick.Dialogs message dialog example, and all features appear to be working. Note that the WinRT dialog supports a maximum of three buttons, though, and a warning is printed if this number is exceeded. Similarly to Android, the native hooks can be now be disabled by using qputenv("QT_USE_WINRT_NATIVE_DIALOGS", "0"). Task-number: QTBUG-38115 Task-number: QTBUG-39868 Change-Id: I9943c7c11bd640790db68219cefdca1a680e96ec Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* winrt: Introduce theme paletteAndrew Knight2014-07-102-0/+77
| | | | | | | | | Use the colors returned by WinRT's UISettings class to construct the system palette. Change-Id: Id0d99c7b2e3df209de0755ee72a0d2bda67fda8c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
* winrt: Clean up platform themeAndrew Knight2014-07-105-117/+151
| | | | | | | | | | - Drop "Platform" from class name for consistency - Move styleHint() into theme class for better code reuse - Use ComPtr and result checking - Remove obsolete WinRT ifdefs Change-Id: Id26bd75739a9665f61ee2e70eb3fb36747b75410 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* winrt: Clean up QWinRTScreenAndrew Knight2014-06-253-337/+312
| | | | | | | | | | | - Remove WP8.0 code paths - Remove WinRT types from header as much as possible - Use ComPtr where appropriate - Use COM convenience methods Task-number: QTBUG-38115 Change-Id: Ib241c3e5107add255a48340f86ee5885f895ff83 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Clean up QWinRTServicesAndrew Knight2014-06-252-81/+68
| | | | | | | | | | - Remove WinRT types from the header - Use ComPtr everywhere - Use convenience methods for HRESULT and async operations Task-number: QTBUG-38115 Change-Id: I540a3349612b98c45545c92b2cb6d21a34918b8f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Clean up QWinRTCursorAndrew Knight2014-06-253-44/+42
| | | | | | | | | | - Remove WinRT types from the header - Remove WP8.0 code paths - Use convenience methods for HRESULT handling Task-number: QTBUG-38115 Change-Id: I05e77d75a7975a783d0f0714e6bab014231a406c Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* remove HSTRING instancesMaurice Kalinowski2014-06-032-9/+13
| | | | | | | | | | | HSTRING needs to be released or handles will be leaked. Instead use HString which takes care of resource management on its own. Task-Number: QTBUG-38115 Change-Id: I2c767776c1f22f45acd8dd77b693f30d63d894b9 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: Fix compile warningsMaurice Kalinowski2014-05-263-0/+6
| | | | | Change-Id: If223dd73b9558a0f5144be38f19a61316f8c807b Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: fix default font when DirectWrite is disabledAndrew Knight2014-05-232-2/+9
| | | | | | | | Instead of loading the default font "Helvetica", which is likely not part of the package, load the first font found. Change-Id: I225979986883a26c3fec72858cf32c3d1e45d902 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: Support High-DPIAndrew Knight2014-05-226-38/+171
| | | | | | | | | | | | | | | | | Previously, the backing store and default framebuffer were created with the logical screen resolution (in device-independent pixels), not the the physical screen resolution. This lead to blurry text on high-DPI devices. This change fixes this by creating those at full size, and setting the device pixel ratio appropriately. Windows are still reported in device-independent pixels, but text and images are now rendered sharply for Qt Quick applications. As QPainter does not support non-integer scaling, the backing store is still drawn in DIPs and scaled by OpenGL. Task-number: QTBUG-38464 Change-Id: I7377d4c734126825d670b8ebb65fd0dd1ef705f2 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Support Windows Phone 8.1 in WinRT QPAAndrew Knight2014-05-225-18/+69
| | | | | | | | | | - Unsupported code paths for WP8.0 are avoided, and new APIs are used where appropriate (virtual keyboard) - DirectWrite fonts are loaded on WP8.1 - Platform dialogs are used on WP8.1 Change-Id: I721006ac943ad4e248f0f1590ce247a03e40fbc0 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-122-59/+31
|\ | | | | | | Change-Id: I9300572e2b74f0564b2589cbd0fbdf24850f68df
| * WinRT: Fix multi-touch on PCAndrew Knight2014-05-052-59/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pointer ID was incorrectly interpreted as a device ID, which caused creating a new QTouchDevice for each touch update and potential crashes in QtQuick. The handling has now been simplified and aligned with Windows Phone, treating all touch events as if they originate from the same device. Given that the native device has no ID, it is not possible to track the native device between events anyway (even the pointer values change). Task-number: QTBUG-38745 Change-Id: I24b6c00b765dcb49cd653638afafc04fdd80f774 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* | WinRT: set orientation update mask to native orientation by defaultAndrew Knight2014-05-051-0/+1
|/ | | | | | | | This aligns with the other mobile platforms. Task-number: QTBUG-38691 Change-Id: I7b9b70a1182c0e53f997cae111ec46b5161b0b48 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* deprecate import_qpa_plugin and qpa_minimal_pluginOswald Buddenhagen2014-04-241-0/+1
| | | | | | | | they have been fully superseded by 4255ba40ab073afcf2a095b135883612859af4c2. Change-Id: If7ac14c8b7d3cf00fb0cb916036b62eb86c9cee0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* WinRT: Handle back button as press or releaseAndrew Knight2014-04-221-6/+4
| | | | | | | | | | | | Earlier, only the back press was checked for acceptance. By also checking the release event, this makes the backstepping behavior consistent with Qt for Android, and fixes the expected behavior found in our demo applications. Task-number: QTBUG-35951 Change-Id: I9c2f18816b838d57713ba4dd3624e2f3f1ac40ac Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Disable non-fullscreen windows for WinRTMaurice Kalinowski2014-03-271-0/+2
| | | | | | | | | | The integration seems to have been missing this flag. Hence we tried to open new windows in non-fullscreen mode causing lots of issues. For instance this resolves QCombobox popup problems. Task-number: QTBUG-37593 Change-Id: I3d3e3699dff91dcb95613893c2a5bdefc90131b7 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* WinRT: Use registerFontFamily to reduce font registration overheadAndrew Knight2014-03-272-152/+182
| | | | | | | | Adopt to the new lazy font loading strategy in order to reduce memory and startup time associated with populating the entire font database. Change-Id: I0134cc123f73cb8485fe85c4a6b8e3b3a3a2cab0 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinPhone: Install DejaVu ttf fonts into QtOliver Wolff2014-03-251-0/+9
| | | | | | | | | As these fonts are deployed as part of the package for WinPhone projects by default they have to be installed in order to be available in the packages. Change-Id: Iaaca7b7db0525f06d3e1716d5a337550ffb1dea9 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* WinRT: Fix QDesktopServices::openUrl() for local filesAndrew Knight2014-03-181-2/+1
| | | | | | | | | | The passed-in URL is expected to be a file-scheme URL to be converted to a QString using toLocalFile(), not a relative path to be prepended with the application directory. Change-Id: I647f351c99f0df66ef017936585f044292c16aff Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: Load system fonts using DirectWriteAndrew Knight2014-03-183-1/+337
| | | | | | | | | | | | | | System-installed TrueType fonts can be read into memory and loaded into the FreeType font engine. This allows the application to be packaged without fonts, but does not work on Windows Phone where DirectWrite is not supported. Every single-file TrueType font is registered with the font database, and then loaded into memory at the point that the font is actually used. Task-number: QTBUG-37230 Change-Id: I804116e37a874cd146a0653ba4cc018f8b1cd6a4 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: Separate backing store initialization to be more robustAndrew Knight2014-03-142-5/+29
| | | | | | | | | | | | | | If the GL context cannot be made current in the backing store's constructor, the framebuffer resources won't be allocated. Fix this by creating an initialization routine that can be called again if it fails. The issue was revealed by the GUI Analog Clock demo, which creates the backing store before the window has a native handle. Task-number: QTBUG-36008 Change-Id: I875f8183eff60908fc2b46f441bb553b42ff500d Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>