|
| 1 | +// Emacs mode hint: -*- mode: JavaScript -*- |
| 2 | + |
| 3 | +function Controller() { |
| 4 | + installer.autoRejectMessageBoxes(); |
| 5 | + installer.installationFinished.connect(function() { |
| 6 | + gui.clickButton(buttons.NextButton); |
| 7 | + }) |
| 8 | + |
| 9 | + // Copied from https://bugreports.qt.io/browse/QTIFW-1072?jql=project%20%3D%20QTIFW |
| 10 | + // there are some changes between Qt Online installer 3.0.1 and 3.0.2. Welcome page does some network |
| 11 | + // queries that is why the next button is called too early. |
| 12 | + var page = gui.pageWidgetByObjectName("WelcomePage") |
| 13 | + page.completeChanged.connect(welcomepageFinished) |
| 14 | +} |
| 15 | + |
| 16 | +Controller.prototype.WelcomePageCallback = function() { |
| 17 | + gui.clickButton(buttons.NextButton); |
| 18 | +} |
| 19 | + |
| 20 | +welcomepageFinished = function() |
| 21 | +{ |
| 22 | + //completeChange() -function is called also when other pages visible |
| 23 | + //Make sure that next button is clicked only when in welcome page |
| 24 | + if(gui.currentPageWidget().objectName == "WelcomePage") { |
| 25 | + gui.clickButton( buttons.NextButton); |
| 26 | + } |
| 27 | +} |
| 28 | + |
| 29 | +Controller.prototype.CredentialsPageCallback = function() { |
| 30 | + gui.clickButton(buttons.NextButton); |
| 31 | +} |
| 32 | + |
| 33 | +Controller.prototype.IntroductionPageCallback = function() { |
| 34 | + gui.clickButton(buttons.NextButton); |
| 35 | +} |
| 36 | + |
| 37 | +Controller.prototype.TargetDirectoryPageCallback = function() |
| 38 | +{ |
| 39 | + gui.currentPageWidget().TargetDirectoryLineEdit.setText("/opt/qt"); |
| 40 | + gui.clickButton(buttons.NextButton); |
| 41 | +} |
| 42 | + |
| 43 | +Controller.prototype.ComponentSelectionPageCallback = function() { |
| 44 | + var widget = gui.currentPageWidget(); |
| 45 | + |
| 46 | + widget.deselectAll(); |
| 47 | + |
| 48 | + // widget.selectComponent("qt"); |
| 49 | + // widget.selectComponent("qt.qt5.5110"); |
| 50 | + widget.selectComponent("qt.qt5.5110.gcc_64"); |
| 51 | + // widget.selectComponent("qt.qt5.5110.qtscript"); |
| 52 | + // widget.selectComponent("qt.qt5.5110.qtscript.gcc_64"); |
| 53 | + // widget.selectComponent("qt.qt5.5110.qtwebengine"); |
| 54 | + // widget.selectComponent("qt.qt5.5110.qtwebengine.gcc_64"); |
| 55 | + // widget.selectComponent("qt.qt5.5110.qtwebglplugin"); |
| 56 | + // widget.selectComponent("qt.qt5.5110.qtwebglplugin.gcc_64"); |
| 57 | + // widget.selectComponent("qt.tools"); |
| 58 | + |
| 59 | + gui.clickButton(buttons.NextButton); |
| 60 | +} |
| 61 | + |
| 62 | +Controller.prototype.LicenseAgreementPageCallback = function() { |
| 63 | + gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true); |
| 64 | + gui.clickButton(buttons.NextButton); |
| 65 | +} |
| 66 | + |
| 67 | +Controller.prototype.StartMenuDirectoryPageCallback = function() { |
| 68 | + gui.clickButton(buttons.NextButton); |
| 69 | +} |
| 70 | + |
| 71 | +Controller.prototype.ReadyForInstallationPageCallback = function() |
| 72 | +{ |
| 73 | + gui.clickButton(buttons.NextButton); |
| 74 | +} |
| 75 | + |
| 76 | +Controller.prototype.FinishedPageCallback = function() { |
| 77 | + var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm |
| 78 | + if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) { |
| 79 | + checkBoxForm.launchQtCreatorCheckBox.checked = false; |
| 80 | + } |
| 81 | + gui.clickButton(buttons.FinishButton); |
| 82 | +} |
| 83 | + |
0 commit comments