diff options
author | Kostas Karmas <konskarm@gmail.com> | 2021-03-30 09:46:14 +0300 |
---|---|---|
committer | Kostas Karmas <konskarm@gmail.com> | 2021-03-30 10:02:48 +0300 |
commit | 7827b36ab75ecaa9e78c0d8213f8f7280e660ae0 (patch) | |
tree | 6dbe9d71ec51bf40e5658486098f7b1ef7dbe764 /resources | |
parent | a277adae64c867cdbb07858b1b04f9e87a620d06 (diff) |
Fix QML warnings due to depricated on<signal> calls in Connections
As of 5.12, the signals used in connections should not be declared as on<signal>, but as
function on<signal>(arguments).
Diffstat (limited to 'resources')
35 files changed, 94 insertions, 103 deletions
diff --git a/resources/qml/ActionPanel/ActionPanelWidget.qml b/resources/qml/ActionPanel/ActionPanelWidget.qml index deb7275e78..b3cf6d23a9 100644 --- a/resources/qml/ActionPanel/ActionPanelWidget.qml +++ b/resources/qml/ActionPanel/ActionPanelWidget.qml @@ -93,7 +93,7 @@ Item Connections { target: CuraApplication - onAdditionalComponentsChanged: base.addAdditionalComponents() + function onAdditionalComponentsChanged(areaId) { base.addAdditionalComponents() } } function addAdditionalComponents() diff --git a/resources/qml/ActionPanel/SliceProcessWidget.qml b/resources/qml/ActionPanel/SliceProcessWidget.qml index 40e76826ca..dbbfe784ef 100644 --- a/resources/qml/ActionPanel/SliceProcessWidget.qml +++ b/resources/qml/ActionPanel/SliceProcessWidget.qml @@ -127,7 +127,7 @@ Column Connections { target: UM.Preferences - onPreferenceChanged: + function onPreferenceChanged(preference) { if (preference !== "general/auto_slice") { diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 7772cc041a..067024a7b5 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -88,7 +88,7 @@ UM.MainWindow { // This connection is used when there is no ActiveMachine and the user is logged in target: CuraApplication - onShowAddPrintersUncancellableDialog: + function onShowAddPrintersUncancellableDialog() { Cura.Actions.parent = backgroundItem @@ -102,7 +102,7 @@ UM.MainWindow Connections { target: CuraApplication - onInitializationFinished: + function onInitializationFinished() { // Workaround silly issues with QML Action's shortcut property. // @@ -471,19 +471,19 @@ UM.MainWindow Connections { target: Cura.Actions.preferences - onTriggered: preferences.visible = true + function onTriggered() { preferences.visible = true } } Connections { target: CuraApplication - onShowPreferencesWindow: preferences.visible = true + function onShowPreferencesWindow() { preferences.visible = true } } Connections { target: Cura.Actions.addProfile - onTriggered: + function onTriggered() { preferences.show(); preferences.setPage(4); @@ -495,7 +495,7 @@ UM.MainWindow Connections { target: Cura.Actions.configureMachines - onTriggered: + function onTriggered() { preferences.visible = true; preferences.setPage(2); @@ -505,7 +505,7 @@ UM.MainWindow Connections { target: Cura.Actions.manageProfiles - onTriggered: + function onTriggered() { preferences.visible = true; preferences.setPage(4); @@ -515,7 +515,7 @@ UM.MainWindow Connections { target: Cura.Actions.manageMaterials - onTriggered: + function onTriggered() { preferences.visible = true; preferences.setPage(3) @@ -525,7 +525,7 @@ UM.MainWindow Connections { target: Cura.Actions.configureSettingVisibility - onTriggered: + function onTriggered() { preferences.visible = true; preferences.setPage(1); @@ -550,7 +550,7 @@ UM.MainWindow Connections { target: Cura.MachineManager - onBlurSettings: + function onBlurSettings() { contentItem.forceActiveFocus() } @@ -594,7 +594,7 @@ UM.MainWindow Connections { target: CuraApplication - onShowConfirmExitDialog: + function onShowConfirmExitDialog(message) { exitConfirmationDialog.text = message; exitConfirmationDialog.open(); @@ -604,19 +604,19 @@ UM.MainWindow Connections { target: Cura.Actions.quit - onTriggered: CuraApplication.checkAndExitApplication(); + function onTriggered() { CuraApplication.checkAndExitApplication(); } } Connections { target: Cura.Actions.toggleFullScreen - onTriggered: base.toggleFullscreen() + function onTriggered() { base.toggleFullscreen() } } Connections { target: Cura.Actions.exitFullScreen - onTriggered: base.exitFullscreen() + function onTriggered() { base.exitFullscreen() } } FileDialog @@ -761,7 +761,7 @@ UM.MainWindow Connections { target: Cura.Actions.open - onTriggered: openDialog.open() + function onTriggered() { openDialog.open() } } OpenFilesIncludingProjectsDialog @@ -777,7 +777,7 @@ UM.MainWindow Connections { target: CuraApplication - onOpenProjectFile: + function onOpenProjectFile(project_file, add_to_recent_files) { askOpenAsProjectOrModelsDialog.fileUrl = project_file; askOpenAsProjectOrModelsDialog.addToRecent = add_to_recent_files; @@ -788,7 +788,7 @@ UM.MainWindow Connections { target: Cura.Actions.showProfileFolder - onTriggered: + function onTriggered() { var path = UM.Resources.getPath(UM.Resources.Preferences, ""); if(Qt.platform.os == "windows") @@ -820,7 +820,7 @@ UM.MainWindow Connections { target: CuraApplication - onShowMessageBox: + function onShowMessageBox(title, text, informativeText, detailedText, buttons, icon) { messageDialog.title = title messageDialog.text = text @@ -844,7 +844,7 @@ UM.MainWindow Connections { target: CuraApplication - onShowDiscardOrKeepProfileChanges: + function onShowDiscardOrKeepProfileChanges() { discardOrKeepProfileChangesDialogLoader.sourceComponent = discardOrKeepProfileChangesDialogComponent discardOrKeepProfileChangesDialogLoader.item.show() @@ -871,13 +871,13 @@ UM.MainWindow Connections { target: Cura.Actions.whatsNew - onTriggered: whatsNewDialog.show() + function onTriggered() { whatsNewDialog.show() } } Connections { target: Cura.Actions.addMachine - onTriggered: + function onTriggered() { // Make sure to show from the first page when the dialog shows up. addMachineDialog.resetModelState() @@ -893,7 +893,7 @@ UM.MainWindow Connections { target: Cura.Actions.about - onTriggered: aboutDialog.visible = true; + function onTriggered() { aboutDialog.visible = true; } } Timer diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml index b3fe3fa763..f637cccdbb 100644 --- a/resources/qml/ExpandableComponent.qml +++ b/resources/qml/ExpandableComponent.qml @@ -92,6 +92,15 @@ Item contentContainer.trySetPosition(contentContainer.x, contentContainer.y); } + onEnabledChanged: + { + if (!base.enabled && expanded) + { + toggleContent(); + updateDragPosition(); + } + } + // Add this binding since the background color is not updated otherwise Binding { @@ -103,20 +112,6 @@ Item } } - // The panel needs to close when it becomes disabled - Connections - { - target: base - onEnabledChanged: - { - if (!base.enabled && expanded) - { - toggleContent(); - updateDragPosition(); - } - } - } - implicitHeight: 100 * screenScaleFactor implicitWidth: 400 * screenScaleFactor @@ -300,7 +295,7 @@ Item Connections { target: UM.Preferences - onPreferenceChanged: + function onPreferenceChanged(preference) { if ( @@ -342,8 +337,8 @@ Item { // Since it could be that the content is dynamically populated, we should also take these changes into account. target: content.contentItem - onWidthChanged: content.width = content.contentItem.width + 2 * content.padding - onHeightChanged: + function onWidthChanged() { content.width = content.contentItem.width + 2 * content.padding } + function onHeightChanged() { content.height = content.contentItem.height + 2 * content.padding contentContainer.height = contentHeader.height + content.height diff --git a/resources/qml/ExpandablePopup.qml b/resources/qml/ExpandablePopup.qml index eb949a84ec..7829093e8d 100644 --- a/resources/qml/ExpandablePopup.qml +++ b/resources/qml/ExpandablePopup.qml @@ -78,6 +78,14 @@ Item property int shadowOffset: 2 + onEnabledChanged: + { + if (!base.enabled && expanded) + { + toggleContent() + } + } + function toggleContent() { if (content.visible) @@ -98,19 +106,6 @@ Item value: base.enabled ? headerBackgroundColor : UM.Theme.getColor("disabled") } - // The panel needs to close when it becomes disabled - Connections - { - target: base - onEnabledChanged: - { - if (!base.enabled && expanded) - { - toggleContent() - } - } - } - implicitHeight: 100 * screenScaleFactor implicitWidth: 400 * screenScaleFactor @@ -247,7 +242,7 @@ Item { // Since it could be that the content is dynamically populated, we should also take these changes into account. target: content.contentItem - onWidthChanged: content.width = content.contentItem.width + 2 * content.padding - onHeightChanged: content.height = content.contentItem.height + 2 * content.padding + function onWidthChanged() { content.width = content.contentItem.width + 2 * content.padding } + function onHeightChanged() { content.height = content.contentItem.height + 2 * content.padding } } } diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index 097100e217..c1989c4c95 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -149,7 +149,7 @@ Item Connections { target: CuraApplication - onAdditionalComponentsChanged: base.addAdditionalComponents("jobSpecsButton") + function onAdditionalComponentsChanged(areaId) { base.addAdditionalComponents("jobSpecsButton") } } function addAdditionalComponents(areaId) diff --git a/resources/qml/MachineSettings/ComboBoxWithOptions.qml b/resources/qml/MachineSettings/ComboBoxWithOptions.qml index 67177ce936..0ad4f8bb0c 100644 --- a/resources/qml/MachineSettings/ComboBoxWithOptions.qml +++ b/resources/qml/MachineSettings/ComboBoxWithOptions.qml @@ -93,8 +93,8 @@ UM.TooltipArea Connections { target: propertyProvider - onContainerStackChanged: defaultOptionsModel.updateModel() - onIsValueUsedChanged: defaultOptionsModel.updateModel() + function onContainerStackChanged() { defaultOptionsModel.updateModel() } + function onIsValueUsedChanged() { defaultOptionsModel.updateModel() } } Cura.ComboBox diff --git a/resources/qml/MachineSettings/PrintHeadMinMaxTextField.qml b/resources/qml/MachineSettings/PrintHeadMinMaxTextField.qml index 8f24ce6204..0b38a91f81 100644 --- a/resources/qml/MachineSettings/PrintHeadMinMaxTextField.qml +++ b/resources/qml/MachineSettings/PrintHeadMinMaxTextField.qml @@ -54,7 +54,7 @@ NumericTextFieldWithUnit Connections { target: textField - onActiveFocusChanged: + function onActiveFocusChanged() { // When this text field loses focus and the entered text is not valid, make sure to recreate the binding to // show the correct value. diff --git a/resources/qml/MainWindow/ApplicationMenu.qml b/resources/qml/MainWindow/ApplicationMenu.qml index 4e08cb08dd..95cea77248 100644 --- a/resources/qml/MainWindow/ApplicationMenu.qml +++ b/resources/qml/MainWindow/ApplicationMenu.qml @@ -169,7 +169,7 @@ Item Connections { target: Cura.Actions.newProject - onTriggered: + function onTriggered() { if(Printer.platformActivity || Cura.MachineManager.hasUserSettings) { @@ -182,7 +182,7 @@ Item Connections { target: Cura.Actions.browsePackages - onTriggered: + function onTriggered() { curaExtensions.callExtensionMethod("Toolbox", "launch") } @@ -192,7 +192,7 @@ Item Connections { target: Cura.Actions.marketplaceMaterials - onTriggered: + function onTriggered() { curaExtensions.callExtensionMethod("Toolbox", "launch") curaExtensions.callExtensionMethod("Toolbox", "setViewCategoryToMaterials") diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml index 372c3897e3..2e2dd0820a 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml @@ -219,7 +219,7 @@ Button Connections { target: Cura.MachineManager - onCurrentConfigurationChanged: + function onCurrentConfigurationChanged() { configurationItem.checked = Cura.MachineManager.matchesConfiguration(configuration) } diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml index b68d37d1ea..3350b29580 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml @@ -126,7 +126,7 @@ Item Connections { target: outputDevice - onUniqueConfigurationsChanged: + function onUniqueConfigurationsChanged() { forceModelUpdate() } @@ -135,7 +135,7 @@ Item Connections { target: Cura.MachineManager - onOutputDevicesChanged: + function onOutputDevicesChanged() { forceModelUpdate() } diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml index a499242c94..d388bd7a7e 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml @@ -236,6 +236,6 @@ Cura.ExpandablePopup Connections { target: Cura.MachineManager - onGlobalContainerChanged: popupItem.manual_selected_method = -1 // When switching printers, reset the value of the manual selected method + function onGlobalContainerChanged() { popupItem.manual_selected_method = -1 } // When switching printers, reset the value of the manual selected method } } diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml index c4fa83a5b8..7f682c4d2b 100644 --- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml @@ -118,7 +118,7 @@ Item Connections { target: Cura.ExtruderManager - onActiveExtruderChanged: + function onActiveExtruderChanged() { tabBar.setCurrentIndex(Cura.ExtruderManager.activeExtruderIndex); } @@ -139,7 +139,7 @@ Item Connections { target: repeater.model - onModelChanged: + function onModelChanged() { tabBar.setCurrentIndex(Cura.ExtruderManager.activeExtruderIndex) } diff --git a/resources/qml/Menus/ContextMenu.qml b/resources/qml/Menus/ContextMenu.qml index cb10d50ce8..1709d70ab5 100644 --- a/resources/qml/Menus/ContextMenu.qml +++ b/resources/qml/Menus/ContextMenu.qml @@ -90,13 +90,13 @@ Menu Connections { target: UM.Controller - onContextMenuRequested: base.popup(); + function onContextMenuRequested() { base.popup(); } } Connections { target: Cura.Actions.multiplySelection - onTriggered: multiplyDialog.open() + function onTriggered() { multiplyDialog.open() } } UM.SettingPropertyProvider diff --git a/resources/qml/Menus/ViewMenu.qml b/resources/qml/Menus/ViewMenu.qml index a4ded0980c..8865ebb07e 100644 --- a/resources/qml/Menus/ViewMenu.qml +++ b/resources/qml/Menus/ViewMenu.qml @@ -31,7 +31,7 @@ Menu Connections { target: UM.Preferences - onPreferenceChanged: + function onPreferenceChanged(preference) { if (preference !== "general/camera_perspective_mode") { diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index 99640b1059..e6248f43b4 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -252,9 +252,10 @@ Item buttonsRow.updateAdditionalComponents("monitorButtons") } - Connections { + Connections + { target: CuraApplication - onAdditionalComponentsChanged: buttonsRow.updateAdditionalComponents("monitorButtons") + function onAdditionalComponentsChanged() { buttonsRow.updateAdditionalComponents("monitorButtons") } } function updateAdditionalComponents (areaId) { diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index c0c443eec2..e4ea2146ae 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -416,7 +416,7 @@ UM.PreferencesPage Connections { target: UM.Preferences - onPreferenceChanged: + function onPreferenceChanged(preference) { if(preference != "general/camera_perspective_mode") { @@ -856,7 +856,7 @@ UM.PreferencesPage Connections { target: UM.Preferences - onPreferenceChanged: + function onPreferenceChanged(preference) { if (preference !== "info/send_slice_info") { diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index b61f866833..a8b64f94a4 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -166,7 +166,7 @@ UM.ManagementPage Connections { target: Cura.MachineManager - onGlobalContainerChanged: + function onGlobalContainerChanged() { objectList.currentIndex = activeMachineIndex() objectList.onCurrentIndexChanged() diff --git a/resources/qml/Preferences/Materials/MaterialsBrandSection.qml b/resources/qml/Preferences/Materials/MaterialsBrandSection.qml index 5dd68c426f..606acc2950 100644 --- a/resources/qml/Preferences/Materials/MaterialsBrandSection.qml +++ b/resources/qml/Preferences/Materials/MaterialsBrandSection.qml @@ -134,7 +134,7 @@ Item Connections { target: UM.Preferences - onPreferenceChanged: + function onPreferenceChanged(preference) { if (preference !== "cura/expanded_types" && preference !== "cura/expanded_brands") { diff --git a/resources/qml/Preferences/Materials/MaterialsList.qml b/resources/qml/Preferences/Materials/MaterialsList.qml index 8b82a87820..3173fbd680 100644 --- a/resources/qml/Preferences/Materials/MaterialsList.qml +++ b/resources/qml/Preferences/Materials/MaterialsList.qml @@ -124,13 +124,13 @@ Item Connections { target: materialsModel - onItemsChanged: updateAfterModelChanges() + function onItemsChanged() { updateAfterModelChanges() } } Connections { target: genericMaterialsModel - onItemsChanged: updateAfterModelChanges() + function onItemsChanged() { updateAfterModelChanges() } } Column diff --git a/resources/qml/Preferences/Materials/MaterialsTypeSection.qml b/resources/qml/Preferences/Materials/MaterialsTypeSection.qml index 07630a83b4..7219cb7b89 100644 --- a/resources/qml/Preferences/Materials/MaterialsTypeSection.qml +++ b/resources/qml/Preferences/Materials/MaterialsTypeSection.qml @@ -124,7 +124,7 @@ Item Connections { target: UM.Preferences - onPreferenceChanged: + function onPreferenceChanged(preference) { if (preference !== "cura/expanded_types" && preference !== "cura/expanded_brands") { diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index a9bc0f80f4..9144d4dbe1 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -217,7 +217,7 @@ Item Connections { target: base.qualityManagementModel - onItemsChanged: + function onItemsChanged() { var toSelectItemName = base.currentItem == null ? "" : base.currentItem.name; if (newQualityNameToSelect != "") diff --git a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml index db19ed89df..d18febfc5f 100644 --- a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml +++ b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml @@ -244,7 +244,7 @@ Item Connections { target: Cura.ExtruderManager - onActiveExtruderChanged: + function onActiveExtruderChanged() { tabBar.setCurrentIndex(Cura.ExtruderManager.activeExtruderIndex); } @@ -256,7 +256,7 @@ Item Connections { target: repeater.model - onModelChanged: + function onModelChanged() { tabBar.setCurrentIndex(Cura.ExtruderManager.activeExtruderIndex) } diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml index 79013233ed..81b752eef6 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml @@ -84,7 +84,7 @@ Item Connections { target: UM.Preferences - onPreferenceChanged: + function onPreferenceChanged(preference) { if (preference !== "view/settings_list_height" && preference !== "general/window_height" && preference !== "general/window_state") { diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml index 92f0024b23..aadee43c36 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml @@ -128,7 +128,7 @@ Item Connections { target: extruderModel - onModelChanged: + function onModelChanged() { var maybeColor = supportExtruderCombobox.model.getItem(supportExtruderCombobox.currentIndex).color if (maybeColor) diff --git a/resources/qml/PrinterOutput/OutputDeviceHeader.qml b/resources/qml/PrinterOutput/OutputDeviceHeader.qml index 47f855266b..cbb9461778 100644 --- a/resources/qml/PrinterOutput/OutputDeviceHeader.qml +++ b/resources/qml/PrinterOutput/OutputDeviceHeader.qml @@ -17,7 +17,7 @@ Item Connections { target: Cura.MachineManager - onGlobalContainerChanged: + function onGlobalContainerChanged() { outputDevice = Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null; } diff --git a/resources/qml/PrinterSelector/MachineSelectorButton.qml b/resources/qml/PrinterSelector/MachineSelectorButton.qml index 115957dd64..bb30cded9f 100644 --- a/resources/qml/PrinterSelector/MachineSelectorButton.qml +++ b/resources/qml/PrinterSelector/MachineSelectorButton.qml @@ -105,13 +105,13 @@ Button Connections { target: outputDevice - onUniqueConfigurationsChanged: updatePrinterTypesFunction() + function onUniqueConfigurationsChanged() { updatePrinterTypesFunction() } } Connections { target: Cura.MachineManager - onOutputDevicesChanged: updatePrinterTypesFunction() + function onOutputDevicesChanged() { updatePrinterTypesFunction() } } Component.onCompleted: updatePrinterTypesFunction() diff --git a/resources/qml/Settings/SettingExtruder.qml b/resources/qml/Settings/SettingExtruder.qml index ff57381ddf..2bf9e24b3d 100644 --- a/resources/qml/Settings/SettingExtruder.qml +++ b/resources/qml/Settings/SettingExtruder.qml @@ -24,7 +24,7 @@ SettingItem Connections { target: extrudersModel - onModelChanged: + function onModelChanged() { control.color = extrudersModel.getItem(control.currentIndex).color } diff --git a/resources/qml/Settings/SettingOptionalExtruder.qml b/resources/qml/Settings/SettingOptionalExtruder.qml index 714e49e500..ce078551d8 100644 --- a/resources/qml/Settings/SettingOptionalExtruder.qml +++ b/resources/qml/Settings/SettingOptionalExtruder.qml @@ -29,7 +29,7 @@ SettingItem Connections { target: base.extrudersWithOptionalModel - onModelChanged: control.color = base.extrudersWithOptionalModel.getItem(control.currentIndex).color + function onModelChanged() { control.color = base.extrudersWithOptionalModel.getItem(control.currentIndex).color } } textRole: "name" diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 02e20a5a5b..3784a29ba8 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -357,16 +357,16 @@ Item Connections { target: item - onContextMenuRequested: + function onContextMenuRequested() { contextMenu.key = model.key; contextMenu.settingVisible = model.visible; contextMenu.provider = provider contextMenu.popup(); } - onShowTooltip: base.showTooltip(delegate, Qt.point(-settingsView.x - UM.Theme.getSize("default_margin").width, 0), text) - onHideTooltip: base.hideTooltip() - onShowAllHiddenInheritedSettings: + function onShowTooltip() { base.showTooltip(delegate, Qt.point(-settingsView.x - UM.Theme.getSize("default_margin").width, 0), text) } + function onHideTooltip() { base.hideTooltip() } + function onShowAllHiddenInheritedSettings() { var children_with_override = Cura.SettingInheritanceManager.getChildrenKeysWithOverride(category_id) for(var i = 0; i < children_with_override.length; i++) @@ -375,7 +375,7 @@ Item } Cura.SettingInheritanceManager.manualRemoveOverride(category_id) } - onFocusReceived: + function onFocusReceived() { contents.indexWithFocus = index; animateContentY.from = contents.contentY; @@ -383,7 +383,7 @@ Item animateContentY.to = contents.contentY; animateContentY.running = true; } - onSetActiveFocusToNextSetting: + function onSetActiveFocusToNextSetting() { if (forward == undefined || forward) { diff --git a/resources/qml/WelcomePages/AddPrinterByIpContent.qml b/resources/qml/WelcomePages/AddPrinterByIpContent.qml index 97c71b37a4..9a69b78a83 100644 --- a/resources/qml/WelcomePages/AddPrinterByIpContent.qml +++ b/resources/qml/WelcomePages/AddPrinterByIpContent.qml @@ -41,7 +41,7 @@ Item Connections { target: CuraApplication.getDiscoveredPrintersModel() - onDiscoveredPrintersChanged: + function onDiscoveredPrintersChanged() { if (hasRequestFinished && currentRequestAddress) { @@ -310,7 +310,7 @@ Item Connections { target: CuraApplication.getDiscoveredPrintersModel() - onManualDeviceRequestFinished: + function onManualDeviceRequestFinished(success) { var discovered_printers_model = CuraApplication.getDiscoveredPrintersModel() var printer = discovered_printers_model.discoveredPrintersByAddress[hostnameField.text] diff --git a/resources/qml/WelcomePages/DropDownWidget.qml b/resources/qml/WelcomePages/DropDownWidget.qml index 526027ea53..7ec6860c89 100644 --- a/resources/qml/WelcomePages/DropDownWidget.qml +++ b/resources/qml/WelcomePages/DropDownWidget.qml @@ -35,7 +35,7 @@ Item Connections { target: header - onClicked: + function onClicked() { base.contentShown = !base.contentShown clicked() diff --git a/resources/qml/WelcomePages/FirstStartMachineActionsContent.qml b/resources/qml/WelcomePages/FirstStartMachineActionsContent.qml index 53504d7e92..64a815855b 100644 --- a/resources/qml/WelcomePages/FirstStartMachineActionsContent.qml +++ b/resources/qml/WelcomePages/FirstStartMachineActionsContent.qml @@ -27,7 +27,7 @@ Item Connections { target: machineActionsModel - onAllFinished: + function onAllFinished() { if (visible) { diff --git a/resources/qml/WelcomePages/WelcomeDialogItem.qml b/resources/qml/WelcomePages/WelcomeDialogItem.qml index 5b90a8732e..2d01642ada 100644 --- a/resources/qml/WelcomePages/WelcomeDialogItem.qml +++ b/resources/qml/WelcomePages/WelcomeDialogItem.qml @@ -61,6 +61,6 @@ Item Connections { target: model - onAllFinished: dialog.visible = false + function onAllFinished() { dialog.visible = false } } } diff --git a/resources/qml/WelcomePages/WizardDialog.qml b/resources/qml/WelcomePages/WizardDialog.qml index 3bee9fcb5c..cfa03352b0 100644 --- a/resources/qml/WelcomePages/WizardDialog.qml +++ b/resources/qml/WelcomePages/WizardDialog.qml @@ -47,6 +47,6 @@ Window Connections { target: model - onAllFinished: dialog.hide() + function onAllFinished() { dialog.hide() } } } |