summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix replaced removal on updateKatja Marttila2022-12-019-0/+84
| | | | | | | | | | If component is replaced with a component which is installed as autodependency to other component, the replaced component was not uninstalled on update. Task-number: QTIFW-2887 Change-Id: Ibad04df765191f0e399c6f6020cdf081dba5d803 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Cleanup installer calculator classesKatja Marttila2022-11-301-5/+1
| | | | | | | | | | | | | | As there are several optimizations done, the single click of component in component selection tree is not slow anymore. Cleaning the code so it is easier to maintain. Basically this revers commit a28cf55b5a5007c0dd952b3012c076d9da329f0f but as there are bug fixes made after that so pure revert could not be done. Task-number: QTIFW-2885 Change-Id: Id486d5dc68c42c31b4848cd19a1761bcfe242db6 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Make Settings operation to support _OLD and placeholdersKatja Marttila2022-11-255-2/+86
| | | | | | | | | | | | | | | | | | | | | | | | Setting can be a file. The Settings path was hard coded to .dat file, which made it impossible to move the settings file to a different location or use some other settings file instead. This change saves the settings path with placeholder name, which is resolved before performing settings operation or undo operation. In case settings path is hard coded to .dat file and the settings file is relocated, this can be overcome by setting variable name _OLD to point to the location where the settings file originally was. Installer uses this _OLD syntax to resolve the new location. For example in the following example Tools.ini is relocated from OldLocation to NewLocation. Setting the installer values the following way will tell installer to use the settings from NewLocation instead of OldLocation. installer.setValue("MY_OWN_EXECUTABLE", "C:/Qt/NewLocation/Tools.ini") installer.setValue("MY_OWN_EXECUTABLE_OLD", "C:/Qt/OldLocation/Tools.ini") Task-number: QTIFW-2882 Change-Id: I47dc68dfba8a49f37ab361edc8c64d3e5523e02e Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix errors occurring in full uninstall on macOSKatja Marttila2022-11-255-0/+49
| | | | | | | | | | | | | | | Maintenance Tool can be retrieved from online repositories like any other component. The component contains files which are listed to remove correct files in uninstall. As Maintenance Tool differs a bit from other components in the matter that it should not be deleted in full uninstall as it is running, we need to exclude the Maintenance Tool (which we call also installerbasebinary), from the file list. Maintenance Tool itself is removed in PackageManagerCorePrivate::deleteMaintenanceTool() Task-number: QTIFW-2875 Change-Id: I33a16e632e3b354099b749d8dde7b65f5cef8f43 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix updater view behavior for non-checkable componentsArttu Tarkiainen2022-11-241-2/+2
| | | | | | | | | | | | | | | | As the components can still be selected with the selection buttons above the view, it makes little sense to artificially limit selecting individual items for update and hiding their check state. Also the documented use case for the property - making a parent component non-checkable so only some of its children should be checked - does not apply for the updater view. Apply similar fix to forced installation components, which should be also toggleable for updates. Task-number: QTIFW-836 Change-Id: I18f34c4e8ee1e24e761e50edd3066ec4aea3432e Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Merge remote-tracking branch 'origin/4.4' into 4.5Arttu Tarkiainen2022-11-033-0/+53
|\ | | | | | | Change-Id: If99e84c5f6e6914f0d90770053ce6850e70ed403
| * Windows: fix installation error with concurrent Extract operationsArttu Tarkiainen2022-09-013-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was an issue with the Extract operations when using the same "targetDir" argument for multiple archives. The DirectoryGuard object creating the missing leading directories would occasionally run into a race condition when multiple threads competed with creating the directories. Fix by adding installer specific implementation similar to QDir::mkpath(), but which checks if the directory was created elsewhere at every directory level. Also convert an existing similar case with the Extract operation to use the new function. Task-number: QTIFW-2752 Change-Id: I4451e931309edb536294314b11c903189dacf2f0 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Add possibility to synchronize metadata cache manuallyArttu Tarkiainen2022-10-211-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The contents of the cache subdirectories and manifest.json may mismatch if the installer process is killed after the metadata fetch, because the manifest file is normally synchronized only when the cache object gets destroyed. While this is a recoverable error, it creates unnecessary overhead of discarding broken items and downloading them again. Add support for synchronizing the cache by the caller and do so each time the cache is updated by Metadatajob. Task-number: QTIFW-2817 Change-Id: Ia4cd3de44d57e8d732d11dc26968aa87323ada0f Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Allow generation and signing of MT in macosKatja Marttila2022-10-204-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously maintenance tool could be updated from online repository placing installerbase to repository and setting setInstallerBaseBinary() in install script. The maintenancetool app bundle was written in the code and installerbase placed under .app/Contents/MacOS/. This prevented the maintenancetool app bundle to be signed and notarized. Fixed so that the whole app bundle can be placed to repository. This does not break the signing nor notarization as the whole bundle is copied as it is. The setInstallerBaseBinary() is still needed in the install script so that the installer knows which bundle is the maintenance tool. Old way of updating maintenancetool still exists, if the installerbaseBinary does not contain the ending 'app' installer assumes that the maintenance tool is the executable itself instead of whole app bundle. This change also adds a new binarycreator switch --create-maintenancetool, which can be used in macos to create the app bundle for maintenance tool. Task-number: QTIFW-2750 Change-Id: I3483ddb815d035644e826559947f6f9de4af9361 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Add auto-tests for metadata cacheArttu Tarkiainen2022-10-209-1/+411
| | | | | | | | | | | | Task-number: QTIFW-2621 Change-Id: Ibdc69d8f64f318505df157091438f79fe55190e8 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Add persistent metadata file cacheArttu Tarkiainen2022-10-1423-10/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce GenericDataCache and Metadata classes for storing the fetched metadata files (Updates.xml and uncompressed files from the meta.7z archives) on local filesystem. The cache uses a checksum based dictionary to keep track of the cached metadata items, with the SHA1 sums of downloaded Updates.xml files being the keys to refer single metadata item. We still need to download all the Updates.xml files on each fetch to check if the cached metadata items are applicable for the current repositories. Update the Updates.xml files in auto-test data to have unique contents, otherwise there could be conflicts with identical test repositories, as the tests will also utilize the cache now. Also omit registering Repository type to the meta-object system in the class contructors, this is expensive as we construct objects from the class frequently, in the worst case hundreds of thousands times. PackageManagerCore already does the registering. Task-number: QTIFW-2621 Change-Id: Iee10ead68befd722ffe7f18ca48483d5a3666658 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Optimize retrieving components by nameArttu Tarkiainen2022-10-111-3/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | The PackageManagerCore::componentByName(const QString &name) -function is called repeatedly by the InstallerCalculator class and at minimum once for each install script, because we automatically inject a snippet which stores the return value of the function in the 'component' variable for the script context. Create a <name, component> hash once per each component model reset to make the lookups faster: * This avoids constructing a flat list of components and all their descendants again and again when calling the function. * The linear lookup from the component list is slow because it calls componentMatches() for each element until the satisfactory component was found or the list ends. * The average time complexity of the key lookup from the QHash is constant even for large hashes. Task-number: QTIFW-2790 Change-Id: I580d28f78ac6681d5bcbfbad970002b49de1a830 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Tests: Delete temporary install dir in commandlineupdateKatja Marttila2022-06-061-43/+24
| | | | | | | | The directory created to temp in commandlineupdate was not deleted. Change-Id: I0375743ad408d3ba6adb4244f276e48b9a7d7d47 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Convert possible test cases to data-driven testsKatja Marttila2022-06-0636-604/+768
| | | | | | | Also rename the test to better correspond the test cases. Change-Id: Ic3f624fc8cf42724ff4df550cc85a52343ac6452 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Replace QSettingsWrapper::Format with QSettings::FormatKatja Marttila2022-05-272-3/+2
| | | | | | | | | | This changes allows in follow-up commits to access windows registy with other than just NativeFormat. This is needed for 32-bit applications to access 64-bit registry and 64-bit application s to access 32-bit registry. Change-Id: I0b88f4eaa499e53e10162ae5343b95d06ddbfc27 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Workaround QSettings / QDateTime incompatibility with Qt 6 applicationsArttu Tarkiainen2022-05-171-2/+37
| | | | | | | | | | | | | | | | | This causes problems when installers created with IFW share config files with Qt 6 applications. If the config file contains keys with QDateTime values written by the other application, the installer and maintenance tool will segfault when attempting to sync the file, even if we do not overwrite the values. This is fixed to recent Qt 5 and 6 versions with the submitted patches to QTBUG-102334. But as this requires updating the baseline Qt version for both the Qt IFW and the Qt 6 application, apply the workaround suggested in the issue comments, to avoid the crash in meantime. Task-number: QTIFW-2610 Change-Id: I968e293324775dc650315e223f549a81657a27a3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Do not install new dependencies for installed componentsKatja Marttila2022-05-1610-2/+120
| | | | | | | | | | | | | | | | If component is updated to repository, and new dependencies are added, the dependencies should be installed only when fresh install to component is made or the component is updated. This change adds a new LocalDependencies value to component. It keeps track of the dependencies the local installed packages has. Fixes also a bug in uninstallecalculator, where we should also read the dependencies from local installed packages instead of newly introduced repositories. Task-number: QTIFW-2624 Change-Id: I0557e5adf1e87c0a1238cc455cfb2c90f6b05c87 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix updating autodependency componentsKatja Marttila2022-05-132-5/+45
| | | | | | | | | | | Autodependency components were always forcely updated, even if 'Deselect All' was selected in component selection page. Fixed so that the autodependency component update is updated only when one of its dependants is updated. Task-number: QTIFW-2595 Change-Id: I05ececc45ef32ff80d53b008f839b358158a3316 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Tests: Use data driven tests for commandlineupdateKatja Marttila2022-05-1321-146/+469
| | | | | | | | This change allows more freely to add new test cases as the test cases are now independent on each other. Change-Id: Ia0635cf44b51095ef7be8bd829474233fb075e7a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Tests: Add detailed information about installer resource failsKatja Marttila2022-05-121-5/+7
| | | | | Change-Id: Id6cac37c1c5cb760ea5303a4fdbf53cf02fcda0a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Speed up component selection in component selection pagesKatja Marttila2022-04-281-7/+24
| | | | | | | | | | | | | | | | | If a lot of components are installed, maintenancetool was slow to select/unselect a single component. This was caused because the whole tree's components were recalculated. Fixed so that only the selected/unselected components and their dependencies and autodependencies are recalculated instead of whole tree. This change speeds up clicking tree item from zero to 90 percent, depending on how much components are already installed. The more components are installed as autodependency, the slower it gets to select the items. Task-number: QTIFW-2522 Change-Id: I5e824aed8787fd7ecdce72b15a1b13848f0a3923 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* 3rdparty: deprecate usage of LZMA SDKArttu Tarkiainen2022-04-133-6/+15
| | | | | | | | | | | | | | | | The 3rd-party sources haven't been updated in a long time, and is missing some features compared to libarchive (which the official IFW binaries use), like symbolic link support on Windows. Add deprecation warning when compiling with LZMA SDK, and make building the library and related client code conditional behind a separate config feature. Update docs to emphasize that libarchive is the recommended build option for archive handler. Change-Id: I70ed5f9b5d13e2243778f7c44b4ea833c8092ae0 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Repogen: allow usage of --update-new-components with unified metadataArttu Tarkiainen2022-03-311-1/+39
| | | | | | | | | | I couldn't find a reason why this combination wouldn't work. If there are no known issues the option should be allowed. Task-number: QTIFW-2558 Change-Id: I9bceddc70e3ea4edeb1af2fe873f96bf815900d3 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* CLI: Add error message for trying to install unstable componentsArttu Tarkiainen2022-03-291-5/+10
| | | | | | | | | | Also print a general message when no components from the user selection are valid - in case the installer misses the detailed reason why components cannot be selected, at least some information is printed. Task-number: QTIFW-2591 Change-Id: I1b10e7601527ddc0192417b41691691b517139a5 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add install reason why component is uninstalledKatja Marttila2022-03-241-7/+19
| | | | | | | | | | In details view uninstallable and installable components are listed. For installable components a reason is shown why the component is installed. Added similar kind of message for uninstallable components as well. Task-number: QTIFW-2581 Change-Id: Idbf31200793a6c89a4ed4a6fc115f49889b5f9b5 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Merge remote-tracking branch 'origin/4.3' into masterKatja Marttila2022-03-226-3/+91
|\ | | | | | | Change-Id: I449320b3af2c561a0b4a4cb689d072533d8fdb8f
| * Fix replaced component uninstall4.3Katja Marttila2022-03-226-3/+91
| | | | | | | | | | | | | | | | | | | | Replaced component was uninstalled when installing other components although no update or install was requested to the component. Fixes also a bug when some components were uninstalled unvisible from user. Task-number: QTIFW-2577 Change-Id: I6a7e9ce4a56991dfbdea53eb376d782dfb5d050a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Add click option for product imageKatja Marttila2022-03-211-1/+3
| | | | | | | | | | | | | | | | | | | | Product image can now be clicked. It opens either url in Web browser or if file reference is given, then it will be opened with the suitable application. Task-number: QTIFW-2361 Change-Id: I59ed1355e90c23c8d0a5124779725825ca1ee2c8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Merge remote-tracking branch 'origin/4.3' into masterKatja Marttila2022-02-182-6/+62
|\| | | | | | | Change-Id: I8204fdbae2602f3dfb6eb04dc28d2e59606594ea
| * Fix extracting entries with file paths that contain unicode charactersArttu Tarkiainen2022-02-171-5/+61
| | | | | | | | | | | | | | | | | | | | | | | | Libarchive stores most paths internally in a multistring that can contain a combination of a wide character string, multibyte string in current locale or unicode string encoded as UTF-8. Try to retrieve and set a variant of the string with the correct encoding when converting libarchive strings to/from Qt string classes. Task-number: QTIFW-2506 Change-Id: I7e7c1e3c5709b669df68b2f3918789ad4ebe4f13 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Remove extra linebreak from ConsumeOutput operationKatja Marttila2022-01-311-1/+1
| | | | | | | | | | | | | | | | | | ConsumeOutput may be run to fetch a file path. Extra line break in the end will cause problems. Change-Id: I61133a66fb3d3a6961e9f79c11f783b5d103f046 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Update license headerKatja Marttila2022-01-273-45/+12
|/ | | | | | | | Some of the license headers were still LGPL. Changed those to use GPL-EXCEPT. Change-Id: I26fd46b1f226b2898c7296737c12c679bf3cc9e1 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Update license headerKatja Marttila2022-01-247-13/+13
| | | | | | | Use https instead of http in www.qt.io/licensing Change-Id: I0a2e97afcda03d50fd823be8e11426c2399a3b8f Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Make 'override' specifier usage consistentArttu Tarkiainen2022-01-211-4/+4
| | | | | | | | | Add where missing. Replace occurrences of Q_DECL_OVERRIDE macro, building IFW requires a C++11 compatible compiler so the language specifier is preferred. Change-Id: Idb75e2813d26b9da85e03891f0ae9537c6524c56 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* RemoteObject: Fix warning on calling QLocalSocket::waitForDisconnected()Arttu Tarkiainen2022-01-202-3/+57
| | | | | Change-Id: I1d5fdfedaee35c530b383951e6fc69b75bd67d64 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Make Updater -view checkbox selection fasterKatja Marttila2022-01-191-1/+1
| | | | | | | | | | If there are lot of components installed, querying core from component caused unnecessary performance hit. Also replaced the foreach keyword with the preferred C++ range-based loop Task-number: QTIFW-1021 Change-Id: I961439ba14f26fee21f201769a71319b4b98d14b Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* CLI: Add <TreeName> value to 'list' and 'search' command outputsArttu Tarkiainen2022-01-171-11/+21
| | | | | | | | | | | | | Print both 'TreeName' element and 'moveChildren' attribute value with detailed verbosity mode. Also use QXmlStreamWriter to write the output documents with deterministic attribute order, QDomElement stores the attributes internally in a QMultiHash map, which is randomized. Task-number: QTIFW-2452 Change-Id: I8eec64d39394f4092f8505ec99869165c82d11da Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix executing tests when configured without libarchive supportArttu Tarkiainen2022-01-111-3/+3
| | | | | Change-Id: Iaac72aa3d856a10c830f018ceb5c6ad87f4f28a5 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* ArchiveFactory: register handlers for .qbsp file extensionArttu Tarkiainen2022-01-114-2/+5
| | | | | | | | | | | QBSP archives were missing a handler which caused UnzipArchiveTask to fail when fetching metadata. Also fix the resulted segfault in UnzipArchiveTask::doTask() when ArchiveFactory::create() returns nullptr for unknown file extension - it now handles the exception properly. Task-number: QTIFW-2475 Change-Id: I72624763a06d6e7495daebd69970a5f22a4fd6d3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix segfaults when failing to fetch compressed repositoriesArttu Tarkiainen2022-01-112-15/+15
| | | | | | | | | | | | | | | The ComponentModel object was not always reset in case we already got to the point of clearing the source data (deleted components owned by PackageManagerCore from previous fetch) and failed after that, leaving the model with dangling pointers to the deleted component objects. If we were already on ComponentSelectionPage, this would cause segmentation faults when the component tree view using the model would be shown again after fetch. Task-number: QTIFW-2441 Change-Id: Ie779de5ca0a3c4ae895ea507e6be4a2f7343501e Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix Replace -element beviourKatja Marttila2022-01-1129-1/+489
| | | | | | | | | Replacable component was not correctly removed in install and update. Also added new tests for Replace element. Task-number: QTIFW-2454 Change-Id: Idce7fd1ef0ac2025ca5ca0952ab837e14516ac2b Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Do not replace conflicting remote packages silently with localsArttu Tarkiainen2022-01-063-0/+120
| | | | | | | | | | | | | | | | On (tree)name conflicts with other than the same component in local and remote packages - instead of silently replacing the remote package with local, do one of the following: - Remote package A may have declared the same tree name as installed local package B. Catch the case and re-register package A as an unstable component with the original name, if possible. - Remote package A may have declared a tree name that conflicts with local package B's name. Do not register component A. Change-Id: I16ac583ea10bf203d8b8d0b19e6890f03cf0067a Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add support for moving child components with <TreeName>Arttu Tarkiainen2022-01-0641-3/+531
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new optional "moveChildren" attribute to <TreeName> element. Children of components declaring "moveChildren=true" attribute are calculated a value for an automatic tree name element. Multiple components in a single tree branch can declare a tree name, the order which the relocation happens is from leaf components to root components. Components may be moved under another tree name target. Components may be moved to an existing identifier part that does not have a component, for example in the following repository structure: rootA.childA rootB rootB.childB the "rootB" component can legally declare a "rootA" tree name. The tree names of components become static after installed. If a repository declares a new tree name for a component that is installed, it is only applied after updating in maintenance tool. Child components, which have an automatic tree name, are moved if the parent component is updated with a new tree name, however. Task-number: QTIFW-2380 Change-Id: I9c44a114d3c1248b7e2dd4f0b5cda0739af102f3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix replacing components with <TreeName> elementArttu Tarkiainen2022-01-062-0/+28
| | | | | | | | | | | The QHash dictionary used to store component objects before building the component tree may include keys that are either original names or overridden tree names of components. Only the former were handled when removing replaced components from the QHash. Task-number: QTIFW-2455 Change-Id: I340aa61c724da0da62d7e5a875a38b6ecc0eceb5 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Do not block installation when there are conflicting component namesArttu Tarkiainen2022-01-062-14/+17
| | | | | | | | | | | | - Components with conflicting original identifiers are not registered. - Components with conflicting tree names are registered with the original name, if installer is configured to allow unstable components. Otherwise they are not registered. - Unaffected components can be installed as usual. Task-number: QTIFW-2444 Change-Id: Ic1eaf3878f974185bc68202930134e5199dc0398 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Tests: Update clientserver blacklist linux versionKatja Marttila2021-12-311-1/+1
| | | | | Change-Id: Ie9e9b5659097d86d897995398ba29e0f8d7ba536 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Tests: fix leaking PackageManagerCore objectsArttu Tarkiainen2021-12-299-67/+70
| | | | | | | | | | | This left quite many temporary files from being properly released and could affect the test cases that followed, for example when temporary repository directories were not cleaned they hid problems in the clearing of downloaded archives resource mapping. Change-Id: Id8ba1837486264d35af0c297a0519e160eb99d60 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Tests: suppress "QTextStream: No device" warningsArttu Tarkiainen2021-12-291-0/+1
| | | | | | | | | | | | | | | QInstaller::init() registers the custom message handler used by installer, which formats and prints the messages and writes the installation log. We clear the buffer device used for the log contents before it gets written on disk when destructing the installer's PackageManagerCore object, but on tests there might be several core objects. Use a silent message handler instead. Change-Id: I6694bca1dfffaffd1389f8f619531f1b0052c090 Reviewed-by: Katja Marttila <katja.marttila@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Tests: clear binary format engine before constructing new core objectArttu Tarkiainen2021-12-291-0/+3
| | | | | | | | | | | | | | | | | This fixes issues on auto-tests where we construct a new PackageManagerCore instance for each test case. Installer registers downloaded archives into internal resource collection mapping with a naming scheme that contains values such as: "installer://collectionName/resourceName". As the "BinaryFormatEngine Handler" singleton class retains the resource collection mappings between mock installer runs, we ran into situations where we would register different actual paths with the same mapped file names, or the old resources would not exist anymore on disk, causing failures at different points. Change-Id: Ic7ee30886a2c586fbe0efbe4bb4d19a24d9dba83 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix deprecation warnings from building with Qt 5.15.2Arttu Tarkiainen2021-12-216-7/+6
| | | | | | | | Also update build version requirements. Task-number: QTIFW-2388 Change-Id: Iae1949548dda7a3b8d448228e27060efb5abd8eb Reviewed-by: Katja Marttila <katja.marttila@qt.io>