summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagergui.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add possibility to add extra log when meta fetch failsKatja Marttila2024-04-041-0/+2
| | | | | | | | | Also if the log contains links or html, added link interaction possibility and correct html syntax to messagebox and error messages. Task-number: QTIFW-3012 Change-Id: Ibf20f50c0f06fdbb8325f93dbdf78ba36d4fe4e5 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add possibility for additional license checkKatja Marttila2024-03-051-1/+1
| | | | | | | | Productkeycheck, or repository, can implement additional license checkings. Added possibility to enable the next button in license agreement page when productkeycheck has also validated that the license check is ok. By default productkeycheck returns true for additional license checks, the developer can override the productkeycheck to add additional checks. Task-number: QTIFW-3319 Change-Id: Ie7e3d84eb800edb6c5c9731afa6bfe464e4ae4d1 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Move non-ui related functionality to coreKatja Marttila2024-02-231-73/+13
| | | | | | | | We need to access the core functionality despite of what user interface is used. Change-Id: I6c4c7e8526ff24a479128061aa40fba66e61660c Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add possibility to change button textKatja Marttila2024-02-221-1/+17
| | | | | | | | | | Sometimes the button texts in installer are not something that is suitable. Added possibility to change button texts from script to a specific installer page. Task-number: QTIFW-711 Change-Id: I2883cda6d770843c3617fda4e6b07d102a357730 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Merge remote-tracking branch 'origin/4.7' into masterKatja Marttila2024-01-221-1/+8
|\ | | | | | | Change-Id: Id9fe7a127a72b58732f5dffd11c4c9c7c1c56060
| * Fix offline generator state not resetting when navigating backArttu Tarkiainen2024-01-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In case the user chose to generate offline installer by clicking the "Create Offline Installer" button on ComponentSelectionPage, navigating back to the page did not reset the internal binary marker. This made it impossible to perform a normal installation afterwards. Fix by resetting the state on ComponentSelectionPage::entering(). Task-number: QTIFW-3236 Change-Id: I0951ec90e70dff9e8e233dee0cc5592c5c509c28 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
| * Fix automatic page switching on offline generationArttu Tarkiainen2023-12-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a missing connection of signal PackageManagerCore::offlineGenerationFinished to slot PackageManagerGui::showFinishedPage. This caused the installer to prevent navigating forward after successfully creating an offline installer, in case the details view was hidden. If the details view was shown, the Cancel button was also incorrectly still enabled. Adding the missing signal connection fixes both issues. Task-number: QTIFW-3237 Change-Id: Idf7f24aae354fdfb09106e595f8b8fc312bfd817 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Chop subtitle into two linesKatja Marttila2023-12-071-1/+1
|/ | | | | | | | | | The subtitle in component selection page is long and is chopped into two lines by QWizard. Chop the title from more suitable place for it to show up nicely. Task-number: QTIFW-3102 Change-Id: I6d45864a6b162922d0f461620fab75eea7baa98c Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Replace Wizard with Setup in the exit messageAndreas Pakulat2023-10-021-1/+1
| | | | | | | | | | | | This was supposed to be part of the 798f844242f855a46a082abacf6c4c4175f10eca change, but got missed. The reference to the installer itself has been changed from 'Wizard' or 'Setup Wizard' to just 'Setup' everywhere to ensure consistent wording being used through the UI. Task-Name: SQUISH-9672 Change-Id: I866cc9616a2bcca731068721c243d3579451773e Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Merge remote-tracking branch 'origin/4.6' into masterKatja Marttila2023-08-241-1/+2
|\ | | | | | | Change-Id: Idadf4fb3047f72880e5a86f76eb21b659589cd17
| * Fix crash when filtering categoriesKatja Marttila2023-08-221-1/+2
| | | | | | | | | | | | | | | | | | Components are refetch when fetching the categories, thus we need to recalculate the installable components Task-number: QTIFW-3085 Change-Id: Ie794e6308dd7f3f96814781d8e25769ecd323887 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Allow generating offline installers from GuiArttu Tarkiainen2023-06-191-2/+27
| | | | | | | | | | | | | | | | | | | | | | This was previously possible only from the CLI. The same methods can be used from the graphical installer, so we do not need to limit the feature for CLI users. Task-number: QTIFW-3072 Change-Id: I271aecf163528b922e6cc399d31f07218e2a1650 Reviewed-by: Katja Marttila <katja.marttila@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Fix page title text on the last pageKatja Marttila2023-06-121-2/+2
| | | | | | | | | | | | | | | | The page title text did not match the text located in the sidebar. Task-number: QTIFW-3060 Change-Id: If435aeb0b2ddbdcafed43c4da61702f3d5bf7688 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Prevent uninstalling components when error occursKatja Marttila2023-06-061-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When error occurs during component fetch, for example cache is in use or another metadata parsing error, installer allowed to continue to uninstall existing components. This has confused users, as there is no place to show error message and users had no idea why not all components were visible in the tree. The error message was only written to logs. Fixed this by showing the error message in 'Add or remove/Update' -page and not allowing to continue to uninstall existing components. Task-number: QTIFW-3069 Change-Id: I9f7d96d04b150c319b01d6e61430805128d3c31a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Fix delaration orderKatja Marttila2023-06-061-1/+1
|/ | | | | | | To get rid of [-Wreorder] warnings Change-Id: I2b0b071100eeb1830017da2913b62c00a18823bd Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Match title and message text on the first wizard pageAndreas Pakulat2023-04-031-1/+1
| | | | | | | | | | | | | | | | | The title of the page was replicating that product name and the word 'Setup', but was not doing so consistently with either the message text or the title. Since the titles of the other pages do not refer the product and the product is mentioned in the message too, lets make this a short 'Welcome' instead. Since this is vastly different from the original text, I decided to adjust all translations for this string to unfinished - except for the german one which I can easily contribute myself. Task-Name: SQUISH-9672 Change-Id: Ia410d6e256b59b858f54082d17513a0b58a18546 Reviewed-by: Katja Marttila <katja.marttila@qt.io> Reviewed-by: Tino Pyssysalo <tino.pyssysalo@qt.io>
* Merge "Merge remote-tracking branch 'origin/4.5' into master"Katja Marttila2023-03-241-15/+32
|\
| * Merge remote-tracking branch 'origin/4.5' into masterKatja Marttila2023-03-241-15/+32
| |\ | | | | | | | | | Change-Id: I9946bf8ff3ea4e132a0490b59c1d4d557198ef62
| | * Fix showSettingsButton functionality4.5Katja Marttila2023-03-231-15/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | showSettingsButton() called from control script had no effect. Fixed it so that if showSettingsButton will overwrite the IFW decision to show the settings button. Change-Id: Ia08c03cc13db58168fd371f230517bcc83ee0e12 Task-number: QTIFW-810 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Center PackageManagerPage title and subtitle textsArttu Tarkiainen2023-03-241-2/+2
|/ / | | | | | | | | | | | | | | Part of the installer UI refresh spec. Task-number: QTIFW-2995 Change-Id: I8256ec12410831edbb7c7e36cb4f2af15287891c Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Change pagelist item flagsKatja Marttila2023-03-081-1/+1
| | | | | | | | | | | | | | | | | | If pagelist item is not the current item, make the item disabled so it can be correctly painted in the stylesheet Task-number: QTIFW-2989 Change-Id: Ifb4c9a95061ff30f0ea842bc0d706f7960baaf20 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* | Merge remote-tracking branch 'origin/4.5'Arttu Tarkiainen2023-01-271-11/+9
|\| | | | | | | Change-Id: I07baba6a0e64b6022e6a933708e199551be7dd2f
| * Support detecting invalid dependency resolutions on component selectionArttu Tarkiainen2023-01-261-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IFW could already previously detect circular and missing dependencies by running a precheck calculation when building the component tree. However, there can be also cases of where the user selection results in unsolvable changes to components. One such case was the erroneous possibility to uninstall a component marked with ForcedInstallation, if any of its dependencies was checkable and the user unselected it for uninstallation. Add support for reacting to such errors in the component tree view, displaying a message box about the invalid dependency resolvation error, and blocking further navigation until the component selection passes the dependency calculations. Also attempt some refactoring the related code to simplify the different call sequences resulting in recalculation of the components. Change-Id: I9dc78f858bd4be7932f89f8e14bbfd97fbd3a0f6 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Handle api removed in Qt6Christian Stenger2022-12-291-2/+12
| | | | | | | | | | | | | | Task-number: QTIFW-1829 Change-Id: Ibb492ada102dd74f4defde084fca48106837add6 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Fix documentation warningsKatja Marttila2022-12-201-0/+10
| | | | | | | | | | Change-Id: Ia8717933439359e23b65d9465dec8c70fbe59ee2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Merge remote-tracking branch 'origin/4.5' into masterKatja Marttila2022-12-131-3/+12
|\| | | | | | | Change-Id: Id8121e6b4cdda23c8c44cf779e35dce8d9a28090
| * Fix user set binary marker not having any effect on maintenance toolArttu Tarkiainen2022-12-011-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TabController would invoke IntroductionPage::onCoreNetworkSettings- Changed() slot, which would disable the UI controls for selecting the package manager or updater mode in case the maintenance tool is configured to use only temporary repositories that are set only later on. This would also update the internal magic marker indicating the binary type, overwriting the user selected one that was passed with one of the --start-* options. Fix by splitting the resetting of the "metadata fetched" state of the page to its own public method from IntroductionPage::onCoreNetwork- SettingsChanged(), and call that from the TabController initialization instead. Task-number: QTIFW-2884 Change-Id: I952b8fd1d14e6292bae1556a5f33dec537c8b1d6 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Add possibility to post load install scriptsKatja Marttila2022-11-041-0/+18
|/ | | | | | | | | | | This change adds attribute, postLoad, to existing <Script> -element. Using <Script postLoad="True"> will call the script loading and evaluation only to those components which are selected for install or update right before the components installation start. Task-number: QTIFW-2820 Change-Id: Ic1967d329cbb5de6a0216ff3f76cc2ede178db80 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Adjust the 'ready to install' message to avoid repeating the app nameAndreas Pakulat2022-09-271-3/+3
| | | | | | | | | | | | | The text was using just the word 'Setup' which is inconsistent with other places which usually refer to the application as '<product> Setup'. Adding the product name would've been possible, but it seemed unnecessary to repeat the installer name again right at the last step. So instead replace that with a general message explaining that all needed information has been collected. Task-Name: SQUISH-9672 Change-Id: Ia253f4f921431f272bc1d69352a5fa7179e84d0c Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Disable package manager and updater for offline maintenance toolArttu Tarkiainen2022-09-071-8/+38
| | | | | | | | | | | | | | For a maintenance tool that has no configured repositories, we can disable the selection of package manager and updater options, that require at least one repository to be useful. Also show the settings button for offline maintenance tool that is run in uninstaller mode, because the user may want to add a new repository which then enables the disabled options. Task-number: QTIFW-2627 Change-Id: I4db7f6526c37bbadeaf680fe9cb6130058ca5ffd Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Replace 'Setup Wizard' and 'Wizard' with just 'Setup'Andreas Pakulat2022-08-301-4/+4
| | | | | | | | | | | | | | | In many other places the UI refers to the program as just '<Product> Setup' and the 'Wizard' suffix also seems to be somewhat out of date/'retro'. So get rid of the suffix to make the naming more consistent. I think this change also fixes a problem with translation. The ts-files contain just 'Completing the %1 Setup' for the Restart Page, while the actual text is 'Completing the %1 Setup Wizard'. So the translation here might not have worked properly - it certainly looked odd. Task-Name: SQUISH-9672 Change-Id: I65a56c6e927f01307868ad8319e301b84ab330be Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add component list of components to be installed to installationlogKatja Marttila2022-06-131-0/+1
| | | | | | | | | | We print the component list to gui in 'ready to install' page and to console when using install/remove commands. Add the same print to installationlog.txt so that it easier to spot possible installation errors. Task-number: QTIFW-2666 Change-Id: Icea96695e3d3a4516d65c7b487ed5fced2701632 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Use fixed width font for the license text browserArttu Tarkiainen2022-04-281-0/+2
| | | | | | | | | Some licenses use ASCII art to display tables, etc. which requires that the font is of fixed width. Task-number: QTIFW-2613 Change-Id: I0f473e6320912702c5df01d99a573ee820da3c1b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Speed up Next button click in tree viewKatja Marttila2022-04-211-0/+3
| | | | | | | | | | | | | Components were recalculated when leaving the tree view. This is unnecessary as we have just calculated the components. Moving the recalculation to Introduction page so alternate pressing of 'Add or remove components' and 'Update components' will cause the recalculation as we need that to keep the component install states in sync. Task-number: QTIFW-2598 Task-number: QTIFW-694 Change-Id: Ia84a01b4f1d0b39b4844c02470b764c4940e943c Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add missing mnemonic for the "Settings" buttonArttu Tarkiainen2022-04-211-1/+1
| | | | | | | | | | The "Cancel" button on bottom of the wizard is also missing a shortcut. But this behavior is inherited from QWizard, where it appears to be intentional. Task-number: QTIFW-2206 Change-Id: I53e595591679f5d22b2b381f86974dfc963d2bd4 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add click option for product imageKatja Marttila2022-03-211-6/+15
| | | | | | | | | | Product image can now be clicked. It opens either url in Web browser or if file reference is given, then it will be opened with the suitable application. Task-number: QTIFW-2361 Change-Id: I59ed1355e90c23c8d0a5124779725825ca1ee2c8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Make 'override' specifier usage consistentArttu Tarkiainen2022-01-211-1/+1
| | | | | | | | | Add where missing. Replace occurrences of Q_DECL_OVERRIDE macro, building IFW requires a C++11 compatible compiler so the language specifier is preferred. Change-Id: Idb75e2813d26b9da85e03891f0ae9537c6524c56 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Enable 'Enter' to click Next -button in macOSKatja Marttila2022-01-201-0/+5
| | | | | | | | | | | | | Removing QWizard::NoDefaultButton will enable enter clicking in macos. This will also keep the Spacebar -key press to accept the Next -button. Adding also Qt::StrongFocus to Next -button, otherwise for example the radio buttons in Introduction -page will get the Spacebar -key press, even when those are set invisible, causing the installer to be converted to package manager. Task-number: QTIFW-2409 Change-Id: I2ad0e98b5be635c2f9e53ec1b6262bd37be22cae Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* MT: Disable package manager when forced updates are foundArttu Tarkiainen2022-01-181-0/+16
| | | | | | Task-number: QTIFW-2437 Change-Id: I3c0293550456f36e37e98e97042bf6bfae6ce96d Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add "about application" menu and dialog on macOSArttu Tarkiainen2022-01-181-2/+15
| | | | | | | | | Also enable linking qtimageformats as a static plugin on macOS, it is required to read the .icns file to be shown on the dialog. Task-number: QTIFW-2453 Change-Id: Ib776635167a4c90ffa20a91ecc447d2d73f5aeb9 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Use Next as default buttonKatja Marttila2022-01-141-6/+2
| | | | | | | | | Next should be the default selection when use presses Enter. Sometimes the focus was in Settings button. Task-number: QTIFW-1046 Change-Id: Idae996bd5a0c511b9d2595a22b7ea0114f34ade1 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix wrong title text after succesfull updateKatja Marttila2021-12-311-1/+2
| | | | | | Task-number: QTIFW-2439 Change-Id: Ie8f7a35d73d847e8864b1f1f2dc5fb7bc8ed9092 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix selecting target directory when elevated server process is activeArttu Tarkiainen2021-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is a disparency in the return value of QFileInfo::isFile() on Windows whether QFileInfo uses QFileSystemEngine directly (for local files, returns false) or with another file engine (QFSFileEngine in this case, returns true), when the file does not exist on disk. Installer registers its own file engine handler that handles file engine creation. It creates custom RemoteFileEngine instances suitable for writing into more restrictive locations when the connection to the elevated installer server process is active. When calling RemoteFileEngine::fileFlags() with TypesMask parameter, the returned combination of enum values includes FileFlag::FileType when the given file does not exist, this can be reproduced with both the active remote server connection that forwards the file engine calls to the server process, and when the composed QFSFileEngine object is used directly without the remote connection. Fix by adding a check if the given target directory path exists, if it doesn't we can assume it is a directory to be created by the installer. Also rename function to better match what it does. Task-number: QTIFW-2383 Change-Id: I906b0676802d9d94e70abeb2dea1f71866cbbec8 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix size issues with page list widget when building with Qt 5.15.2Arttu Tarkiainen2021-12-131-1/+2
| | | | | | | | | | | | Prefer elided text to horizontal scrolling. Fix invalid size hint for side widget items, otherwise the item delegate will compute the size hint based on the item data. We want to include custom height to not make the list cramped. Task-number: QTIFW-2388 Change-Id: I490a12c04f921b8c9a01c3ac72c6bcd4d951f6d3 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Merge remote-tracking branch 'origin/4.1' into masterArttu Tarkiainen2021-09-101-1/+10
|\ | | | | | | Change-Id: I8e2864b3ec81cffa907fe02ff1f2019e155c54e3
| * MT: Install new <ForcedInstallation> components with default check stateArttu Tarkiainen2021-08-161-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | ComponentSelectionPage::isComplete() would return false if the state of the component model was "DefaultChecked" and user had not (de)selected any new components. This change adds a condition to check if there are any ForcedInstallation components that haven't been previously installed, and allows navigating forward and installing those without additional selections. Task-number: QTIFW-2286 Change-Id: I273cc7219df1eae4e11ff23e733d71a9c297bedd Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Translations: validate and update translatable user interface stringsArttu Tarkiainen2021-06-231-3/+3
| | | | | | | | | | | | | | Task-number: QTIFW-2245 Change-Id: Id9a79c7c572dc588c05ad37c67ae3f0431fa7cdb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* | Clarify required user actions when there is an essential updateArttu Tarkiainen2021-06-161-0/+4
| | | | | | | | | | | | Task-number: QTIFW-2244 Change-Id: Ib3c717eb7fd76bdc928072630177c71933e8aef1 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* | Fix styling of QMessageBoxesArttu Tarkiainen2021-03-101-1/+1
|/ | | | | | | | | | | | | | | MessageBoxHandler will decide an appropriate parent widget for new QMessageBox objects just before they are shown. This is not quaranteed to be a PackageManagerGui instance, for example when the installer wizard does not have focus, which means the style properties do not get inherited. Rather set the used style sheet for the whole application using QApplication::setStyleSheet(). Task-number: QTIFW-2121 Change-Id: I6f2131279d6f6d3dd41b9eacab8404770aad09a3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Update side widget with the binary marker changes in introduction pageArttu Tarkiainen2021-02-191-0/+6
| | | | | | Task-number: QTIFW-2150 Change-Id: I8a216ed99aaa68347558cb90a712d2afd1147268 Reviewed-by: Katja Marttila <katja.marttila@qt.io>