summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Optimize QString::split usageKatja Marttila2023-02-074-13/+22
| | | | | | | | | To increase efficiency QString::split is performed only to strings which are not empty. Task-number: QTIFW-2805 Change-Id: Ieed887a3e6f415395497dcdf05c118b32c72d9ee Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Remove unused component calculation codeArttu Tarkiainen2023-01-312-2/+0
| | | | | Change-Id: Ie8e00f148e0d079db5a8d4c49216cfe81720f7c5 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update version number to 4.6.0Katja Marttila2023-01-305-19/+19
| | | | | Change-Id: I1bda9669e7fc0ffc7d7b2c3f3aa956a5b2f66b72 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Merge remote-tracking branch 'origin/4.5'Arttu Tarkiainen2023-01-2718-138/+233
|\ | | | | | | Change-Id: I07baba6a0e64b6022e6a933708e199551be7dd2f
| * Support detecting invalid dependency resolutions on component selectionArttu Tarkiainen2023-01-2614-126/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IFW could already previously detect circular and missing dependencies by running a precheck calculation when building the component tree. However, there can be also cases of where the user selection results in unsolvable changes to components. One such case was the erroneous possibility to uninstall a component marked with ForcedInstallation, if any of its dependencies was checkable and the user unselected it for uninstallation. Add support for reacting to such errors in the component tree view, displaying a message box about the invalid dependency resolvation error, and blocking further navigation until the component selection passes the dependency calculations. Also attempt some refactoring the related code to simplify the different call sequences resulting in recalculation of the components. Change-Id: I9dc78f858bd4be7932f89f8e14bbfd97fbd3a0f6 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Show check box for AutoDependOn components in updater viewArttu Tarkiainen2023-01-263-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to the automatic selection, allow end user to select components declaring the AutoDependOn property when updating components. This does not change the previous rules for automatic selection for update, meaning the component 'A' declaring AutoDependOn relation to component 'B' will still be updated when 'B' is selected for update, regardless of the user selected check state for 'A'. This fixes some cases not handled by the automatic selection, where the component declaring AutoDependOn relation could not be updated. An example scenario: - 'A' (1.0.0) declaring an auto dependency to 'B' does not follow the release schedule and versioning of the component 'B' (2.1.0). - 'A' has a new release (1.0.1) that is pushed to remote repository - The end user cannot update the component 'A' unless 'B' is also updated to the repository, which would trigger the automatic selection Task-number: QTIFW-2855 Change-Id: Iea06c366f7f14f391cbc0b4a6526c8aee349ae59 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Update IFW version number and ChangelogKatja Marttila2023-01-136-19/+22
| | | | | | | | | | Change-Id: Ic00bf9b6db604d4f3c0307a96229316ad1c1cd87 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * Add debug print for operationKatja Marttila2022-12-131-0/+2
| | | | | | | | | | | | | | | | Operations can replace variables in runtime, adding logging when it happens. Change-Id: I5e987f2c6ddc6b90175a43d16c23f5214a28718f Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Resolve downloadable archive list while installingKatja Marttila2023-01-264-10/+21
| | | | | | | | | | | | | | | | | | | | Installer can have thousands of components and only few of them user selects for install. Parsing the downloadable archives to install only when they are selected for install for better performance. Task-number: QTIFW-2805 Change-Id: I0771df05e17c85f37639768e2581d85bbf7bf66f Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Adapt to changes in QHash and QSetChristian Stenger2023-01-179-21/+24
| | | | | | | | | | | | Task-number: QTIFW-1829 Change-Id: I5f062ae4c6389aba57b1de6f0e1884b4cd301334 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Replace deprecated fromTime_t with fromSecsSinceEpochKatja Marttila2023-01-021-1/+1
| | | | | | | | | | | | Change-Id: Idde27e2f3163af93ff1d47d8da26d1cfc4d00fcb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Doc: Add information about postLoad usage in scriptsKatja Marttila2022-12-302-5/+28
| | | | | | | | | | | | | | Task-number: QTIFW-2860 Change-Id: Icadb39c13279d3614179f8e16d33be696198a74c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Doc: add -no-feature-gssapi to recommended Qt configure optionsArttu Tarkiainen2022-12-302-2/+2
| | | | | | | | | | | | | | | | This reflects the official IFW builds on Linux. Task-number: QTIFW-2919 Change-Id: I838fd0e544e1fc8d9a2c4b7d344fb7aad2082b20 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Handle api removed in Qt6Christian Stenger2022-12-298-7/+43
| | | | | | | | | | | | | | Task-number: QTIFW-1829 Change-Id: Ibb492ada102dd74f4defde084fca48106837add6 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Suggest clearing the local cache if loading of meta files failArttu Tarkiainen2022-12-291-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In case the UI files or licenses associated with a component cannot be loaded, one reason may be because the installer was forcibly interrupted previously and the cache was left in an inconsistent state. Add a hint about clearing the local cache, so that the files will be downloaded again as part of the metadata archive for repository (or component, in case of split metadata format). Task-number: QTIFW-2883 Change-Id: Ie76365bdc5792a91471cc60037f4375617534fe4 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Optimize tooltip and description settingKatja Marttila2022-12-281-16/+22
| | | | | | | | | | | | | | | | | | | | Tooltip and description texts were set every time any component data was updated. Fixed so that the texts are altered only when needed. Task-number: QTIFW-2805 Change-Id: Ic75a17d4b88d0f3b1658d9ec187284d4604f9f45 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Tests: fix 'make check' failing after consecutive callsArttu Tarkiainen2022-12-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'elevatedexecuteoperation' test invoked qmake in its project file directory when ran, overwriting the original Makefile. This would cause problems on the consecutive "make check" invocations after first, if qmake was originally ran with a custom command line arguments. For example, setting 'CONFIG+=libarchive' would be lost and the test would try to link against the default lib7z.a, which would not be found on libarchive enabled builds. Fix by calling the qmake executable with the version option instead, we just need to check that the executable could be started, no need to actually run it for the test sub-project. Change-Id: Ie10c1622fa529c1338d427b7c757f8cc5834e0ac Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Optimize Updates.xml parsingKatja Marttila2022-12-224-125/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDomDocument::setContent is time consuming operation especially when there are thousands of Updates.xml to be parsed. Using QXmlStreamReader for parsing the xml content instead, the Updates.xml content is already validated in metadata job after download. In Windows, using QXmlStreamReader instead of QDomDocument decreases the xml parsing time from ~10 seconds to ~1 seconds when there are thousands of Updates.xml to be parsed. Task-number: QTIFW-2924 Change-Id: I14f5eba5b72f451a12ab4e3bf6b2f00b5f66faaf Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | 3rdparty: update libarchive sources to 3.6.2 releaseArttu Tarkiainen2022-12-2128-43/+190
| | | | | | | | | | | | | | | | | | Release details: https://github.com/libarchive/libarchive/releases/tag/v3.6.2 Change-Id: I288d1019a6aaf713ab535075752209e22efb1cd1 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Optimize metadata validationKatja Marttila2022-12-201-5/+4
| | | | | | | | | | | | | | | | | | | | QFile::open is time consuming operation in Windws. Metadata validation does not need to open the file, it is enough to check that the file exists in the expected location, thus using QFileInfo::exists() instead of QFile::open for metadata validation. Change-Id: Ic1cee9915db2f3359569ad772a4ac619c03f2446 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Fix documentation warningsKatja Marttila2022-12-206-8/+27
| | | | | | | | | | Change-Id: Ia8717933439359e23b65d9465dec8c70fbe59ee2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Adapt to differences in QProcessChristian Stenger2022-12-191-1/+1
| | | | | | | | | | | | | | | | Use the start() function available in Qt5 and Qt6. Task-number: QTIFW-1829 Change-Id: Idab1b18d24ca7fb615a99b297a53495dbf3547c8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Adapt to removal of qMakePair and qVariantFromValueChristian Stenger2022-12-192-5/+5
| | | | | | | | | | | | Task-number: QTIFW-1829 Change-Id: I2291dee3c5bf0f10627f07e71624d7e669737f9a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Fix and shuffle some includesChristian Stenger2022-12-168-6/+16
| | | | | | | | | | | | Task-number: QTIFW-1829 Change-Id: I16025ae23f91849d6317e25e56099c77a37f0cd9 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Adapt to differences between Qt5 and Qt6Christian Stenger2022-12-1610-12/+12
| | | | | | | | | | | | Task-number: QTIFW-1829 Change-Id: Ieae92a7736784784bc548433eda8b073b1a4b8f8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Adapt to changes in QFlagsChristian Stenger2022-12-161-1/+1
| | | | | | | | | | | | Task-number: QTIFW-1829 Change-Id: I13c73f113a74c31dff44247d6931d2a93df40bab Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Adapt to changes in QtConcurrentChristian Stenger2022-12-161-1/+1
| | | | | | | | | | | | Task-number: QTIFW-1829 Change-Id: I4c0128a091ec9ad69f82428cc418d66be90c99b8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Replace foreach which does less magic in Qt6Christian Stenger2022-12-161-1/+2
| | | | | | | | | | | | Task-number: QTIFW-1829 Change-Id: I1669e810e4332d899ce21aa6d9ea751514a1f7f1 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Fix wrong bracesChristian Stenger2022-12-161-1/+1
| | | | | | | | | | | | Task-number: QTIFW-1829 Change-Id: Ice8a649ba21682302246879c788469fac09ba05e Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Adapt to QMutex changesChristian Stenger2022-12-161-3/+2
| | | | | | | | | | | | Task-number: QTIFW-1829 Change-Id: I634a744ad93b9f60052176e389deaf7232df92e1 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Metadatajob: optimize checking for repository updatesArttu Tarkiainen2022-12-163-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Updates.xml files from repositories may contain 'RepositoryUpdate' elements that list actions for existing or new repositories. We need to parse these updates and restart the metadata job if necessary. However this was done by parsing the XML file with the Qt XML modules QDom* classes, which gets expensive as not all of the files contain any repository updates. This is the most time consuming step left in case the cache is fully populated and up-to-date. Instead attempt to make the process faster by filtering out Updates.xml files that do not contain the 'RepositoryUpdate' element with a string search, before properly parsing the files. Change-Id: I87894fdc51f37095e46415a238c9da99624f4f44 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Merge remote-tracking branch 'origin/4.5' into masterKatja Marttila2022-12-1350-409/+561
|\| | | | | | | Change-Id: Id8121e6b4cdda23c8c44cf779e35dce8d9a28090
| * Fix freezing UI while searching componentsArttu Tarkiainen2022-12-122-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This affected maintenance tool, which by default shows multiple header columns for the component tree view. After typing in a search pattern, the component indexes from the tree are expanded based on the matches. The maintenance tool would visibly hang at this point. Measuring with callgrind indicated that the biggest relative cost was at automatically resizing the header sections, which could be done hundreds of times, which is unnesessary because we only need to update the view once all necessary indexes are expanded. Fix by setting the resize modes of the sections temporarily to fixed size, and restore the original modes after the tree view is updated. Task-number: QTIFW-2886 Change-Id: I17547344494818de9e321b3501cf6c3bc550c51e Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Fix documentation warningsKatja Marttila2022-12-125-8/+15
| | | | | | | | | | Change-Id: I934af4574de8a799ebed98376cc7e7bc0b2d6ece Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * Fix version number replacement in package.xml4.5.1Katja Marttila2022-12-082-2/+2
| | | | | | | | | | | | | | | | | | Binarycreator and repogen does not yet replace the placeholders, thus reverting the change where version number is set with placeholder instead of hard coded version number. Change-Id: Iab7e46ef104f194657e1a1c4dd78e55f931d92fb Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * Use altool for notarizing 4.5.1 release contentKatja Marttila2022-12-081-1/+1
| | | | | | | | | | | | | | | | | | Use qtsdk commit ref pointing to change before refactor to notarize.py. We use older macOS version, not supported by notarytool, for building the release content. Change-Id: Ie72248993341d3521b90add477338df592ef1306 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * Fix installer resource writing to admin folderKatja Marttila2022-12-021-2/+2
| | | | | | | | | | | | | | | | Installer tried to create a folder which was already created. Task-number: QTIFW-2890 Change-Id: I2a6e2316c16811ea8a14b14af1c43f913470317f Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * Update ChangelogKatja Marttila2022-12-011-0/+10
| | | | | | | | | | Change-Id: I1d614dede5a7415ba8ac69b287839f39e62349e4 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * Fix replaced removal on updateKatja Marttila2022-12-0111-8/+91
| | | | | | | | | | | | | | | | | | | | 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>
| * Fix user set binary marker not having any effect on maintenance toolArttu Tarkiainen2022-12-013-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TabController would invoke IntroductionPage::onCoreNetworkSettings- Changed() slot, which would disable the UI controls for selecting the package manager or updater mode in case the maintenance tool is configured to use only temporary repositories that are set only later on. This would also update the internal magic marker indicating the binary type, overwriting the user selected one that was passed with one of the --start-* options. Fix by splitting the resetting of the "metadata fetched" state of the page to its own public method from IntroductionPage::onCoreNetwork- SettingsChanged(), and call that from the TabController initialization instead. Task-number: QTIFW-2884 Change-Id: I952b8fd1d14e6292bae1556a5f33dec537c8b1d6 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Cleanup installer calculator classesKatja Marttila2022-11-3012-347/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-258-6/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ExtractOp: fix leftover empty directories when 'targetDir' arg is usedArttu Tarkiainen2022-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the directory passed for the DirectoryGuard object handling the creation of leading directories was missing the target directory itself, instead the path ended to its parent directory. When installer does the undo-step for Extract operation, only empty directories are deleted, so in case any directory from a path is missing from the created directory list, the leading directories won't be also deleted. QFileInfo::absolutePath() returns the path of the parent directory for the given path even if it is a directory, fix by using instead the QFileInfo::absoluteFilePath(), which includes the name after the last directory separator. Task-number: QTIFW-2764 Change-Id: I5b03142b46db566615f4983fa3e2ff2690f25262 Reviewed-by: Katja Marttila <katja.marttila@qt.io> (cherry picked from commit 5b4a085fb67730f387a9f0228dccc2e47d4e87be)
| * Fix errors occurring in full uninstall on macOSKatja Marttila2022-11-258-3/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-243-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Update IFW version number to 4.5.1Katja Marttila2022-11-245-17/+17
| | | | | | | | | | Change-Id: I49debbb435dc59e8dffab4cee21b6bd26b2346fb Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * Execute operation: fix overwritten error string for crashed processesArttu Tarkiainen2022-11-241-20/+19
| | | | | | | | | | | | | | | | | | | | | | When the process exited with QProcessWrapper::CrashExit, the code did accidentally overwrite the associated error string later. The same would have happened if the process could not be started, so fix that also. Task-number: QTIFW-2875 Change-Id: Iae27be913ffa2b3f5dbeaf6db23b95f3a00377e1 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * MetadataJob: fix removing compressed repositories after extractingArttu Tarkiainen2022-11-172-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | In addition to extracting meta.7z archives, the UnzipArchiveTask is used to extract compressed repositories (QBSP). At the end of the task, it removed the archive file uncoditionally, which we don't want to do for the compressed repositories, because the user should be able to use them multiple times at their will. Fix by making the removing conditional, and enable it only for the metadata archives. Task-number: QTIFW-2876 Change-Id: I10d2fd3872bdcd7eb4bbfeddfd1bda3bdaffeb3f Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Update ChangelogArttu Tarkiainen2022-11-101-0/+6
| | | | | | | | | | | | | | | | Some entries were missing from the release. Change-Id: I828f665273061ea2e5f09d81d62eaa5dfa8c53db Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Add test for essential content sha updateKatja Marttila2022-12-1210-7/+86
| | | | | | | | | | | | | | | | | | | | | | Also clearing the foundEssentialUpdate flag in clearAllComponentLists() function so that unit tests core status will match. As the unit tests are not done to fully cleared core the foundEssentialUpdate was set to true although the update was done and other components were installed. Task-number: QTIFW-2732 Change-Id: I9b6754595b4b20b1ddc95d7587d98474a6967add Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>