summaryrefslogtreecommitdiffstats
path: root/tests/manual
Commit message (Collapse)AuthorAgeFilesLines
* Examples: move widgets/codeeditor into manual testsVolker Hilsheimer7 hours6-0/+438
| | | | | | | | | | | | | It's not a very well written example, using (largely unneed) hacks to implement what it does. It's also misleading - the syntaxhighlighter example is a better showcase for building a useful code editor. Move it to manual tests. Fixes: QTBUG-111025 Pick-to: 6.5 Change-Id: I405d41688235bf3e9a08373e716769f26d02fec6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Move findfiles example into manual testsVolker Hilsheimer7 hours6-0/+644
| | | | | | | | | | | | | | | | | | | | The example follows bad and outdated practices: - running time consuming and I/O heavy workload in the GUI thread - calling processEvents to keep the UI responsive - showing results only at the end of a search rather than continuously Perhaps this example can be rewritten at some point to apply modern practices (at least use a thread and emit signals), but it seems to have low overall educational value. Moving it to be a manual test for now. Fixes: QTBUG-111002 Pick-to: 6.5 Change-Id: Id630fd4599096448ea4f96bcbf977b11a039796f Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Resurrect wiggly example as a manual testPaul Olav Tvete22 hours7-0/+208
| | | | | | | | | In addition to being an iconic part of Qt's history, wiggly is also widely used for verifying on embedded hardware. Change-Id: Ica86626d98ade2570eebe787860293380c21f96a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* rhi: Add D3D12 supportLaszlo Agocs42 hours6-11/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The optional nice-to-haves DebugMarkers, Timestamps, PipelineCache are not yet implemented (features reported as false, to be implemented later, although buffer/texture resource name setting already works as-is, regardless of DebugMarkers). - Mipmap generation for 3D textures is missing. Won't matter much given that 3D textures are not used in Qt for anything atm. For generating mipmaps for 2D (or 2D array) textures, the MiniEngine compute shader and approach is used. 3D support for the mipmap generator may be added later. 1D textures / arrays are supported except for mipmap generation, and so the OneDimensionalTextureMipmaps feature is reported as false. - Qt Quick and Qt Quick 3D are expected to be fully functional. (unforeseen issues are not impossible, of course) - Uses minimum feature level 11.0 when requesting the device. It is expected to be functional on resource binding tier 1 hardware even, although this has not been verified in practice. - 2 frames in flight with the usual resource buffering (QRhiBuffer::Dynamic is host visible (UPLOAD) and always mapped and slotted, other buffers and textures are device local (DEFAULT). Requests 3 swapchain buffers. Swapchains are mostly like with D3D11 (e.g. FLIP_DISCARD and SCALING_NONE). - The root signature generation is somewhat limited by the SPIR-V binding model and that we need to map every binding point using the nativeResourceBindingMap from the QShader. Thus the root signature is laid out so each stage has its own set of resources, with shader register clashes being prevented by setting the visibility to a given stage. Sampler handling is somewhat suboptimal but we are tied by the binding model and existing API design. It is in a fairly special situation due to the 2048 limit on a shader visible sampler heap, as opposed to 1000000 for SRVs and UAVS, so the approach we use for textures (just stage the CPU SRVs on the (per-frame slot) shader visible heap as they are encountered, effectively treating the heap as a ring buffer) would quickly lead to having to switch heaps many times with scenes with many draw calls and sampledTexture/sampler bindings in the srb. Whereas static samplers, which would be beautiful, are impossible to utilize safely since we do not have that concept (i.e. samplers specified upfront, tied to the graphics/compute pipeline) in the QRhi API, and an srb used at pipeline creation may change its associated resources, such as the QRhiSampler reference, by the time the shader resources are set for the draw call (or another, compatible srb may get used altogether), so specifying the samplers at root signature creation time is impossible. Rather, the current approach is to treat each sampler as a separate root parameter (per stage) having a descriptor table with a single entry. The shader visible sampler heap has exactly one instance of each unique sampler encountered during the lifetime of the QRhi. - Shader-wise no different from D3D11, works with HLSL/DXBC 5.0 (i.e. existing .qsb files with DXBC in them work as-is). But unlike D3D11, this one will try to pick 6.7, 6.6, ..., down to 5.0 from the QShader, in that order. - Uses D3D12MA for suballocating. As a result it can report vmem allocation statistics like the Vulkan backend, and it does more since the DXGI memory usage (incl. implicit resources) is also reported. This is optional technically, so we also have the option of going straight with the heavyweight CreateCommittedResource() instead. That is what we do if the adapter chosen reports it's software-based or when QT_D3D_NO_SUBALLOC=1 is set. - PreferSoftwareRenderer (picking the WARP device) and the env.var. QT_D3D_ADAPTER_INDEX work as with the D3D11 backend. - It is not unexpected that with large scenes that generate lots of draw calls with multiple textures/samplers per call the performance may be slightly below D3D11 (probably mostly due to descriptor management). Similarly, the reported memory usage will be higher, which is partly natural due to creating heaps, descriptor pools, staging areas, etc. upfront. Will need to be evaluated later how these can be tuned. Change-Id: I5a42580bb65f391ebceaf81adc6ae673cceacb74 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix the broken test after the retirement of qt_parse_all_argumentsAmir Masoud Abdol2023-01-201-1/+1
| | | | | | | | | | As we are now processing the arguments with cmake_parse_arguments(PARSE_ARGV, we don't need to pass the escape characters anymore. Task-number: QTBUG-99238 Change-Id: Iea9cda4fe0ae56043cc4d7db29ce53d9d737d645 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Fix build errors in manual testsAssam Boudjelthia2023-01-2011-5/+13
| | | | | | | | various fixes like missing includes, linking, obsolete API usage, etc. Pick-to: 6.5 Change-Id: I786bff396933b87cd39559ac8964d386ef368df1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename manual tst_qpermissions to tst_manual_qpermissionsMarc Mutz2023-01-111-2/+2
| | | | | | | | To make space for a tst_qpermissions auto-test. Pick-to: 6.5 Change-Id: Ic9ead8afa7ecd035fd5ed56c756f0156828c6705 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: Work on wasm accessibility elements and eventsSharad Sahu2022-12-276-20/+260
| | | | | | | | | | Implement a11y support by adding html elements (Toolbar, Menu, DialogBox) and events of the appropriate type and/or with the appropriate ARIA attribute behind the canvas. Pick-to: 6.5 Change-Id: If9c9fbff9a451b44e57de5d8834f4a78f33f41bc Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Android: handle move operation with content urisAssam Boudjelthia2022-12-211-19/+46
| | | | | | | | | | | | | | | Allow moving content uris if the destination is provided a full content uri with a parent that's different from the source content uri (i.e. different folders). Note: since the underlaying Android APIs don't always know about the parent of a uri, we do some step to deduce that, but that's not always guaranteed to work. Pick-to: 6.5 6.4 6.2 Task-number: QTBUG-98974 Change-Id: If21954e5963f4eb0b96c7ccd983943ea2cab5b24 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Android: handle rename() operation with content urisAssam Boudjelthia2022-12-201-0/+24
| | | | | | | | | | | | Allow renaming content uris if the destination is provided as a direct fileName (i.e. not full content scheme path), and if the destination has the same trailing path (or parent) which means a rename in the same folder structure. Pick-to: 6.5 6.4 6.2 Task-number: QTBUG-98974 Change-Id: Ibc4973366807dd5284c19912ab04ff90f2a573cb Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* CMake: Remove direct qt_android_generate_deployment_settings callAlexandru Croitor2022-12-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | in our tests. They are not needed anymore since d20f4ae706559fb7de8db9dd4845f7ce3936061a got merged and the QT_ANDROID_PACKAGE_SOURCE_DIR property is read at generation time rather than configure time. This means the qt_internal_add_test -> qt_internal_add_executable -> _qt_internal_android_executable_finalizer -> qt_android_generate_deployment_settings calls take care of generation the right value for the property even with CMake 3.16. Remove the direct qt_android_generate_deployment_settings calls, in preparation for their deprecation in public api. Pick-to: 6.5 Task-number: QTBUG-88506 Task-number: QTBUG-88840 Task-number: QTBUG-108508 Change-Id: Ief1d0f9f620bd37beeedde26dedb66f728fa4a6f Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Add facilities to handle more content URIs operationsAssam Boudjelthia2022-12-143-0/+214
| | | | | | | | | | | | | | | | | | | | Use DocumentFile and DocumentsContract to support more operations on content URIs, such as: * listing files and subdirectories with usable content uris * mkdir, rmdir * creating non-existing files under a tree uri * remove And since dealing with content URIs require some level of user interation, manual tests were added to cover what's been implemented. Note: parts of the code were from from BogDan Vatra <bogdan@kdab.com>. Pick-to: 6.4 6.2 Task-number: QTBUG-98974 Task-number: QTBUG-104776 Change-Id: I3d64958ef26d0155210905b65daae2efa3db31c1 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Use qtversion.h instead of qlibraryinfo.hMarc Mutz2022-12-092-2/+2
| | | | | | | | | | | | ... where 50b05e3e2ad969abf4b939d5db2253380e47d775 originally added them. While qtversion.h is included in qglobal.h, using qtversion.h directly is a tiny step towards removing qglobal.h includes from our code-base, so don't let this opportunity go to waste. Change-Id: I28eaca1f4e250fc9e12e2ce6a6f94670a1d08dbe Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Fix the qwasmcompositor_main testMikolaj Boc2022-12-071-8/+10
| | | | | | | This got broken with the introduction of the compositor patch. Change-Id: I7d85795eb537449855a4cce3c8b6b031095c3f7f Reviewed-by: David Skoland <david.skoland@qt.io>
* Support stereoscopic rendering with QGraphicsViewKristoffer Skau2022-12-018-0/+537
| | | | | | | | | | | | | | | | This patch adds a manual test and the required work in graphicsview and qwidget private apis to support stereoscopic rendeing. Basically it works by doing the drawing in QGraphicsView::paintEvent twice, once for each buffer. This way the scene items are rendered to both buffers. There's also an update to resolvement in QOpenGLWidgetPrivate so that multisampling works correctly. [ChangeLog][Widgets][QGraphicsView] Added support for stereoscopic rendering. Task-number: QTBUG-64587 Change-Id: I20650682daa805b64fe7f0d2ba086917d3f12229 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix up rhiwidget manual test after the QWidgetPrivate changeLaszlo Agocs2022-12-011-1/+7
| | | | | | Change-Id: Id3e8d8ce7e175be9b5e9e83e23910546d69a90fa Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* tests: Add project files of highdpi both for qmake and cmakeLiang Qi2022-11-257-64/+51
| | | | | | Pick-to: 6.4 6.2 Change-Id: I5525536674a64ccd14106dc6727b5578c0ab7f16 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Set up a manual test for qt loaderMikolaj Boc2022-11-245-0/+170
| | | | | | | | Skeleton tests included. Run the test with run.sh. Fixes: QTBUG-107744 Change-Id: Ic2734e24025f8edc0f8e710d981367aa321f9066 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* rhi: tex1d manual test: Also build GLSL 120 shadersLaszlo Agocs2022-11-163-2/+2
| | | | | | | | | | This way we can run the test on macOS with the version 2.1 OpenGL context. Amends 85a1663eb15cd85f91fe1f6dd924588d9cc7c2a8 Change-Id: I8ec122fefaab54b35613e226e3937f4b51a7ea5a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* RHI: Add support for 1D texturesBen Fletcher2022-11-158-0/+716
| | | | | | | Support for 1D textures on Vulkan, OpenGL, Metal, and D3D. Change-Id: Ie74ec103da9cfcbf83fa78588cf8cfc1bd6e104f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Use SPDX license identifiersLucie Gérard2022-11-155-245/+10
| | | | | | | | | Amends commit 05fc3aef53348fb58be6308076e000825b704e58. Some files were still missing. Task-number: QTBUG-67283 Change-Id: I78b3cbf31138192805b7e186337c6fda4ac844aa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add permissions feature example and manual test to the buildAssam Boudjelthia2022-11-103-1/+6
| | | | | | | | | | And add license headers and some minor fixes for warnings in the example and test. Task-number: QTBUG-90498 Change-Id: I34592f7f2844c92c25a6a676c8ac1ffca9e03c6d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Plumb public permission APIs to Android backendTor Arne Vestbø2022-11-092-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | The lock and unlock of the Android deadlock mutex is now part of the internal implementation instead of limited to the enum based permission API. It is unclear why 8bca441b6f65 added the guard only to this API and not to the string based API as well. The check for isBackgroundLocationApi29 has been removed, as the logic seemingly resulted in accepting every single permission type except location permissions if used via the enum-based API. Since Android's platform permission API doesn't have an Undetermined status, we keep a hash of the status for each permission type, and by default checkPermission() would return Undetermined, until a requestPermission() call is done which updates the internal hash, and after that checkPermission() would return properly Granted/Denied. Task-number: QTBUG-100413 Change-Id: Ia95c76af754481a281bc90198e349966c9c2da52 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add support for stereoscopic content in QRhi::OpenGLES2Kristoffer Skau2022-11-077-0/+415
| | | | | | | | | | Setting the flag QSurfaceFormat::StereoBuffers does not actually do anything, because we do not utilize the extra buffers provided. We need to expose setting the correct buffers using glDrawBuffers between draw calls. Change-Id: I6a5110405e621030ac3a2886fa83df0cfe928723 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add permission API backend for macOS and iOSTimur Pocheptsov2022-11-033-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When submitting applications to the iOS and macOS AppStore the application goes through static analysis, which will trigger on uses of various privacy protected APIs, unless the application has a corresponding usage description for the permission in the Info.plist file. This applies even if the application never requests the given permission, but just links to a Qt library that has the offending symbols or library dependencies. To ensure that the application does not have to add usage descriptions to their Info.plist for permissions they never plan to use we split up the various permission implementations into small static libraries that register with the Qt plugin mechanism as permission backends. We can then inspect the application's Info.plist at configure time and only add the relevant static permission libraries. Furthermore, since some permissions can be checked without any usage description, we allow the implementation to be split up into two separate translation units. By putting the request in its own translation unit we can selectively include it during linking by telling the linker to look for a special symbol. This is useful for libraries such as Qt Multimedia who would like to check the current permission status, but without needing to request any permission of its own. Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Change-Id: Ic2a43e1a0c45a91df6101020639f473ffd9454cc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Long live QPermissions!Tor Arne Vestbø2022-11-013-0/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many features of today's devices and operating systems can have significant privacy, security, and performance implications if misused. It's therefore increasingly common for platforms to require explicit consent from the user before accessing these features. The Qt permission APIs allow the application to check or request permission for such features in a cross platform manner. The check is always synchronous, and can be used in both library and application code, from any thread. The request is asynchronous, and should be initiated from application code on the main thread. The result of the request can be delivered to lambdas, standalone functions, or regular member functions such as slots, with an optional context parameter to manage the lifetime of the request. Individual permissions are distinct types, not enum values, and can be added and extended at a later point. Task-number: QTBUG-90498 Done-with: Timur Pocheptsov <timur.pocheptsov@qt.io> Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Change-Id: I821380bbe56bbc0178cb43e6cabbc99fdbd1235e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* rhi: Add a manual test for simple stencil-based outlineLaszlo Agocs2022-10-259-1/+202
| | | | | | | | | | | | | Interesting on its own just because it exercises stencil testing, unlike any of the other existing manual tests. In addition it serves as a base example for how outlines could be done, it is one possible approach at least. (render with stencil write, then render again slightly scaled up with a solid color with testing against the stencil buffer content) Change-Id: I0c845a9004136f229cab037f6f0aab2f772bdd76 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Apple: Add CFBundleAllowMixedLocalizations=YES to Info.plist filesTor Arne Vestbø2022-10-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently don't have any machinery for qmake or CMake to map translations declared via TRANSLATIONS += or qt_add_translations to the Info.plist CFBundleLocalizations key. This results in macOS and iOS falling back to the development region, CFBundleDevelopmentRegion, as the only supported localization of the app, which is in most cases set to 'en'. Unfortunately this doesn't work well with the behavior of iOS 11+ and macOS 10.13+ where the OS will set the locale of the app to the best match between the app's supported localizations and the user's preferred language. https://developer.apple.com/library/archive/qa/qa1828/ Since we only support a single localization, the development region, the locale always ends up as 'en_<REGION>', which after QTBUG-104930 is also reflected in the QLocale's uiLanguages(), resulting in the QTranslator machinery always picking English translation for the app. As long as we don't explicitly declare CFBundleLocalizations we need to opt out of the system's behavior of finding the best match between the app's declared localizations and the user's preferences, which we can do via the CFBundleAllowMixedLocalizations key. Fixes: QTBUG-63324 Pick-to: 6.4 Change-Id: If7586d342148cbbb1d2a152cef039aad4448b13c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Apple: Use 'en' instead of 'English' as development regionTor Arne Vestbø2022-10-231-1/+1
| | | | | | | | | | | This is consistent with what $(DEVELOPMENT_LANGUAGE) reports, as well as the Apple Locales Programming Guide which states that "Locale names such as “English”, “French”, and “Japanese” are deprecated in OS X and are supported solely for backward compatibility." Pick-to: 6.4 Change-Id: I99779d678ef9d4ea90249572f2f977e9b4df6c62 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix the workaround in ~QWasmOpenGLContextMikolaj Boc2022-10-213-0/+208
| | | | | | | | | | | | | The workaround stopped working because JSEvents is now not a global object. Update the workaround by exporting the JSEvents object from emscripten runtime and replacing the function that removes the event handlers to a dummy function that does nothing temporarily, only to revert it when the context is destroyed. Fixes: QTBUG-107197 Pick-to: 6.4 Change-Id: Icceae884c85e04fdafcca6cf3c563094d3f6f0dc Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-115-6/+6
| | | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace, with manual unstaging of the actual definition and documentation in dist/, src/corelib/doc/ and src/corelib/global/. Task-number: QTBUG-99313 Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Introduce QGlyphRun::stringIndexes()Eskil Abrahamsen Blomfeldt2022-09-2912-0/+676
| | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a way to trace each entry in the glyph index array to a specific index in the original text passed to QTextLayout, as well as a convenience function to access the original string from the QGlyphRun. The index information is stored in the logClusters array internally in Qt, but it contains the inverse information: For each character in the output string, it contains an index into the glyph array. In order to get the string indexes for each glyph, which makes a lot more sense in the context of the QGlyphRun API, we need to do a little search to construct the data. To avoid adding unnecessary allocations, we make the new APIs opt-in. If you do not specify anything, you will only get the glyph indexes and glyph positions as before. However, you can now specify exactly which parts of the layout to extract using an optional flags parameter. This also adds a manual test which can be very handy to visualize QTextLayouts and how they are split into QGlyphRuns. Fixes: QTBUG-103932 Change-Id: Ie4288fff338b9482aba0aba29fc7e1e59fa60900 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Introduce centralized means of checking for asyncifyMikolaj Boc2022-09-232-8/+7
| | | | | | | | The new function has an advantage of not requring EM_JS. Change-Id: Ib9ad0e6b59cfe2e6864697a14b5cfdb39f62af2d Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* windowflags: Add control to toggle Qt::NoDropShadowWindowHintTor Arne Vestbø2022-09-202-0/+7
| | | | | Change-Id: I53b496c7b27a73cfb6052af3cd8643a971609523 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* windowflags: Report QWindow compound window statesTor Arne Vestbø2022-09-201-1/+1
| | | | | | Pick-to: 6.4 Change-Id: I44b923df6851d0f51ac39bcbb4a569cb2fde775d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add window-modal show option to dialogs manual testMikolaj Boc2022-09-1310-42/+97
| | | | | | | | This provides an easy way to test window modality using a ready available test. Change-Id: Ia23736c61fd56dda8f72ae19f5f102163951271b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* rhi: metal: Add support for tessellationLaszlo Agocs2022-09-019-11/+44
| | | | | Change-Id: Ie8d226a6a959aa5e78284ea72505fd26aec1e671 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Move qVersion() from qglobal.h to qlibraryinfo.hSona Kurazyan2022-09-012-0/+2
| | | | | | | | | | | | | | | Since qVersion() might be called also from C code, disable the parts of qlibraryinfo.h that are relevant only for C++ code if __cplusplus is not defined. [ChangeLog][Potentially Source-Incompatible Changes] qVersion() is moved from qglobal.h to qlibraryinfo.h, '#include <QtCore/QLibraryInfo>' needs to be added where it's used. Task-number: QTBUG-99313 Change-Id: I3363ef3fa4073114e5151cb3a2a1e8282ad42a4d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Move QMacAutoReleasePool from qglobal.h to qcore_mac_p.hSona Kurazyan2022-09-012-0/+5
| | | | | | | | And include qcore_mac_p.h where needed. Task-number: QTBUG-99313 Change-Id: Idb1b005f1b5938e8cf329ae06ffaf0d249874db2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QtBase tests: remove QT_DISABLE_DEPRECATED_UP_TO definesIvan Solovev2022-08-246-10/+0
| | | | | | | | | The value will be propagated from Qt build. Task-number: QTBUG-104858 Change-Id: Iae2c32c3037438f41b92f9ee28004f30eb4e3210 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* wasm: add manual auto-test for websockify-tunneled socketsMorten Sørvig2022-08-243-0/+404
| | | | | | | | | Test TCP sockets usage on the main thread, on secondary threads, and with asyncify. Pick-to: 6.4 Change-Id: I466df8c253c6a18a9c12d44fa8f53e76f81a0437 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: add echo_server test TCP serverMorten Sørvig2022-08-242-0/+141
| | | | | | | | Test server for in-browser TCP usage. Pick-to: 6.4 Change-Id: Ia1a29c0e14a6d2ee8075ce202c9f6998a3ccc4c9 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-23167-167/+167
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Rename QT_DISABLE_DEPRECATED_BEFORE -> QT_DISABLE_DEPRECATED_UP_TOIvan Solovev2022-08-199-9/+9
| | | | | | | | | | | | | | The new name describes the behavior in a better way. [ChangeLog][Build System] The QT_DISABLE_DEPRECATED_BEFORE macro is renamed to QT_DISABLE_DEPRECATED_UP_TO. The old name is deprecated, but is still recognized if it is defined during configuration and the new name is not defined. Task-number: QTBUG-104944 Change-Id: Ifc34323e0bbd9e3dc2f86c3e80d4d0940ebccbb8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* wasm: always build asyncify tests for eventloop_autoMorten Sørvig2022-08-173-10/+58
| | | | | | | | | Add a runtime test for asyncify availability; skip tests if asyncify is not available. Add new build target which builds with asyncify enabled. Change-Id: Idaeff0a24aa01525927b012af2a0ba135c7839c3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: add "skip" support to qtwasmtestlibMorten Sørvig2022-08-173-4/+28
| | | | | | | | | | | We're not looking to skip faulty tests, but there are cases where we would like to indicate that a test function exists but can't run because some precondition is not met. Pick-to: 6.4 Change-Id: Ifaaafcfa7a55beaaf56d8b25fabbe3dc2566350f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
* wasm: include asyncify support unconditionallyMorten Sørvig2022-08-172-8/+5
| | | | | | | | | | | | | | | | | | | Emscripten's option for enabling asyncify (-sASYNCIFY) is a link-time option, which means there is no requirement to have a separate asyncify build, at least for static builds. Replace the current QT_HAVE_EMSCRIPTEN_ASYNCIFY compile-time option with a run-time option which checks if the asyncify API is available. Keep support for configuring with "-device-option QT_EMSCRIPTEN_ASYNCIFY=1" for backwards compatibility and for the use case where want asyncify support to be on by default for a given Qt build. Enable asyncify for the asyncify_exec example. Pick-to: 6.4 Change-Id: I301fd7e2d3c0367532c886f4e34b23e1093646ad Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Add manual test for various iOS asset handlingAlexandru Croitor2022-08-1730-0/+575
| | | | | | | | | | | | | | | | | | Includes: - setting a custom Info.plist - Bundling non-image assets - Bundling image assets using asset catalogs - Bundling app icons - Bundling a launch screen Projects added for both qmake and CMake. The executable uses testlib to check that non-image assets, icons and asset catalogs were successfully bundled upon deployment to a device. Task-number: QTBUG-104519 Change-Id: Iaab6112e31e1098dcd2548e18b58bed5b64e6f83 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* rhi: d3d11: Enable tessellation and geometry with some caveatsLaszlo Agocs2022-08-1512-4/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | The caveat being having to manually create HLSL versions of the hull, domain, and geometry shaders in parallel with the Vulkan GLSL ones, while keeping the interfaces intact (stage inputs and outputs, cbuffer layouts, binding points/registers). This is not always trivial but typically doable in not very complicated case after inspecting the SPIRV-Cross-generated vertex/fragment code in the .qsb files. Once written, the HLSL files can be injected into a .qsb file with qsb -r. or the corresponding CMake syntax. Conceptually this is no different from how samplerExternalOES support is implemented for Multimedia. (there the problem is that the shaders cannot be compiled to SPIR-V to begin with, here it is that we cannot translate from SPIR-V, but in the end the workaround for both problems is effectively the same) The manual tests demonstrate this, both the tessellation and geometry apps work now with D3D out of the box. On the bright side, the implementation here in the the D3D backend of QRhi does not need to know about how the shaders got there in the QShader. So none of the implementation is dependent on this manual process. If some day qsb would start translating to these kind of shaders as well, it would all still work as-is. Change-Id: I32d9ab94e00174e4bd5b59ac814dfedef9f93ad1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Use the local file APIs to save/load files on WASMMikolaj Boc2022-08-125-46/+650
| | | | | | | | | | | | QFileDialog::saveFileContent, QFileDialog::getOpenFileContent are now using local file APIs to access files on any browser that passes a feature check. The feature is thoroughly tested using sinon and a new mock library. Task-number: QTBUG-99611 Change-Id: I3dd27a9d21eb143c71ea7db0563f70ac7db3a3ac Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>