summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/elevatedexecuteoperation.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Try rerunning execute operationKatja Marttila2021-02-051-21/+64
| | | | | | | | | | | | | 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>
* Save Execute operation with predefined variableKatja Marttila2021-02-031-2/+11
| | | | | | | | | | | 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>
* Doc: Remove internal classes and structs from generated documentationArttu Tarkiainen2020-09-211-0/+6
| | | | | | | | | | 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>
* Add verbose levels and cleanup log categoriesKatja Marttila2020-08-241-6/+6
| | | | | | | | | 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>
* Use of QLoggingCategoryKatja Marttila2020-02-131-6/+10
| | | | | | | | 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>
* Replace 0 with nullptrKatja Marttila2019-01-091-2/+2
| | | | | | | Prevents a lot of warnings seen in QtCreator Change-Id: I63bf95aca68a04fc9fd0eecbe29c63e9b9c47efd Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Merge remote-tracking branch 'origin/2.0' into 3.0Katja Marttila2017-03-301-2/+3
|\ | | | | | | | | | | | | Conflicts: src/libs/installer/downloadfiletask.cpp Change-Id: Ie4b07c402a63c7a12ecf24e52e197507bbb2c5df
| * QRegExp include cleanupSamuel Gaist2017-03-131-2/+3
| | | | | | | | | | | | | | This patch adds the missing include statements for QRegExp. Change-Id: I05fed3e83514af895b95a3df746b0ae1e6b31828 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
* | Merge remote-tracking branch 'origin/2.0'Katja Marttila2016-06-211-10/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/7zip/7zip.pro src/libs/7zip/win/CPP/7zip/UI/Common/Update.cpp src/libs/installer/component.cpp src/libs/installer/lib7z_facade.cpp src/libs/installer/packagemanagercore.cpp src/libs/installer/proxycredentialsdialog.h src/sdk/translations/ja.ts tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp tests/auto/installer/scriptengine/tst_scriptengine.cpp tests/auto/installer/settings/tst_settings.cpp Change-Id: I3bb98b8490b3c3eb7f664c1abb7417155b5430b2
| * Make Execute operation work without arguments in WindowsKatja Marttila2016-06-131-10/+1
| | | | | | | | | | | | | | | | | | | | | | Since Qt5.5, QProcess start() needs a program to start. When using native arguments the program is empty and QProcess will fail to start. Removed the use of native arguments until QProcess supports setting program through native arguments. Task-number: QTIFW-862 Change-Id: Ia56344e1bf82fbd76e4e8f2ae8b6817e4bb2fce1 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/2.0'Iikka Eklund2016-01-201-4/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Let ElevatedExecuteOperation delete its RemoteObject earlierFrerich Raabe2015-12-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After running the process, ElevatedExecuteOperation would delete the QProcessWrapper object via deleteLater(). However, this would cause lingering remote connections: Operations are executed threaded via QtConcurrent::run(). The QtConcurrent threads don't run an event loop, so calling QProcessWrapper::deleteLater() would cause the object to get deleted once the thread finished. However, QtConcurrent uses a thread pool, so it may happen that the remote object is never deleted at all. Let's fix this by deleting the object right away. It should be safe no matter which thread runs the operation: 1. If it's the UI thread, the nested event loop will synchronize, i.e. the QEventLoop:exec() call only returns once the process finished. 2. If it's a non-UI thread, the code synchronizes via QProcessWrapper::waitForFinished(). In either case, the process will be finished by the time we get to the end of the function, so I think it's safe to just delete the object right away (and hence close the remote connection). Let's also add an assert to document our assumption. Change-Id: Ieb9970ff6452d404924824ece2a0a6e79552b0b3 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* | Make use of the new varadic template feature + cosmetic changes.Karsten Heimrich2015-07-101-2/+3
| | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Remove superfluous clone() method. Prepare for next patch.Karsten Heimrich2015-06-251-5/+0
| | | | | | | | | | | | | | Task-number: QTIFW-180 Change-Id: I6aa8b409e323d14e353a1f80b0b2ec54daad184f Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Unify translated error messagesKai Koehne2015-06-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | CleanupJarek Kobus2015-02-271-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/2.0'Kai Koehne2015-02-261-7/+7
|\| | | | | | | Change-Id: I962f4f19909c06e1da03c14072b15f97de02a07d
| * Update CopyrightKai Koehne2015-02-181-7/+7
| | | | | | | | | | Change-Id: I8dde6629cfd461104364d5cdc255cb54b58283fa Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* | Fix messagesjkobus2015-02-111-2/+2
|/ | | | | | Change-Id: I3cfa75df0d4da9c818b3341b1a422f845a056ae0 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Add LGPLv3 as new licenseKai Koehne2014-10-161-14/+7
| | | | | | | Change-Id: I61158f956894e209dccf83744b4753774676099d Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* executeoperation forward error output to qwarningTim Jenssen2013-06-181-1/+10
| | | | | | | | - with that we can see something in the verbose output Change-Id: Ic427cfb93d04c1a4f6e3bc8d8355c5d6f49a8c3d Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* add errorString to execute operation error outputTim Jenssen2013-05-291-1/+2
| | | | | Change-Id: Ieb1db289f50188107204e0a1e42ccb51f512229e Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* reformat initialize list of classesTim Jenssen2013-04-241-1/+3
| | | | | Change-Id: I4107c571497a98b962716bd7915c29fb50d70108 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Unify some error strings.Niels Weber2013-02-121-2/+2
| | | | | Change-Id: I3ce7d3f84c9654e5c457b9e5f6131ac931e8ba2f Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Add 2013 to the copyright.Niels Weber2013-02-051-1/+1
| | | | | Change-Id: If64730ba7203d1a910a426c0d9c9a738ecfeff4b Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Adds custom error message for executeoperationMichal Klocek2013-01-311-2/+15
| | | | | | Change-Id: Ib049bc9e91566eb8f53ea946e0fc62d3580c2957 Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* Change copyright headers from Nokia to DigiaSergio Ahumada2012-12-211-18/+27
| | | | | Change-Id: Id55a71a6ee24b234739b6066e11e9c1f2e389f73 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Reorganize the tree, have better ifw.pri. Shadow build support.kh12012-03-191-0/+276
Change-Id: I01fb12537f863ed0744979973c7e4153889cc5cb Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>