summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercore_p.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow defining non-checkable itemsKatja Marttila2016-01-181-1/+2
| | | | | | | | | | | 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-10-121-2/+1
|\ | | | | | | Change-Id: Ia4c0c6766b52626798197c646043407df8de1fd6
| * Fix errors when running updates in a directory requiring elevationKai Koehne2015-08-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | isWritable() is not a reliable way to check for permissions on Windows. Instead, just try to create a file. The alternative would be to set the magic qt_ntfs_permission_lookup variable to 1. Anyhow, this might slow down things and cause other regressions ... Task-number: QTIFW-746 Change-Id: I1b5637670bfcfe29966f0545ce2c6b1f663a9738 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Missed to rename classes and to update docs and tests.Karsten Heimrich2015-09-071-4/+4
| | | | | | | | | | Change-Id: I2d79ab4094cb9706287d44160543c19b35a66c95 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* | Rename files. Remove {kd} prefix. Remove {kdupdater} prefix.Karsten Heimrich2015-07-141-3/+3
| | | | | | | | | | Change-Id: I88c93cab718f4659296d5f7f562beefd747a366f Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Make the installation relocatable (with some limitations).Karsten Heimrich2015-07-141-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the install path with a constant that's updated while loading the stored configuration and operation values. Dynamic variables now need to be set after reading the .ini file, cause there we store the values we found during installation. Makes an installation relocatable, though with some limitations: * Uninstaller entry might break on Windows * Start menu sortcuts might break on Windows * Everything else written to the system using full path Task-number: QTIFW-653 Change-Id: Ie3255299460d4ad7f18c88de9044c95db10d17ac Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Remove quotes around component checker warningsKai Koehne2015-07-101-1/+1
| | | | | | | | | | | | | | This was forgotten in b2a65ce68bce4fcd Change-Id: I3731765ffc17879116609b88fb43215fd8aa4cf7 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Make use of the new varadic template feature + cosmetic changes.Karsten Heimrich2015-07-101-1/+0
| | | | | | | | | | | | | | | | Change constructor to take the a package manager argument. Add a package manager member to the operation. Remove setter function. Change-Id: Iffb860e24089beb6496ac4ee479d547a29463728 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Sanitize QDebug outputKai Koehne2015-07-091-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | Prefer using the stream operator logic instead of using QString::fromLatin1. Add a noquote() where a QString should be printed without any quotes/escapes. This also fixes the tests with Qt 5.5, where QString's are further escaped. Change-Id: Ie3afd14b9355101d3c0b52f30f66ec759c76526c Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Add getter and setter for package manager.Karsten Heimrich2015-06-241-1/+1
| | | | | | | | | | | | Change-Id: Iff8ac5fc97f73939e0cbfea21370bb63e94b7782 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Unify translated error messagesKai Koehne2015-06-241-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | Fix missing operation 'installer' value and update documentation.Karsten Heimrich2015-06-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 478a8a1db3eed2 was done under the assumption that after UpdateOperation::fromXml(...) existing values are still set. That is wrong and we have to set the 'installer' value again. The same commit was trying to fix the empty 'installer' value in the operations destructor, though the value got removed in PackageManagerCore::writeMaintenanceToolBinaryData() already. We now skip it once we write out the XML. Change-Id: Ia029ae4583862f4cbc6feb1c757604bf7b042a8f Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Convert to Qt 5 connect syntaxKai Koehne2015-06-151-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | 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-5/+10
| | | | | | | | | | Change-Id: Id304ca857ee1897c35171d6c293774f1d638bc02 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/2.0'"Karsten Heimrich2015-06-041-0/+9
|\ \
| * | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-06-041-0/+9
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/libs/installer/packagemanagercore.cpp Change-Id: Ie3d94fe3a633e189c260bf20682c00a2bb901bc8
| | * Fix maintenance tool upgrade on OSX.Karsten Heimrich2015-06-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before rename we need to delete a possible existing file, otherwise it will fail and the installation is messed up. Change-Id: I6ade434f828f11b38c00b52eabeb1c574557ec5a Reviewed-by: Jonathan Courtois <jonathan.courtois@gmail.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | | Small optimizationJarek Kobus2015-06-041-8/+3
|/ / | | | | | | | | Change-Id: Ia412f036e8285375e2fc2bd3a1eb7e18edd3dbea Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Add constant and make use of it.Karsten Heimrich2015-05-081-1/+1
| | | | | | | | | | | | Change-Id: I3d244f112e39a57dfa769bb6a786f62b607d9b3c Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com> Reviewed-by: Christoph Vogtländer <c.vogtlaender@sigma-surface-science.com>
* | Remove pseudo static core instance, fixes autotests.Karsten Heimrich2015-05-061-7/+3
| | | | | | | | | | | | | | | | | | | | | | 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-28/+28
| | | | | | | | | | Change-Id: I5abb64d356a0951671487b60529a0ca26b0909be Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Replace UpdateSourcesInfo and UpdateSourceInfo classes.Karsten Heimrich2015-05-061-16/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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 issue with accessing install target directory.Karsten Heimrich2015-05-061-24/+24
| | | | | | | | | | | | | | | | | | | | | | In case we run as installer, do not look into the installation target directory to read the package XML file. This needs only be done to get installed packages, read the application name and version to compare updates and online components against. Change-Id: Ie5b82854e41dc2f11ae5668c5839351c2fc52e04 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Rename function name.Karsten Heimrich2015-05-051-1/+1
| | | | | | | | | | | | | | | | The function actually adds the package info to the known installed packages, it does not install them on its own as, the name suggests. Change-Id: I256300497fce04fb1fd74f26dc1d4fa77ba15f41 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Remove (KDUpdater}Application, functionality has been merge.Karsten Heimrich2015-05-051-2/+1
| | | | | | | | | | | | Task-number: QTIFW-215 Change-Id: I7a9215c8c5d5eae0d66d57650f5b8b82dd4d40b4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Take over the last used methods from {KD}Application.Karsten Heimrich2015-05-051-1/+21
| | | | | | | | | | Change-Id: I9aaac261bef7aaa48cf0beaee83e15cc5bccd437 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Move the PackagesInfo handling out of {KDUpdater}Application.Karsten Heimrich2015-05-051-34/+36
| | | | | | | | | | | | | | | | | | Do not hide the class behind {KDUpdater}Application, we can use it directly. Also remove unused code from the PackagesInfo class itself. Change-Id: I6876a5887c498aa20fb54e016159223e336d9362 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Move the UpdateSourcesInfo out of {KDUpdater}Application.Karsten Heimrich2015-05-051-14/+9
| | | | | | | | | | | | | | | | | | Do not hide the class behind {KDUpdater}Application, we can use it directly. Also remove unused code from the UpdateSourcesInfo class itself. Change-Id: I99cc34e9089da63087892d8d3540522e9f59b2c8 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-04-301-1/+2
|\| | | | | | | Change-Id: I2c66fe453db03b833a57a4a400cf859096f81165
| * Enable logging categories as an installer option.Jarek Kobus2015-04-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | Now by default all categories are disabled. They get enabled only in verbose mode. Verbose mode enables all categories by default. Categories can be filtered using logging-rules option. Change-Id: I9324826a6e2d7a746e3d7369747fcd31a42b84b6 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Make componentChecker warnings optional.Jarek Kobus2015-04-221-1/+1
| | | | | | | | | | | | | | | | To enable them export the following environment variable: QT_LOGGING_RULES=ifw.componentChecker=true Change-Id: Ied6744c745ca3fd0840c622c71a8ba30ad22e3d9 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-04-211-4/+5
|\| | | | | | | | | | | | | Conflicts: Changelog Change-Id: Idd7d569f97fba75b05bfc006c7a5b0b9cf8ccf73
| * Move the component checker after installer calculator.Jarek Kobus2015-04-151-4/+5
| | | | | | | | | | | | | | In this way we first check for errors, then check for warnings. Change-Id: I3993498c9c517e7900d789fc0f04c59f9c150e14 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Don't mix iterator and const_iteratorKai Koehne2015-04-081-1/+1
| | | | | | | | | | | | | | | | | | Add QT_STRICT_ITERATORS to disallow implicit conversions between iterator and const_iterator. This avoids potential detaches of the Qt containers. Change-Id: I79d381f531ddda9ac402c6f5c63cdc7c6808a0bd Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-03-171-1/+1
|\| | | | | | | Change-Id: I3b38821be20c02d41d9db1c5eee78be1502cba6b
| * Restore original behavior for component.installationRequestedKai Koehne2015-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | component.installationRequested() should return true also for components that are selected through dependencies (after they have been resolved). This restores the original behavior on 1.6. To keep the change minimal the 'new' behavior has been saved in a method isSelectedForInstallation . This should be further refactored in the master branch. Task-number: QTBUG-633 Change-Id: I2cb936a399927252a4ad4dd81f73683fa3c28a01 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-02-261-17/+48
|\| | | | | | | Change-Id: I962f4f19909c06e1da03c14072b15f97de02a07d
| * Update CopyrightKai Koehne2015-02-181-7/+7
| | | | | | | | | | Change-Id: I8dde6629cfd461104364d5cdc255cb54b58283fa Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
| * Fix could not write installer configuration file.kh2015-02-041-4/+5
| | | | | | | | | | | | | | | | Task-number: QTIFW-621 Change-Id: Iad160efc3c9123476d0fd0d676a0ce751025778a Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Christoph Vogtländer <c.vogtlaender@sigma-surface-science.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * CreateLocalRepository doesn't work on OS X.kh2015-02-041-2/+12
| | | | | | | | | | | | Task-number: QTIFW-622 Change-Id: I0a370801f605a43739ed660afcfe6a4c03f082dc Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Show size in "Programs and Features"Christoph Vogtländer2015-02-031-1/+17
| | | | | | | | | | | | | | | | | | | | | | Add size as quint32 to always create a REG_DWORD. Calculate size based on installed packages and meta data instead of using the installer binary file size. Change-Id: Id379aafe885d2785251eecf831cb7d07cc44f3d4 Task-number: QTIFW-616 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
| * Use a UUID as uninstall registry subkeyChristoph Vogtländer2015-01-231-5/+9
| | | | | | | | | | | | | | Change-Id: I365e3bdf529bed7bff526b772d9dec5260d71ba4 Task-Id: QTIFW-615 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Introduce isMaintainer() methodjkobus2015-01-261-1/+1
|/ | | | | | | Prepare for unification of updater and packageManager. Change-Id: Iac9ac109ac5e6cf1309d5739ecee03bdfb1e2934 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* no longer use Version as the repository format versionChristoph Vogtländer2015-01-201-6/+7
| | | | | | | | | | | | Use the Version value defined in config.xml as the product version exclusively instead of sometimes using it as the repository format version in components.xml (which must be 1.0.0) and sometimes as the product version. Change-Id: I63864947bf131ac6e246a2aaf6febdda0555c13d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Delete components only after they have been removed from the listsKai Koehne2015-01-201-4/+6
| | | | | | | | | | | | | | This fixes a crash when a component destructor e.g. tries to unregister a widget: This might lead to the creation of a new scripting engine, which then tries to register all components into the engine, including components that have already been deleted ... Avoid this by first cleaning the lists, and then doing the actual deletion. Task-number: QTIFW-612 Change-Id: I708a1ade3b3cc15006eefe394c2d81bf47ebe754 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Introduce InstallAction property for componentjkobus2015-01-191-1/+3
| | | | | | | | | | Fixes calculation of component size inside maintenance tool. Don't manipulate check state of components while calculating dependencies. Prepare feature: live preview of dependencies. Change-Id: I0485df8383bc9149a996456e09878fc5676bb27b Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Add ComponentChecker class for verifying the internal state.jkobus2014-12-011-0/+5
| | | | | Change-Id: I3361ad6c51d5a0f3beee049237e6b370d57a8f0d Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Implement a way to start the server in debug mode and API cleanup.kh2014-11-261-12/+0
| | | | | | | | | | | | 1; Passing debug as first argument to the starting server does not start the server side so the server keeps running in an endless loop. This makes it far easier to attach a debugger. 2; API cleanup and unify init function to take port, key, and mode. The address was never able to be changed anyway, so stop passing them around. Change-Id: I2a847f009ed1557a5e136e2b0006de5c62426da2 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Fix crash experienced while closing the application.kh2014-11-241-2/+0
| | | | | | | | | | | | Signal the keep alive object that we are going to shutdown. This needs to be done because the parent object is a global static and the order of destruction is unknown. The revised code of KeepAliveObject::start() method fixes one of several warnings ("QSocketNotifier: socket notifiers cannot be {enabled/disabled} from another thread"). Change-Id: I68e2d507e697a5d94bdc73f016601affc9913846 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Use written localhost address, adapt code.kh2014-11-241-1/+2
| | | | | | | | | Use the default address throughout the whole code. Instead of relying on the QHostAddress::SpecialAddress enum, use the full qualified and more descriptive address of localhost. Change-Id: I64b3459245682532f84306703e29ac276d4e468d Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>