summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/component.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Don't call toLower() when using the lang for finding the license fileAndy Shaw2021-01-141-1/+1
| | | | | | | | | By calling toLower() it will go against what the expected format is for a language such as zh-CN and as a result not find the license file which is matching this language. Change-Id: Ibdf7d57d3d2761db7b68edcabf5599b9404f3b7e Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix essential updateKatja Marttila2020-10-091-3/+6
| | | | | | | | | When updating essential, no other components should be installed nor updated unless there is autodepend on the essential component. Task-number: QTIFW-1970 Change-Id: If9edd6515e3e5ec51611ac07ac52b13f05983b9d 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: Fix documentation warningsTopi Reinio2020-09-161-21/+21
| | | | | | | | | 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>
* Obey --no-default-installations when default set from scriptKatja Marttila2020-09-091-6/+3
| | | | | | Task-number: QTIFW-1930 Change-Id: Ie180777a0c5dc7c6a7b4e273169e673cd5c7e918 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Allow disabling translation features with environment variableArttu Tarkiainen2020-08-261-2/+2
| | | | | | | | | | 'IFW_DISABLE_TRANSLATIONS' can be used to disable translation features with a value of '1', '0' or any other values are ignored. The variable is evaluated at the time of running qmake. Task-number: QTIFW-1911 Change-Id: I99c472eae4229b8add109fcf7f764f670909231d Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add verbose levels and cleanup log categoriesKatja Marttila2020-08-241-4/+3
| | | | | | | | | 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 new no-default-installations optionKatja Marttila2020-05-261-2/+7
| | | | | | | | | | | | This option can be used both from CLI and from GUI. Option will overwrite Default true in component.xml, which means that in GUI the components are not selected by default, and in CLI the components are not installed unless those are given as argument to install -command. Task-number:QTIFW-1630 Change-Id: I5dc16b14fc136f421980a55bb5fc6a74213309dc Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Give meaningful default value to messagebox queriesKatja Marttila2020-04-161-1/+1
| | | | | | | | | | | | | | If error occurs in install phase, change the default button to be cancel/ignore etc. to avoid inifinite loop when installing with CLI. When using GUI, default button is highlighted but user can choose otherwise. When using CLI the default button is always chosen if user don't give option to overwrite the default button values from command line. Task-number: QTIFW-1737 Change-Id: I721636d5a23e22ad5eee73b84e250e90eb1a6004 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Merge remote-tracking branch 'origin/3.2' to masterKatja Marttila2020-03-161-1/+5
|\ | | | | | | Change-Id: Ia4cf718409ce431cce8d766865ecec506426afb9
| * Fix incorrect ScriptLoadingFailed enumerator scope resolutionArttu Tarkiainen2020-03-021-1/+1
| | | | | | | | | | | | | | This was causing problems while building with msvc2013. Change-Id: Idd6b3b4c55d2cedb946b22db75d95222d37fe64b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Fix building against Qt 5.14 and newerJoni Poikelin2020-02-031-0/+4
| | | | | | | | | | | | | | Fixes: QTIFW-1526 Change-Id: I085dd8b2818f26058432d165a1250b3ac67e1dda Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | CLI: decrease the amount of default debug printsKatja Marttila2020-02-201-2/+2
| | | | | | | | | | | | | | | | | | | | 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-131-3/+4
|/ | | | | | | | 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-171-5/+42
| | | | | Change-Id: Ibffb5470d374c8d612791f48c951deddd00f3121 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Fix essential package updateKatja Marttila2019-10-111-0/+12
| | | | | | | | | | | | | | If there was essential update available and autodependency to already installed packages, the component containing autodependency was installed. If there was a Replaces at the same time, the Replaces was ignored. If there is an essential update, no other components should be installed nor updated except essentials and the components that have autodependency to essential component. Task-number: QTIFW-1215 Change-Id: Ib782335f98b6af6ec546aeecb9b032cf84254256 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Add signal to inform about unstable componentsKatja Marttila2018-09-271-3/+5
| | | | | | Task-number: QTIFW-1197 Change-Id: If9d7941f4c7bfc478daa83dcd73dfa71c9163561 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Fix select state for unstable componentsKatja Marttila2018-06-011-2/+10
| | | | | | | | | | In updater mode, unstable components needs to be unselected so that those won't be updated. In packagemanager mode, installed unstable components needs to be in checked state so that those won't be uninstalled. Change-Id: Ib3d16ae8c0eec4e07731a0082c02fd710ffdb9d6 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Add attribute to mark parts of install tree unstableKatja Marttila2018-04-051-5/+66
| | | | | | | | | | | | This commit adds new AllowUnstableComponents configuration. Setting AllowUnstablecomponents to true in config.xml will * allow installing other components when there are errors in scripts * allow installing other components when there are missing dependencies * will mark the 'broken' components uninstallable in treeview Task-number: QTIFW-930 Change-Id: I8d28cf9c4b0401e0bb76795e87d581f39b64f128 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Enable expanding items by defaultRiho Pihlak2018-01-031-0/+5
| | | | | | | | | | 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>
* Add Component::addAutoDependOn methodKonstantin Podsvirov2017-10-301-0/+16
| | | | | | | | | | Changes: - Add addAutoDependOn method to Component class; - Add method documentation; - Improve tst_Solver test. Change-Id: I5ed62368d62567f1056e20d89ba03c2639e0eaee Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Merge remote-tracking branch 'origin/2.0' into 3.0Katja Marttila2017-03-301-0/+1
|\ | | | | | | | | | | | | Conflicts: src/libs/installer/downloadfiletask.cpp Change-Id: Ie4b07c402a63c7a12ecf24e52e197507bbb2c5df
| * QRegExp include cleanupSamuel Gaist2017-03-131-0/+1
| | | | | | | | | | | | | | This patch adds the missing include statements for QRegExp. Change-Id: I05fed3e83514af895b95a3df746b0ae1e6b31828 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Make installer to check the dependency versionKatja Marttila2017-03-231-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Installer was able to install dependency correctly. However, it ignored the version dependency might have. Dependencies>componentA->=4.0</Dependencies> If there was already a dependency installed with lower version number, the newer version, which was required by the selected component, was not installed. Fixed so that maintenancetool will not only check if the dependency is installed but also the installed version. Change-Id: Ia26b5233cf8847bce73095d19a13c481318d27f2 Task-number: QTIFW-914 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Merge remote-tracking branch 'origin/2.0'Katja Marttila2017-01-301-17/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Changelog dist/config/config.xml dist/packages/org.qtproject.ifw.binaries/meta/package.xml dist/packages/org.qtproject.ifw/meta/package.xml installerfw.pri src/libs/installer/lib7z_create.h src/libs/kdtools/kdgenericfactory.cpp src/libs/kdtools/kdgenericfactory.h src/libs/kdtools/kdupdaterapplication.cpp src/libs/kdtools/kdupdaterapplication.h src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp src/libs/kdtools/kdupdaterupdatesourcesinfo.h src/libs/kdtools/localpackagehub.cpp src/libs/kdtools/localpackagehub.h src/libs/kdtools/updatefinder.cpp src/libs/kdtools/updatefinder.h tools/binarycreator/resources/mkdmg.sh Change-Id: Iab2513f549832d2e750e77131c673457ab265af4
| * License header update to GPL-EXCEPTKatja Marttila2017-01-261-17/+12
| | | | | | | | | | Change-Id: I6426c4e8f932cf26c6c638dec18d0c12e22972d1 Reviewed-by: Janne Anttila <janne.anttila@theqtcompany.com>
| * Doc: Describe return values for boolean Component functionsLeena Miettinen2016-05-131-2/+11
| | | | | | | | | | | | | | ...to suppress QDoc warnings. Change-Id: Ib79b0392efaed37b4a52932d4f7d98327a3ad306 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Revert "Use QQmlV4Function to correctly get empty parameters from script."Katja Marttila2016-02-171-48/+31
| | | | | | | | | | | | | | | | | | | | | | This reverts commit eb574d77b0ab9a92b61e7738d089cd4ea4304e51. The change will not work with Qt5.5 as it is causing constant crashes in Qt installers. Using this change will require a fix for Qt5. As we are about to make Qt installers based on 2.0 we need to revert this change for now. Change-Id: Ia7906d02db645f2407ab07d14f5a037224574b29 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| * Compile with Qt 5.5, 5.6. Minimum version is now 5.5.Karsten Heimrich2016-01-211-2/+2
| | | | | | | | | | Change-Id: I60d248ea38e8176e18a9b2a642e81a0ad5fb21d3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Fix qml includeKatja2016-06-011-1/+1
| | | | | | | | | | | | | | | | This is needed for QV4::Object usage. Missing include was causing compile errors in Qt5.7. Change-Id: Idf9cc6dafedb54be4cb02f12176b31c794b592fa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Compilation fix for QV4 usageIikka Eklund2016-01-211-2/+2
| | | | | | | | | | | | | | | | asObject() is deprecated so use as<QV4::Object>() instead. Change-Id: Ib0ea08a69e1c806a6c76d10a92c0280cb0bed153 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Iikka Eklund2016-01-201-35/+52
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: installerfw.pri src/libs/kdtools/kdgenericfactory.cpp src/libs/kdtools/kdgenericfactory.h src/libs/kdtools/kdupdaterapplication.cpp src/libs/kdtools/kdupdaterapplication.h src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp src/libs/kdtools/kdupdaterupdatesourcesinfo.h sync.profile Change-Id: Ifdc8b065f89b7e241bd3788ed79768e21888161f
| * Update license headersIikka Eklund2015-12-291-4/+3
| | | | | | | | | | | | | | | | | | Update existing license headers. LGPL -> LGPLv21. Update copyright year as well. Change-Id: Ie1d71f8c68186b8f625f409ddf94691f178093c9 Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
| * Use QQmlV4Function to correctly get empty parameters from script.Karsten Heimrich2015-11-261-31/+49
| | | | | | | | | | | | | | | | | | By using QQmlV4Function to get the parameters, empty strings passed are correctly kept as empty and not null. Task-number: QTIFW-724 Change-Id: I592e2230e574ba82e765bd0079964db29452b2e9 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Allow defining non-checkable itemsKatja Marttila2016-01-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | This change will introduce new element 'Checkable' for package. Setting checkable to false will hide checkbox. Useful if use case is to install one sub item instead of all sub items. Change-Id: I8c731e77353b6da539dddcecdc8495b28ef5f7ea Task-number: QTIFW-773 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-08-191-14/+24
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Changelog dist/config/config.xml dist/packages/org.qtproject.ifw.binaries/meta/package.xml dist/packages/org.qtproject.ifw/meta/package.xml installerfw.pri src/libs/installer/component.cpp src/libs/kdtools/updatesinfo.cpp Change-Id: I0a1b4a464f7d9008b589b54dd7aed0cac71bd666
| * Unify handling of translationsKai Koehne2015-06-301-14/+24
| | | | | | | | | | | | | | | | | | | | | | Mimic the logic implemented in installerbase/QTranslator::load() by - using QLocale().uiLanguages() - splitting up the locales into candidates (first en-US, then en ...) - implicitly assuming the default is English Task-number: QTIFW-390 Change-Id: I294288d5fc739ebf12c93a0e1a43d613b3834721 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Rename files. Remove {kd} prefix. Remove {kdupdater} prefix.Karsten Heimrich2015-07-141-1/+1
| | | | | | | | | | Change-Id: I88c93cab718f4659296d5f7f562beefd747a366f Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Unify translated error messagesKai Koehne2015-06-241-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | * Enclose file paths in "" * Localize file paths with QDir::toNativeSeparators. * Make sure sentences end with a '.' * Append error details always by ':', e.g. tr("Failed to copy file '%1': %2").(...) * Use 'directory' instead of 'folder' everywhere Change-Id: Ie045f429f72ad5045c96537465c5fb9d2e99d250 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Convert to Qt 5 connect syntaxKai Koehne2015-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Convert to new signal/slot syntax where it does not make things more complicated: connections where the signal or slot is an overloaded method, or where the receiver method is not in a QObject, are left alone. The new syntax allows compile-time checking of the connection. Change-Id: I2cc3c93b9812797bd67f64a8728569491eeec668 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Store AutoDependOn inside components.xmlJarek Kobus2015-06-051-10/+2
| | | | | | | | | | Change-Id: Id304ca857ee1897c35171d6c293774f1d638bc02 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Reuse existing structures inside Update class.Jarek Kobus2015-06-051-1/+1
| | | | | | | | | | Change-Id: I481b0129c5263da4969053d658e30fb671acf74e Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-06-041-40/+56
|\| | | | | | | | | | | | | Conflicts: src/libs/installer/packagemanagercore.cpp Change-Id: Ie3d94fe3a633e189c260bf20682c00a2bb901bc8
| * Remove leftover. (signal and documentation)Karsten Heimrich2015-05-261-8/+0
| | | | | | | | | | | | | | Change-Id: Ib735d8e7103ade0a9c31fa3d710542cafae3c8f2 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Doc: link from C++ API ref to scripting API refLeena Miettinen2015-05-081-34/+58
| | | | | | | | | | | | | | | | Remove duplicated text where possible, and unify the text if it is needed in both files (by QDoc). Change-Id: If0c62a4a4abf6c1f61fd24f7947b9bc9bfb14f63 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Remove scRemoteVersion, it's the same as scVersionJarek Kobus2015-05-071-2/+2
| | | | | | | | | | Change-Id: I552b2f62865ff88fb6827819240b283485d0e4c7 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Remove pseudo static core instance, fixes autotests.Karsten Heimrich2015-05-061-5/+4
| | | | | | | | | | | | | | | | | | | | | | We need the core engine in operations anyway, so pass the pointer to the create function instead of setting it on our own after the operation was created. The only reason to introduce the static was the ~UpdateOperation() destructor, which now can get the value from its internal data instead of using the static instance call. Change-Id: Ide27542837355ec8c642a6687ca02977983f84fa Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Rename classes to reflect their use. Remove typedef.Karsten Heimrich2015-05-061-1/+1
| | | | | | | | | | Change-Id: I5abb64d356a0951671487b60529a0ca26b0909be Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Replace UpdateSourcesInfo and UpdateSourceInfo classes.Karsten Heimrich2015-05-061-1/+0
|/ | | | | | | | | | | | Introduce a new struct PackageInfo, which is similar to the removed UpdateSourceInfo struct. The new struct name reflects the actual use better, as we deal with package here (either packages to install or updates to apply) and not updates only. Also remove the container class UpdateSourcesInfo, we can simple reuse a existing Qt container here. Adjust all occurrences that use/ used the classes. Change-Id: I526e24cbf1664f0ab0ad18153f60c2c10b6909d8 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Fix dubious warning about RequiresAdminRights tag.kh12015-04-271-5/+0
| | | | | | | | | | | | | The tag was added once component script is parsed and we did know that addElevatedOperation is called from script. However, the initial commit 7ccd0acdcf35b957e9e7d04cd81902bac362ad04 did not append the node to the parent package update node. Now we decided to have the option statically and declarative available, so we can remove the warning. Task-number: QTIFW-670 Change-Id: I8cd8f702391d7bf80fc4c42074e1fd6d2d4abc57 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>