summaryrefslogtreecommitdiffstats
path: root/tests/manual
Commit message (Collapse)AuthorAgeFilesLines
* Baseline: Move the paintcommands code into the shared directoryVolker Hilsheimer2022-01-201-2/+2
| | | | | | | | | It's used by the lancebench and the lance tool, and it will probably be useful for writing some high-dpi related unit and baseline test cases, so move it to the shared folder. Change-Id: I969bab51c9504be13b4c192b4f29f69cd9102868 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* rhi: Add the basic infrastructure for tessellation supportLaszlo Agocs2022-01-1312-0/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...but this will only be supported with Vulkan and OpenGL 4.0+ and OpenGL ES 3.2+ for the time being. Taking the Vulkan model as our standard, the situation is the following: - Vulkan is ok, qsb secretly accepts .tesc and .tese files as input already (plus QShader already has the necessary plumbing when it comes to enums and such) To switch the tessellation domain origin to bottom left we require Vulkan 1.1 (don't bother with VK_KHR_maintenance2 on top of 1.0 at this point since 1.1 or 1.2 implementations should be common by now). The change is essential to allow the same evaluation shader to work with both OpenGL and Vulkan: this way we can use the same shader source, declaring the tessellation winding order as CCW, with both APIs. - OpenGL 4.0 and OpenGL ES 3.2 (or ES 3.1 with the Android extension pack, but we won't bother with checking that for now) can be made working without much complications, though we need to be careful when it comes to gathering and setting uniforms so that we do not leave the new tessellation stages out. We will stick to the Vulkan model in the sense that the inner and outer tessellation levels must be specified from the control shader, and cannot be specified from the host side, even though OpenGL would allow this. (basically the same story as with point size in vertex shaders) - D3D11 would be no problem API-wise, and we could likely implement the support for hull and domain shader stages in the backend, but SPIRV-Cross does not support translating tessellation shaders to HLSL. Attempting to feed in a .tesc or .tese file to qsb with --hlsl specified will always fail. One issue here is how hull shaders are structured, with the patchconstantfunc attribute specifying a separate function computing the patch constant data. With GLSL there is a single entry point in the tessellation control shader, which then performs both the calculations on the control points as well as the constant data (such as, the inner and outer tessellation factors). One option here is to inject handwritten HLSL shaders in the .qsb files using qsb's replace (-r) mode, but this is not exactly a viable universal solution. - Metal uses a different tessellation pipeline involving compute shaders. This needs more investigation but probably not something we can prioritize in practice. SPIRV-Cross does support this, generating a compute shader for control and a (post-)vertex shader for evaluation, presumably in order to enable MoltenVK to function when it comes to tessellation, but it is not clear yet how usable this is for us. Change-Id: Ic953c63850bda5bc912c7ac354425041b43157ef Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: Add queries for vertex input/output limitsLaszlo Agocs2022-01-121-0/+2
| | | | | | | | | | Mainly because we do have legacy code in the Qt 5 graphical effects that tries to dynamically determine the max number of varyings. Make it easier to port such code. Change-Id: I846cab2c2fe7b4cd473b5ced0146ca36f1c8169b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* xcb: Correctly update primary screen status with RandR 1.5Zhang Hao2022-01-121-1/+34
| | | | | | | | | | This amends d8f37d94e537aaab4fa960b80aacabe79bcc14c4 . Fixes: QTBUG-99605 Pick-to: 6.3 Done-with: Liang Qi <liang.qi@qt.io> Change-Id: Ia4cf67d6ebeed36596c0342302aa0b4af01769bc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: add secondary thread exec manual testMorten Johan Sørvig2022-01-055-0/+132
| | | | | | Pick-to: 6.3 Change-Id: Id16cddd703682d325d77ad597996960a8f521d1c Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* rhi: Drop the profiler for nowLaszlo Agocs2022-01-047-765/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | The system we inherited from the original Qt 5.14 introduction of QRhi is a text stream based solution where resource creation and frame timings are sent in a comma-separated format to a QIODevice. This, while useful to get insights about the number of resources at a given time, is not actively helpful. The frameworks built on top (Qt Quick, Qt Quick 3D) are expected to provide solutions for logging timings in a different way (e.g. via the QML Profiler). Similarly, tracking active resources and generating statistics from that is better handled on a higher level. The unique bits, such as the Vulkan memory allocator statistics and the GPU frame timestamps, are converted into APIs in QRhi. This way a user of QRhi can query it at any time and do whatever it sees fit with the data. When it comes to the GPU timestamps, that has a somewhat limited value due to the heavy asynchronousness, hence the callback based API. Nonetheless, this is still useful since it is the only means of reporting some frame timing data (an approx. elapsed milliseconds for a frame) from the GPU side. Change-Id: I67cd58b81aaa7e343c11731f9aa5b4804c2a1823 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* wasm: add rasterwindow manual testMorten Johan Sørvig2021-12-156-0/+383
| | | | | | | Simplest possible graphical app, with event logging. Change-Id: I6b1eb88c270a190becb23cc63d6d755ffbafcf52 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Tests: Use REQUIRED COMPONENTS in find_package(Qt6...)Kai Köhne2021-12-133-9/+3
| | | | | | | | | Make sure configure fails early if a component cannot be found. Task-number: QTBUG-98867 Pick-to: 6.2 6.3 Change-Id: I4baa35a84342df58ce8932601fb602be92ed5ab9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* wasm: improve clipboard supportLorn Potter2021-12-0810-0/+745
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for Clipboard API Add clipboard manual test Also includes these fixes: - improve clipboard use for chrome browser - make QClipboard::setText work - html copy and paste - image copy/paste Chrome browser supports text, html and png To use the Clipboard API, apps need to be served from a secure context (https). There is a fallback in the case of non secure context (http) - Firefox requires dom.events.asyncClipboard.read, dom.events.asyncClipboard.clipboardItem and dom.events.asyncClipboard.dataTransfer to be set from about:config, in order to support the Clipboard API. Change-Id: Ie4cb1bbb1dfc77e9655090a30967632780d15dd9 Fixes: QTBUG-74504 Fixes: QTBUG-93619 Fixes: QTBUG-79365 Fixes: QTBUG-86169 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Rename and restructure the baseline (lancelot) testing codeEirik Aavitsland2021-11-162-33/+33
| | | | | | | | | | | | | | | | | | | | In preparation for addition of new baseline tests, establish a new test category, "baseline". This is similar to the category "benchmarks" in that it contains tests that use the QTest framework, but conceptually are not unit tests, in contrast to those under auto/. Move the existing QPainter baseline test, tst_lancelot, into this new category, and rename it accordingly. Baseline tests use the QBaselineTest extension to QTest. Move that extension too into the tests/baseline directory, allowing the clean out of the baselineserver directory. Pick-to: 6.2 Change-Id: I1b527f5867c953b1d22be73798fcf7d1494712ea Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* rhi: Expose the maximum uniform buffer range limitLaszlo Agocs2021-11-101-0/+2
| | | | | | | | Pick-to: 6.2 Task-number: QTBUG-97715 Change-Id: I7f0a52c410b9b77f735fb3b7fd33141674bb0cda Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QNI manual test: Remove unnecessary capturing and wrappingMårten Nordheim2021-11-042-4/+4
| | | | | | | | | | | | No need to capture anything by reference, it's a leftover from when the MainWindow was changed from inside the lambda. And no need to wrap the argument to QLatin1String.arg() with QStringView explicitly. This change is made just for brevity and consistency. Change-Id: Ib8c163bcf5932d35a9d43dd8ce124588c539d5a4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QNI: Add API to check if connection is meteredMårten Nordheim2021-11-042-2/+18
| | | | | | | | | | | | | This may be a useful factor in deciding whether or not you should perform communications over the network which are not purely essential. For example, if you have a logging mechanism you can delay uploading them until you are no longer on a metered network. Task-number: QTBUG-91024 Change-Id: I19d32f031a3893512dc440914133678004987fb1 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* wasm: add asyncify manual testMorten Johan Sørvig2021-11-043-0/+85
| | | | | | | | Add simple QtCore-based test case which spins a nested event loop. Change-Id: Ia3a4ef76d561d0554faffcac8d36ae5dda2c6c53 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* rhi: Add texture array supportLaszlo Agocs2021-10-299-2/+278
| | | | | | | | | | | | | | Arrays of textures have always been supported, but we will encounter cases when we need to work with texture array objects as well. Note that currently it is not possible to expose only a slice of the array to the shader, because there is no dedicated API in the SRB, and thus the same SRV/UAV (or equivalent) is used always, capturing all elements in the array. Therefore in the shader the last component of P in texture() is in range 0..array_size-1. Change-Id: I5a032ed016aeefbbcd743d5bfb9fbc49ba00a1fa Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QNI: Add a convenience method for loading the default pluginMårten Nordheim2021-10-221-3/+2
| | | | | | | | | We have some official plugins, we may as well treat them as default and give a convenient function which loads those. Change-Id: I6251c77ac042b795bcf24b86e510e960ee4bab54 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNI: Add supportedFeatures getterMårten Nordheim2021-10-221-0/+1
| | | | | | | Which just returns all the supported features Change-Id: I8c3996b00a6ebb114bdbc9db3085a0e27fc8fa79 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNI: Update the manual test 'transportMedium' namingMårten Nordheim2021-10-072-13/+13
| | | | | | | | | I staged the manual test a little too soon, forgetting it's not compiled in CI Change-Id: Iaae8b8caaf8433c45e66ff662bb9bb7b25a3b8bd Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add manual test for window activationPaul Olav Tvete2021-09-302-0/+156
| | | | | | | | | | | This is a manual test of QWindow::requestActivate() and how it interacts with implicit activation from the window system. Written in order to test QtWayland, but hopefully also useful for testing on other platforms. Task-number: QTBUG-91542 Change-Id: Id18dc6d146d213a7c730cff343d9fc25f6c42514 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Add transport info to the QNetworkInformation manual testMårten Nordheim2021-09-292-3/+21
| | | | | | | | Task-number: QTBUG-91023 Change-Id: I0015bc18b0f5c7faf5826a46ee880add09a7b244 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Refactor QNetworkInformation manual testMårten Nordheim2021-09-293-59/+101
| | | | | | | | | To make it a little cleaner Task-number: QTBUG-91023 Change-Id: Ib99cc722b47835d13707beeeea35573729e4b032 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove fatuously true or false QT_VERSION checksEdward Welbourne2021-09-2325-398/+65
| | | | | | | | | QT_VERSION is now at least QT_VERSION_CHECK(6, 3, 0), so remove all checks against Qt 6.0.0 or earlier. They are superfluous. Tidied up in some places in the process, particularly #include order. Change-Id: I2636b2fd13be5b976f5b043ef2f8cddc038a72a4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Bump almost all cmake_minimum_required calls to 3.16Alexandru Croitor2021-09-223-3/+3
| | | | | | | | | | | | Needed for subsequent change that will check and error out if the version is lower than 3.16. We do that to ensure all policies introduced by CMake up to version 3.16 have their behavior set to NEW. Pick-to: 6.2 Task-number: QTBUG-95018 Change-Id: Ieaf82c10987dd797d86a3fd4a986a67e72de486a Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* tests/xcb: add a test for screen off and onLiang Qi2021-09-181-0/+36
| | | | | | Task-number: QTBUG-96247 Change-Id: I1fd6f21ad914480b7e8d07227ee80184e305276a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tests/xcb: move xrandr process call to a functionLiang Qi2021-09-181-26/+25
| | | | | Change-Id: I4dab0a878a93fa2c3d0af80883b8e2198c72633c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Don't let windowstates manual test eat log messagesTor Arne Vestbø2021-09-151-10/+6
| | | | | | | | | | | | Having logging in the test's log widget is nice, but we don't want to silence the normal logging, as that might confuse someone who expects to see normal log messages, not knowing there's a dedicated log widget in the test. Pick-to: 6.2 Change-Id: I7828f740cfb8cc2eae8da98b9b8facd4a57fa37b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* xcb: add manual test for xrandr scaleLiang Qi2021-09-021-3/+70
| | | | | | | | This amends 9a4c98e55659b32db984612e6247ac193812a502. Change-Id: Ief86d141efa8f87d624c6ba935cb4d9c0b2ead0f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* xcb: support xrandr(1.5) monitor setupLiang Qi2021-09-015-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | More information about monitor in xrandr 1.5, see https://keithp.com/blogs/MST-monitors/ Since this change, screen is logical instead of physical. If xrandr 1.5 and later is installed, Qt screen info will get from xrandr monitor object instead of xrandr output if only have 1.2 to 1.4. Users can manipulate monitor as they want, for example, a combination for two physical screens, half of one screen and etc. Didn't have chance to access MST monitors, but it should work if xrandr monitor object was created automatically. [ChangeLog][xcb] Qt screen info will get from xrandr monitor object if 1.5 is installed. Fixes: QTBUG-65457 Change-Id: Iad339cc0d4293b2403b4ef6bf6eb770feb3e685f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* wasm: add manual tests for main() and exec()Morten Johan Sørvig2021-08-2710-0/+367
| | | | | | | | | Add minimal examples which demonstrates how exec() works on Qt for WebAssembly and how to implement main() without calling QApplication::exec(). Change-Id: I44f1d16af19c538380cc56faf3f0f4cc9d66cf11 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Add debug keyboard layout for manual testingTor Arne Vestbø2021-08-232-0/+1446
| | | | | | Pick-to: 6.2 Change-Id: Ie35f7a57c6d54c1cc0a7b79d8fd25d0b056bf5e6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* wasm: add cmake build for manual testsMorten Johan Sørvig2021-08-194-0/+37
| | | | | | | The tests can now be built with qt-cmake-standalone-test. Change-Id: I098340a9f755806061de281fbc25cb00c61f33f0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QNetworkInformation: Give the manual test a GUIMårten Nordheim2021-07-132-2/+76
| | | | | | | | For mobile platforms. Makes it quite a bit easier to follow on the updates when I'm not tethered to my PC with ADB. Change-Id: Icba03470e6082b6e47e31c9ead6df074407d3172 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* tests: update startsystemmove manual test with latest apiLiang Qi2021-06-161-3/+6
| | | | | Change-Id: Ib9a070f7878fa67b7db1e26c8ebbbb54873cb645 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QNetworkInformation: Adjustments to captive portal APIMårten Nordheim2021-06-081-3/+3
| | | | | | | | | | | | | | | Make it return bool since the TriState was really only used signify that the property was unsupported but there is already a separate way to check if it's supported. More importantly there is no different set of actions available to a user if they're in the Unknown or False state. Because of the change to bool, we also rename the property to have an 'is'-prefix. Change-Id: Iaaaad5ac31e663c36e00223bf5b0e719f412fc69 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QNetworkInformation: Behind captive portalMårten Nordheim2021-05-311-1/+7
| | | | | | | | | This patch adds the API, with no supporting backends Task-number: QTBUG-93848 Change-Id: I50454717f928819e1b990df91872675e842f9987 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* rhi: Add support for 3D texturesLaszlo Agocs2021-05-3112-1/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Supported on OpenGL (and ES) 3.0+ and everywhere else. Can also be a render target, targeting a single slice at a time. Can be mipmapped, cannot be multisample. Reading back a given slice from a 3D texture is left as a future exercise, for now it is documented to be not supported. Upload is going to be limited to one slice in one upload entry, just like we specify one face or one miplevel for cubemap and mipmapped textures. This also involves some welcome hardening of how texture subresources are described internally: as we no longer can count on a layer index between 0..5 (as is the case with cubemaps), simply arrays with MAX_LAYER==6 are no longer sufficient. Switch to sufficiently dynamic data structures where applicable. On Vulkan rendering to a slice needs Vulkan 1.1 (and 1.1 enabled on the VkInstance). Task-number: QTBUG-89703 Change-Id: Ide6c20124ec9201d94ffc339dd479cd1ece777b0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* vulkan: Update legacy tests and examples to the modern validation layerLaszlo Agocs2021-05-311-3/+3
| | | | | | Fixes: QTBUG-88388 Change-Id: Ib072f203ada5d692dea8d35da2b24db0deac0297 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: manual tests: Switch to VK_LAYER_KHRONOS_validationLaszlo Agocs2021-05-315-60/+5
| | | | | | Task-number: QTBUG-88388 Change-Id: Ia6d7caf0357b017625d3245a72d21a3023d81035 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix BASE argument of qt_add_resourcesJoerg Bornemann2021-05-181-117/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BASE argument of qt_add_resources now denotes the root point of the alias of the file. Before, BASE was merely prepended to every file that got passed to qt_add_resources. Old behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "images/button.png") Alias is "../shared/images/button.png", and pro2cmake generated QT_RESOURCE_ALIAS assignments to fix this. New behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "../shared/images/button.png") The alias is "images/button.png". No extra QT_RESOURCE_ALIAS assignment is needed. The new behavior is in effect for user projects and for Qt repositories that define QT_USE_FIXED_QT_ADD_RESOURCE_BASE. Qt repositories will be ported one by one to this new behavior. Then the old code path can be removed. Pick-to: 6.1 Task-number: QTBUG-86726 Change-Id: Ib895edd4df8e97b54badadd9a1c34408beff131f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Rejig native interface plumbingTor Arne Vestbø2021-05-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial approach for providing public access to native interfaces via T::nativeInteface<I>() was based on the template not being defined, and then having explicit instantiations of the supported types in a source file, so that the accessors were exported and available to the user. This worked fine for "simple" types such as QOpenGLContext and QOffscreenSurface, but presented a problem in the context of classes with subclasses, such as Q{Core,Gui}Application. To ensure that a native interface for QCoreApplication was accessible both from QCoreApplication and its subclasses, while at the same time preventing a native interface for QGuiApplication to be accessible for QCoreApplication, the nativeInterface() template function had to be declared in each subclass. Which in turn meant specializing each native interface once for each subclass it was available in. This quickly became tedious to manage, and the requirements for exposing a new native interface wasn't very clear with all these template specializations and explicit instantiations spread around. To improve on this situation, while also squashing a few other birds at the same time, we change the approach to use type erasure. The definition of T::nativeInteface<I>() is now inline, passing on the requested interface to a per type (T, not I) helper function, with the interface type flattened to a std::type_info. The type_info requested by the user is then compared to the available types in a single per-type (T) "switch statement", which is a lot easier to follow for someone trying to trace the logic of how a native interface is resolved. We can safely rely on type_info being stable between the user application and the Qt library as a result of exporting the type info for each native interface, by explicitly ensuring they have a key function. This is the same mechanism that ensures we can safely dynamic_cast these interfaces, even across library boundaries. The use of a free standing templated helper function instead of a member function in the type T, is to avoid shadowing issues, and to not pollute the class namespace of T with the helper function. Since we are already changing the plumbing for how a user resolves a native interface for a type T, we take the opportunity to add a few extra safeguards to the machinery. First, we add a static assert in the T::nativeInteface<I>() definition, that ensures that only compatible interfaces, as declared by the interface themselves, are allowed. This ensures a compile time error when an incompatible interface is requested, which improves on the link time errors we had prior to this patch, and also offsets the one downside of type erasure, namely that errors are only caught at runtime. Secondly, each interface meant for public consumption through T::nativeInteface<I>() is declared with a revision, which is checked when requesting the interface. This allows us to bump the revision when we make breaking changes to the interface that would have otherwise been binary incompatible. Since the user will never see this interface due to the revision check, they will not end up calling methods that have been removed or renamed. One advantage of moving to a type-erased approach for the plumbing is that we're not longer exposing the native interface types as part of the T::nativeInteface symbols. This means that if we ever want to rename a native interface, the only exported symbol that the user code relies on is the type info. Renaming is then possible by just exporting the type info for the old interface, but leaving it empty. Since no class in Qt implements the old native interface, the user will just get a nullptr back, similarly to bumping the revision of an interface. Change-Id: Ie50d8fb536aafe2836370caacb22afbcfaf1712a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Lowercase system includes and lib names for Windows, fix cross compilingMartin Storsjö2021-04-232-2/+2
| | | | | | | | | | | | | | | When cross compiling from a case sensitive file system, casing matters, and mingw headers and import libraries consistently use lowercase. This was uncovered by d385158d5213ef568b7629e2aa4a818016bbffac; prior to that, the schannel TLS plugin didn't end up built (at least when cross compiling). Fix other similar cases that can be found by grepping the repo. Change-Id: Ia696e17b7aaa979d7b7f5b0801383f338a8b585b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add ScreenGadget utilityMorten Johan Sørvig2021-04-193-0/+266
| | | | | | | | | | | | ScreenGadget visualizes virtual desktop screen layout, in device independent and native pixels. This can be used to debug the (sometimes surprising) device independent screen geometry resulting from Qt applying a scale factor. Change-Id: I5b18e0fc9a54ba3e14d648794429b2eeadd25748 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Update DprGadadgetMorten Johan Sørvig2021-04-192-34/+128
| | | | | | | | | | Display active environment variables. Reorder the labels with device independent values to the left and native values to the right. Display the Qt scale factor. Change-Id: If95c252b06eff5abd91a25847777246effe94be2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Add the "Territory" enumerated type for QLocaleJiDe Zhang2021-04-154-12/+12
| | | | | | | | | | | | | | | | | | | The use of "Country" is misleading as some entries in the enumeration are not countries (eg, HongKong), for all that most are. The Unicode Consortium's Common Locale Data Repository (CLDR, from which QLocale's data is taken) calls these territories, so introduce territory-based names and prepare to deprecate the country-based ones in due course. [ChangeLog][QtCore][QLocale] QLocale now has Territory as an alias for its Country enumeration, and associated territory-based names to match its country-named methods, to better match the usage in relevant standards. The country-based names shall in due course be deprecated in favor of the territory-based names. Fixes: QTBUG-91686 Change-Id: Ia1ae1ad7323867016186fb775c9600cd5113aa42 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* lance tool: fix build for Qt 6Eirik Aavitsland2021-03-223-8/+8
| | | | | | Pick-to: 6.1 Change-Id: I639ffa60609b1e6036252cccc146dd98fded0b3e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Switch QNetworkInformation manual test back to using qDebugMårten Nordheim2021-02-071-17/+8
| | | | | | | | | | | | It turns out QTextStream on Android isn't as easily visible as it is when going through qDebug (where it can easily be seen with `adb logcat -v brief libqnetworkinformation_<arch>.so:* -s`) Change-Id: I3b495d7a3d331fda6cfe602c461107dd1d0b3faf Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 677797929d8080199990d741773832f80a654265) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove QNetworkStatusMonitorMårten Nordheim2021-02-061-52/+13
| | | | | | | | | | Since the old code is now fully integrated in QNetworkInformation backends Change-Id: Ia843d17bb3c98333e8d68752e25722b5860f48e0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 7860b9e6ffece207d054ac0c321bc3c5b983708f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* NetworkListManager based backend for QNetworkInformationMårten Nordheim2021-02-023-0/+72
| | | | | | | | | | For Windows. Based on the code I wrote for QNetworkStatusMonitor. It also renames the netlistmgr feature, avoiding the abbreviation. Locally my MinGW fails the networklistmanager feature test so it may not be supported on MinGW, likely leaving it without a backend at all. Change-Id: I13bbe4127edc2a9c0bb91602c95f1cb206a85a69 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* rhi: Pipeline cache load/saveLaszlo Agocs2021-01-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add QRhi APIs to retrieve and reload the contents of the "pipeline cache". The only API where there is a true pipeline cache is object is Vulkan (VkPipelineCache). For OpenGL, the other backend where we support this, it is simulated with program binaries. The Qt 5 style OpenGL program binary disk cache continues to work like before, but one has now the option to do things in a more modern, graphics API agnostic way, that leads to generating a single blob instead of a large set of files in some system location, allowing easier "pre-baking" of the cache content. It is expected that Qt Quick exposes the two new functions in form if QSG_RHI_ environment variables, thus allowing easy testing and cache file generation. As an example for the performance improvements this can give, consider Vulkan, where we do not have any existing persistent caching mechanism in place: Running BenchmarkDemoQt6.exe --scene flythrough --mode demo creates 18 QRhiGraphicsPipeline objects from Qt Quick and Qt Quick 3D. The total time spent in QRhiGraphicsPipeline::create() during application startup for these 18 pipelines is 35-40 ms on a given Windows (NVIDIA) system. When exporting the pipeline cache contents to a file, and then, in a subsequent run, reloading the cache contents, this is reduced to 5-7 ms on the same system, meaning we get a 6-7x improvement. The generated data is always specific to a given Qt version, RHI backend, graphics device, and driver version. Much of the implementation consists of adding and verifying the appropriate header to the blobs retrieved from the driver, to allow gracefully ignoring data that was generated with a device or driver that differs from the one used at run time. This should provide robustness, even if the Vulkan or OpenGL implementation is for some reason not prepared to identity and reject incompatible cache/program blobs. Fixes: QTBUG-90398 Change-Id: I67b197f393562434f372c7b7377f638abab85cb3 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: Stop hardcoding the Vulkan backend's desired instance extensionsLaszlo Agocs2021-01-182-3/+2
| | | | | | | | | Instead, have a static function in QRhiVulkanInitParams then Qt Quick and anyone else who creates a QVulkanInstance that is then used in combination with QRhi can query. Change-Id: I046e0d84541fc00f5487a7527c97be262221527f Reviewed-by: Andy Nichols <andy.nichols@qt.io>