summaryrefslogtreecommitdiffstats
path: root/src/libs/kdtools
Commit message (Collapse)AuthorAgeFilesLines
* Cppcheck: Fix local variable shadowing outer variableKatja Marttila2021-03-091-4/+4
| | | | | Change-Id: Idff9a40c5089b4de7b8afd1c280603601317beda Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Cppcheck: Add explicit and override keywordsKatja Marttila2021-03-092-4/+4
| | | | | Change-Id: Ia8305652afdf29cbc88328b76f5156187aa54dba Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Cppcheck: Move member initialization from constructor body to initialization ↵Katja Marttila2021-03-091-7/+8
| | | | | | | list Change-Id: I5bb8c8f81a391abc5cdfdf5a0c7a68bb5edcec89 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Cppcheck: Initialize uninitialized member variablesKatja Marttila2021-03-033-1/+3
| | | | | Change-Id: I38c52e2412f50e0aba41876112a66956b9de2920 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add alternative way to update components from repositoryKatja Marttila2021-03-032-2/+10
| | | | | | | | | | | | | | Components can be updated from online repository using version number. Sometimes there is a need to update to an older version which is now possible by using content sha. Content sha can be added to repository with repogen --sha-update <component_id>. If there is a new content sha available in the repository, component is updated although it version number might be smaller. After the content sha is removed from online repository, the normal update with version number is performed. Task-number: QTIFW-1798 Change-Id: Id9e32b0345af5101cccaf6e30c81bd39691d9590 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Documentation fixesKatja Marttila2021-02-192-0/+13
| | | | | | Change-Id: Ibb8da857319eff6119b0296375b6c38578729559 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Add possibility to move component in component treeKatja Marttila2021-02-112-2/+9
| | | | | | | | | | | | Setting <TreeName> -tag to component.xml will overwrite the default location of component in installer's tree view. This way we can define the component location without a complete repo build. Updates.xml can be directly modified by adding <TreeName> -tag for easy relocation of components. TreeName must be an unique name - it cannot conflict with existing tree name or name. Task-number: QTIFW-594 Change-Id: Ie69f90f1303d932369d566d0d7b4bc0e354505c6 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Try rerunning execute operationKatja Marttila2021-02-051-0/+6
| | | | | | | | | | | | | Execute operation can have hard coded paths to program which is executed. In case the program is relocated, UNDO operation will fail as it will not find the program. Implemented new XXXX_OLD value which can be used for overwriting the hardcoded value. In case the program execution fails, program is tried to launch again with the replaced value. Task-number: QTIFW-2125 Change-Id: I446a4c423e53cc4ffc6e5e25617d2400945ac3d9 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Provide missing documentation for functionsKatja Marttila2021-02-042-0/+20
| | | | | | Change-Id: I2fe4f6bfc6a31291900d0005550c419cf6582fac Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Restructure logging utilitiesArttu Tarkiainen2021-02-041-1/+3
| | | | | | | | | | | | | | Create a singleton-pattern class as an encapsulation unit for holding and altering the state of debug printing attributes. Move related code from various places under a single umbrella header file for logging utilities, with some minor stylistic changes & cleanup. This acts as a preparatory change for providing non-blocking headless CLI runs when there is no TTY attached - that will be fixed in a follow-up change. Change-Id: Ib7f72cf75362c3ea6713058e92eda997d6df55c3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Save Execute operation with predefined variableKatja Marttila2021-02-032-0/+23
| | | | | | | | | | | When operations are saved to dat file, the variables are resolved making it impossible to change it afterwards. This change allows saving the Execute -operation variables unresolved. Variables are resolved runtime so those can be changed using e.g. script. Task-number: QTIFW-2124 Change-Id: I22a0502a5760234fc331aa931b8c66864e855e34 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Allow disabling undo of GlobalSettings during uninstallKatja Marttila2020-12-302-1/+35
| | | | | | Task-number: QTIFW-1973 Change-Id: I89f15c8ed7d56c3e1bc72d3c740e9054363f9390 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add option to define operations in component.xmlKatja Marttila2020-12-072-0/+32
| | | | | | | | | | | Operations can from now on be declared also in component.xml. The operations are performed, backuped and rollbacked the same way as they would be when defined from scripting api. Task-number: QTIFW-507 Change-Id: Ia509219b94737136c3de25db0cb0c72076b48380 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Merge remote-tracking branch 'origin/4.0' into masterKatja Marttila2020-11-242-5/+9
|\ | | | | | | Change-Id: If5205ff6ef2c8989520e24d41595c04d5920d207
| * Fix AppendFile undoKatja Marttila2020-11-111-0/+4
| | | | | | | | | | | | | | | | | | | | If Appendfile is done to a file in an install folder, the backup file name folder name is saved as @RELOCATABLE_PATH@. Replace the variable with actual folder when the value is read. Task-number: QTIFW-2020 Change-Id: Ibe32f9afd53fd9698c0acc14de62a641d0dd89c4 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
| * Fix segfault on file download error properlyMartin Kampas2020-11-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | The onError function destroys instances required later during the error message construction. This improves over the fix introduced with commit 6a93f37440a3dcc72bb5e496dac90a8f95d63eab. Change-Id: I54c4064eb225d3e3913ce5073706a5ce5717d234 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Arrange licenses and filter duplicatesJarkko Lehtoranta2020-11-061-2/+7
| | | | | | | | | | | | | | | | | | | | | | - Add a "priority" attribute to the "License" element used in "package.xml" for arranging licenses by priority in the LicenseAgreementPage and in CLI. Priority >0 shows the license on top of others. - Arrange the licenses with the same priority alphabetically - Filter duplicate licenses from the LicenseAgreementPage and from CLI Change-Id: I1dcacdd417d2383b8dc18149e4de329fbf11cfe8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | CLI: Print extra archive information with higher verbosity levelArttu Tarkiainen2020-11-051-1/+4
|/ | | | | | | | | | Also rework verbosity level handling to use predefined and range constrained enumeration list values. Task-number: QTIFW-1998 Change-Id: Iaf15ca638411e6842d3d502c4d7ff11d28d06658 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Don't warn if maintenance tool cannot be deletedKatja Marttila2020-10-151-4/+20
| | | | | | | | | We have a deferred delete for maintenance tool as in Windows the running program cannot be deleted. Task-number: QTIFW-1979 Change-Id: I3bfd98dd1d476450b9b770c9b2f1c70810e67492 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add missing const parameter referencesKatja Marttila2020-10-051-1/+1
| | | | | | | Results from cppcheck analyzer tool Change-Id: Ib76a53728d2774f5e7ec884e1b98d6bf98d20b21 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Doc: Remove internal classes and structs from generated documentationArttu Tarkiainen2020-09-211-0/+42
| | | | | | | | | | After migration to using 5.12.7 based qdoc, the generated documentation contains also empty declarations for members of undocumented internal classes. Mark them internal as needed. Task-number: QTIFW-1483 Change-Id: Iad40e4efdd098f09a825ce1c8d0aafcc76bd83bf Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Doc: Reduce the amount of documentation warningsArttu Tarkiainen2020-09-214-1/+64
| | | | | | | | | | | | Miscellaneous fixes to missing function documentation, undocumented parameters, namespace scope etc. As 5.12.7 based qdoc gives a lot more warnings about code missing documentation, mark undocumented implementation details with \internal command. Also some spelling fixes to related parts of documentation. Task-number: QTIFW-1483 Change-Id: Ibf5d1e5098713acbd152c5b61ea4f46cc11feb4b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Doc: Fix documentation warningsTopi Reinio2020-09-166-38/+38
| | | | | | | | | These changes fix many of the documentation warnings when building with a recent version of (Clang-integrated) QDoc. Change-Id: I5714635a25707cd7ab7bec209fa043a95f0b9832 Reviewed-by: Katja Marttila <katja.marttila@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Add verbose levels and cleanup log categoriesKatja Marttila2020-08-245-14/+14
| | | | | | | | | Setting several verbose switches enables more logging and performs component checking. Also cleanup some logging categories and unify the rules. Task-number: QTIFW-1914 Change-Id: I9195f4bb02affaa87e66cf9023a3512e65e0645b Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add possibility to auto accept or reject IFW queries from CLIKatja Marttila2020-04-151-1/+1
| | | | | | | | | | | | | | | Added new command line switches accept-messages and reject-messages to automatically accept or reject installer message queries. Also removed Retry option in CLI when archive or hash download failed. With GUI it is possible to try Retry in case either is missing but without GUI Retry will cause infinite loop. Added unit tests for accept-messages and reject-messages using CLI. Task-number: QTIFW-1736 Change-Id: Ie87d2d8157be772b790415c96e5b94fc882d4be7 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix license check failuresSimo Fält2020-02-282-24/+34
| | | | | Change-Id: I123b1c6a06717c37387a636aae8296e27c1df8c0 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* CLI: decrease the amount of default debug printsKatja Marttila2020-02-203-4/+4
| | | | | | | | | | Debug prints can be suppressed or extended with logging rules. Make the default usage so that only relevant information will be shown to user, such as uninstall/install progress, server information, warning messages and package name, version and displayname. Change-Id: I09be754a36dd97530d75cdea3edb5fc77e67a856 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Use of QLoggingCategoryKatja Marttila2020-02-137-28/+36
| | | | | | | | The change enables easier filtering of log messages Change-Id: I769f7c163e20f34c37fa0fe2b0729867ffca5bcb Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Documentation fixesKatja Marttila2019-12-172-6/+17
| | | | | Change-Id: Ibffb5470d374c8d612791f48c951deddd00f3121 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Refactor setting and checking of file permissionsArttu Tarkiainen2019-08-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | Create methods to explicitly set default file permissions on Unix platforms, use these on installer created files and installation target directory. Add unit test for introduced functions. Remove method introduced in 46aecc23b2983c807ff2232ae9cb9651b4d2fdc2 as the same effect is achieved more efficiently by ensuring target directory will be written with explicit permissions on initial installation. Unlike the removed method, this will also not break if an installed component contains owner non-writable directories. Further simplify PackageManagerCore::directoryWritable() introduced in 89f772f819178ee2502768c3d259d22ecb910fbe. Remove orphan unit test for removed PackageManagerCore::subdirectoriesWritable(). This does not change permissions of files and directories extracted for installed components. Task-number: QTIFW-1412 Change-Id: I59698c78aceef874b1f79482bff5a618b9a1b536 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update usage of Apple-related terminologyArttu Tarkiainen2019-08-161-1/+1
| | | | | | | | | | | Replace deprecated Q_OS_OSX macro used in several places with the newer Q_OS_MACOS. Old style reference of Apple's desktop operating system name as "OS X" in documentation and files are also replaced with "macOS" where applicable. Task-number: QTIFW-1406 Change-Id: I0561d5e0d964917ac4fca0702d58a06b85d30e57 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix update with long version numbersKatja Marttila2019-03-251-5/+5
| | | | | | | | | | Update fails if version number is longer than 32bit int. Fixed so that the value is converted to 64bit int instead so the int overflow will not happen. Change-Id: If7ab57e89b155793e9fab3ba5dad9c734adc2234 Fixes: QTIFW-1310 Reviewed-by: Konstantin Podsvirov <konstantin@podsvirov.pro> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Fix tmp file removalKatja Marttila2019-01-222-15/+0
| | | | | | | | | | | | | | | Tmp files were not removed when all or these were met: 1. Using Linux 2. Installing to a folder which needs authorization 3. Installing a component which has no metadata Tmp 'remoterepo-XXXXXX' is created before acquiring authorization. In previous version if above list was met, a tmp folder was created inside remoterepo-XXXXX after authorization leading to permission error when deleting the folder. Task-id: QTIFW-1268 Change-Id: I937fe3ce13440c817d1264c80ad060dfc966e456 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-06-062-0/+14
|\ | | | | | | Change-Id: Ia00c88061f15fc9c9517b536609ac3260c0df2ef
| * Decrease metadata dowload amountKatja Marttila2018-06-012-0/+14
| | | | | | | | | | | | | | | | | | | | If there are no Script, Translations, Licenses nor UserInterfaces -tags in Updates.xml, there is no metadata. In such case, do not download the empty metadata to decrease the time used in downloading metadata. Task-number: QTIFW-975 Change-Id: I1b81a07b5ad43677e190fb058ece8b06382d215b Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-03-201-1/+1
|\| | | | | | | Change-Id: I601b783a9d2eed009737b2779803457949cbb014
| * Fix infinite wait if downloadable package is missingKatja Marttila2018-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | Instead of waiting for a package that is missing, show error message and abort installation Task-number: QTIFW-1064 Change-Id: I021e7ece9e4020a85380318185cdb6a424dc26fa Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-02-261-0/+7
|\| | | | | | | Change-Id: Ic74ee1485204e09e2baa384468b581ba0d9c79cd
| * Fix Mkdir operation in uninstallKatja Marttila2018-02-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | If Mkdir generates directories to target dir, then uninstall will fail to remove those as targetDir is replaced with @RELOCATABLE_PATH@ when the operations are written to dat file. Fixed so that @RELOCATABLE_PATH@ is replaced with targetDir. Task-number: QTIFW-1099 Change-Id: I52a0330a2645e2d4a5371ce0d6f1fb296878752f Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/3.0' into masterKatja Marttila2018-02-083-23/+226
|\| | | | | | | Change-Id: I8d0c8b9faa9537b50e989ec264ed7bfe8d2e358b
| * Avoid another null pointer dereferenceVille Voutilainen2017-12-121-1/+1
| | | | | | | | | | | | Task-number: QTIFW-1064 Change-Id: I053071292ef8786f6d829b57e45091e881ce3d4d Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Do not retry a download immediately after an errorVille Voutilainen2017-12-121-2/+1
| | | | | | | | | | Change-Id: I1751b5274b3f2f6c69482d98c8beb2c1ef77ae70 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Fix crash when httpReadyRead is signaled after shutdownVille Voutilainen2017-12-111-0/+2
| | | | | | | | | | | | Task-number: QTIFW-1064 Change-Id: Id300f5838fb5f7e72a5e77415ac1832faa2d7c84 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Implement package download resumeVille Voutilainen2017-11-033-23/+225
| | | | | | | | | | | | | | | | | | This doesn't implement a resume for checksum files and resource files; there's no pressing need for those. Task-number: QTIFW-5 Change-Id: Id14a3d9b46f2e16a15f52ae536d060d505b2f4f0 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Enable expanding items by defaultRiho Pihlak2018-01-032-2/+11
| | | | | | | | | | | | | | | | | | | | An item can be expanded by default in component tree by setting ExpandedByDefault to true in package.xml file. Change-Id: Ib324327cf6ef6e2dda3271e704f3ced523c6579c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Allow comparing non-numeric versionsKonstantin Podsvirov2017-11-131-14/+42
|/ | | | | | | | | | | | Changes: - Improve KDUpdater::compareVersion method; - Add tst_CompareVersion test. Task-number: QTIFW-948 Change-Id: If64f807cfb04e56d2bdd5fa250f456631df3f239 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Merge remote-tracking branch 'origin/2.0' into 3.0Katja Marttila2017-08-211-0/+7
|\ | | | | | | | | | | | | | | Conflicts: src/libs/installer/downloadfiletask.cpp src/sdk/translations/ru.ts Change-Id: Ibce8b9592c98cec5af3521f4ae6f850c2b8f45ac
| * Fix translation contexts in classes not derived from qobject2.0Sergey Belyashov2017-08-211-0/+7
| | | | | | | | | | | | Change-Id: I0afbc19a27179b0646564cbb195683279175e98c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Add progressbar to indicate unzip job is proceedingKatja Marttila2017-05-102-3/+2
| | | | | | | | | | | | | | | | | | | | | | When a big compressed package is unzipped, it seemed that the installer hanged as there was no indication that the job is still ongoing. Added undetermined state to progress bar as unzip job does not inform the progress state. Task-number: QTIFW-967 Change-Id: I21ca394e1856038c51413f9e5011307ae7a9850a Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/2.0' into 3.0Katja Marttila2017-03-302-0/+2
|\| | | | | | | | | | | | | Conflicts: src/libs/installer/downloadfiletask.cpp Change-Id: Ie4b07c402a63c7a12ecf24e52e197507bbb2c5df