summaryrefslogtreecommitdiffstats
path: root/src/libs/kdtools
Commit message (Collapse)AuthorAgeFilesLines
...
* | Implement generic factory using c++11 variadic template feature.Karsten Heimrich2015-06-254-163/+30
| | | | | | | | | | | | Change-Id: I65bbb82ef1bd8c1a94100b583f504a86d64015de Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Add getter and setter for package manager.Karsten Heimrich2015-06-243-3/+19
| | | | | | | | | | | | 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-2410-64/+97
| | | | | | | | | | | | | | | | | | | | | | | | * 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-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-153-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add method to lookup if a product is registered in the factory.Karsten Heimrich2015-06-102-0/+11
| | | | | | | | | | | | | | | | Make use of the new method to search for registered operations. Note: commit 81ad56fdd0afe3baf84ad1fb removed a similar method. Change-Id: Ie698020dae51c9fca962b99333e405a5db342045 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Fix compilation error in testsKai Koehne2015-06-092-1/+3
| | | | | | | | | | | | | | | | | | Commit 947e85b47c caused QDomElement to be referenced in the headers included by the testcases. Rather forward declare it to avoid having to add QT += xml to all tests. Change-Id: I85427efb5d76eea7b086382ff2dbe823faeecdad Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Store AutoDependOn inside components.xmlJarek Kobus2015-06-052-27/+41
| | | | | | | | | | Change-Id: Id304ca857ee1897c35171d6c293774f1d638bc02 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Reuse existing structures inside Update class.Jarek Kobus2015-06-053-35/+15
| | | | | | | | | | Change-Id: I481b0129c5263da4969053d658e30fb671acf74e Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Implemented xml:lang attribute support for DisplayName tag.Dmitry Mordvinov2015-05-082-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Components in tree view are often need to be localized. Therefore packages.xml syntax is extended with possibility to specify xml:lang attribute for DisplayName tag (similarly to Description one). Test data extended with root component localization. Added new testcase that changes default locale and checks that loaded component names correspond to hard-coded ones. Docs updated with new feature description. Change-Id: Ic330c3c6684e763eb48a2e99e71784913544e686 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Remove pseudo static core instance, fixes autotests.Karsten Heimrich2015-05-063-5/+19
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Use QMap instead of QHash to keep the stored order on disk.Karsten Heimrich2015-05-062-22/+18
| | | | | | | | | | | | | | Some minor other changes as suggested by Jarek on cd75e52e. Change-Id: I39ad5335c0ea19821c98fa3c575a3405f2ebcda7 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Rename the files to match the class name.Karsten Heimrich2015-05-064-4/+4
| | | | | | | | | | Change-Id: I018445cbfc1d9278c549f3f56145dd12c4921000 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Rename classes to reflect their use. Remove typedef.Karsten Heimrich2015-05-064-63/+74
| | | | | | | | | | Change-Id: I5abb64d356a0951671487b60529a0ca26b0909be Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Replace UpdateSourcesInfo and UpdateSourceInfo classes.Karsten Heimrich2015-05-065-308/+28
| | | | | | | | | | | | | | | | | | | | | | | | 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-3/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Rewrite to use QHash instead of QVector.Karsten Heimrich2015-05-062-95/+63
| | | | | | | | | | | | | | | | | | Since add and remove are the most common tasks of the class, and both functions did linear lookups for the package, a hash should be the better container to use here. Change-Id: I0ea8cb8683bc106c3b33e3bba7ff4c9af2b7611b Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Rename function name.Karsten Heimrich2015-05-052-5/+5
| | | | | | | | | | | | | | | | 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-054-300/+4
| | | | | | | | | | | | 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-2/+3
| | | | | | | | | | Change-Id: I9aaac261bef7aaa48cf0beaee83e15cc5bccd437 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | Move the PackagesInfo handling out of {KDUpdater}Application.Karsten Heimrich2015-05-056-115/+29
| | | | | | | | | | | | | | | | | | 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-056-439/+61
| | | | | | | | | | | | | | | | | | 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-211-0/+1
|\| | | | | | | | | | | | | Conflicts: Changelog Change-Id: Idd7d569f97fba75b05bfc006c7a5b0b9cf8ccf73
| * Compile with Qt 5.5kh2015-04-131-0/+1
| | | | | | | | | | Change-Id: Iaab5bd3821bc4f1d4a826c9fee0c2a8c75d06bba Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-03-171-19/+23
|\| | | | | | | Change-Id: I3b38821be20c02d41d9db1c5eee78be1502cba6b
| * Doc: Add missing docs for KDUpdater::PackagesInfoLeena Miettinen2015-02-271-19/+23
| | | | | | | | | | | | | | | | Fix references to non-existing package information file elements. Change-Id: I6167b66284ad018057610f38f8a5c4d3cd67806d Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* | CleanupJarek Kobus2015-02-273-47/+62
|/ | | | | | | | | | | | | | | 1. Add a checkArgumentCount() helper method. 2. Fix a plural form of the check method. 3. Remove repeating translation for every UpdateOperation subclass. 4. Use always QList.at() for checking arguments, instead of random usage of first(), last() and at(). 5. Fix const corectness. 6. Move isPersistant into #ifdef Q_OS_WIN inside EnvironmentVariableOperation. Change-Id: Idaa12265f1816871de0a4ea3ae586512859a04e3 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Doc: add docs for KDUpdater::FileDownloaderLeena Miettinen2015-02-251-30/+340
| | | | | Change-Id: I27db6645449b2da5bb5fca36270031e22fd41dad Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Doc: Add docs for KDUpdater::Application and ConfigurationInterfaceLeena Miettinen2015-02-251-11/+42
| | | | | | | | | | | Remove some \c commands. Replace "package XML" with "installation information XML" to avoid confusiong with the "package information file" that is used when building the installer. Change-Id: I56bc80cad5d7bc65557185c1b9d037baa8595128 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Doc: add docs for KDGenericFactory classLeena Miettinen2015-02-241-3/+28
| | | | | | Change-Id: I4d4f5d2d92cfb5dcf5d171e871115eb5ebd2c3c3 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Doc: Add docs for FileDownloaderFactory and FileDownloaderProxyFactoryLeena Miettinen2015-02-241-2/+51
| | | | | | Change-Id: I45658cacef985fd81a22f8ac9c7010b5f58de108 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Doc: KDUpdater operatorsLeena Miettinen2015-02-231-0/+12
| | | | | Change-Id: Id88e7b7eea7228dbfd94840eedc00f4a0f74168d Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Update CopyrightKai Koehne2015-02-1848-295/+295
| | | | | Change-Id: I8dde6629cfd461104364d5cdc255cb54b58283fa Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Doc: Add docs for KDUpdater::Update methodsLeena Miettinen2015-02-131-0/+7
| | | | | Change-Id: Iac06edf83091199d0e33ca573b50e3bbe3d03e66 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Doc: Add docs for KDUpdater::TaskLeena Miettinen2015-02-131-6/+24
| | | | | | | | | | Add missing return values. Add links to referred enum values. Fix a function signature in a \fn command. Fix the grammar. Change-Id: I653571b302ec460a0f03e1c5e9043824b7f2080b Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Doc: Add return values for KUpdater::UpdateOperation methodsLeena Miettinen2015-02-131-5/+14
| | | | | | | And fix some style and grammar issues. Change-Id: I62fa801f893f972b50d1c8156e5014b706cb45c3 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Doc: fix language and QDoc command issuesLeena Miettinen2015-02-122-3/+7
| | | | | | | | To follow the Qt documentation guidelines. Change-Id: I8f533737b39d7d58645a05b033fc966f70918369 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Doc: add docs for arguments and return valuesLeena Miettinen2015-01-306-11/+29
| | | | | | | | To get rid of QDoc errors. Change-Id: I4932f1f3ff5fab87eebf24536d63be550582b195 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Doc: add \value commands to generate docs properlyLeena Miettinen2015-01-301-6/+10
| | | | | | | | for UpdateOperation::Error enum Change-Id: Ib8b019bfe4aa8ab541dd37e8d96e06eb98d3e23b Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Update position of single quotation marks.Takayuki ORITO2014-12-101-1/+1
| | | | | | | It was equalized to a similar message that is included in the file 'kdlockfile_unix.cpp'. Change-Id: I00f3012efe1c4546e070342d1afd91cceaed42c3 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Don't set modified state without real modificationNiels Weber2014-12-051-2/+0
| | | | | | | | | | | | | | | | | | setApplicationName and setApplicationVersion probably should not set the modified state to true as they are called way before actual installation is started. In case of real changes happening, modified will always be set to true by the other changes anyway. Without this change, an existing installation in the default installation directory of the new installer might be destroyed when aborting the new installer. This should probably be investigated further so that nothing is ever written before the real install is started. Task-number: QTIFW-583 Change-Id: I9921a33134133ae28433c4bfb726fe79ba93c20e Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Documentation updates and fixes.kh2014-12-0113-449/+445
| | | | | | Change-Id: Ie9fc9e1c2a0b84082cb48732e270913bc90d9a79 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Improve error message in deleteFileNowOrLaterKai Koehne2014-12-011-1/+1
| | | | | | Change-Id: Id5e3f8f0004d66ca1bea8bd644fd9010bd688847 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Rewrite the isRunning implementation and remove private class.kh12014-11-122-66/+45
| | | | | | | | | | Use a more descriptive enum name. On Windows keep the lower case version of the process name instead of calling toLower() several times. Print a warning if we cannot obtain or release the lock. Change-Id: Iaaefae0359cd214290f62ce78677cb343da8823c Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@digia.com>
* Adjust implementation to match the Unix one and fix unlock.kh12014-11-121-19/+35
| | | | | | | | | Add error messages. Fix Unlock, we did use the right argument but passed on the wrong position(was index 5, should be at 4). Change-Id: I12564f64997a311a504eaa9b7dd21e75ded8db87 Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Don't use QObject::tr().kh12014-11-111-7/+14
| | | | | Change-Id: I2931d72e2e7add6fb5179b831ad91670fc6d1604 Reviewed-by: Niels Weber <niels.weber@digia.com>
* Remove automatic unlock, we do not automatically lock either.kh12014-11-114-20/+6
| | | | | | | | | Change and shuffle some parts of the code. Move constructor code into private file. Remove Destructor. Do not automatically unlock on destruction, we do not lock automatically on construction either. Change-Id: I48624a64266954bdc0434a523519a008afc6aac7 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Code cleanup, no functional changes intended.kh12014-11-117-20/+29
| | | | | | Change-Id: Iaf594b4a1cb267e4186afa089f292f83d13d6de4 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@digia.com>
* Remove lockfile after unlocking on LinuxNiels Weber2014-11-051-0/+2
| | | | | Change-Id: Ibae1a5da80d529ba184e62c2d20f4ff2e4eefad8 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* FileDownloaderProxyFactory: Fix indentationKai Koehne2014-11-041-3/+3
| | | | | Change-Id: I3a33f7a945e2fceae66c243c262a316b802cd96d Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>