Browse Source

Merge pull request #9471 from Ultimaker/Fix_QML_warnings_in_Qt5.15

Fix QML warnings produced due to signal calls in Connections
Jelle Spijker 4 years ago
parent
commit
53067a6d79

+ 1 - 1
plugins/MachineSettingsAction/MachineSettingsAction.qml

@@ -27,7 +27,7 @@ Cura.MachineAction
     Connections
     Connections
     {
     {
         target: extrudersModel
         target: extrudersModel
-        onItemsChanged: tabNameModel.update()
+        function onItemsChanged() { tabNameModel.update() }
     }
     }
 
 
     ListModel
     ListModel

+ 1 - 1
plugins/MachineSettingsAction/MachineSettingsPrinterTab.qml

@@ -326,7 +326,7 @@ Item
                 Connections
                 Connections
                 {
                 {
                     target: Cura.MachineManager
                     target: Cura.MachineManager
-                    onGlobalContainerChanged: extruderCountModel.update()
+                    function onGlobalContainerChanged() { extruderCountModel.update() }
                 }
                 }
             }
             }
 
 

+ 1 - 1
plugins/PerObjectSettingsTool/PerObjectItem.qml

@@ -35,7 +35,7 @@ UM.TooltipArea
     Connections
     Connections
     {
     {
         target: addedSettingsModel
         target: addedSettingsModel
-        onVisibleCountChanged:
+        function onVisibleCountChanged()
         {
         {
             check.checked = addedSettingsModel.getVisible(model.key)
             check.checked = addedSettingsModel.getVisible(model.key)
         }
         }

+ 2 - 2
plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml

@@ -334,13 +334,13 @@ Item
                         Connections
                         Connections
                         {
                         {
                             target: inheritStackProvider
                             target: inheritStackProvider
-                            onPropertiesChanged: provider.forcePropertiesChanged()
+                            function onPropertiesChanged() { provider.forcePropertiesChanged() }
                         }
                         }
 
 
                         Connections
                         Connections
                         {
                         {
                             target: UM.ActiveTool
                             target: UM.ActiveTool
-                            onPropertiesChanged:
+                            function onPropertiesChanged()
                             {
                             {
                                 // the values cannot be bound with UM.ActiveTool.properties.getValue() calls,
                                 // the values cannot be bound with UM.ActiveTool.properties.getValue() calls,
                                 // so here we connect to the signal and update the those values.
                                 // so here we connect to the signal and update the those values.

+ 1 - 1
plugins/PostProcessingPlugin/PostProcessingPlugin.qml

@@ -414,7 +414,7 @@ UM.Dialog
                         {
                         {
                             target: item
                             target: item
 
 
-                            onShowTooltip:
+                            function onShowTooltip(text)
                             {
                             {
                                 tooltip.text = text
                                 tooltip.text = text
                                 var position = settingLoader.mapToItem(settingsPanel, settingsPanel.x, 0)
                                 var position = settingLoader.mapToItem(settingsPanel, settingsPanel.x, 0)

+ 6 - 6
plugins/SimulationView/SimulationViewMainComponent.qml

@@ -55,8 +55,8 @@ Item
         Connections
         Connections
         {
         {
             target: UM.SimulationView
             target: UM.SimulationView
-            onMaxPathsChanged: pathSlider.setHandleValue(UM.SimulationView.currentPath)
-            onCurrentPathChanged:
+            function onMaxPathsChanged() { pathSlider.setHandleValue(UM.SimulationView.currentPath) }
+            function onCurrentPathChanged()
             {
             {
                 // Only pause the simulation when the layer was changed manually, not when the simulation is running
                 // Only pause the simulation when the layer was changed manually, not when the simulation is running
                 if (pathSlider.manuallyChanged)
                 if (pathSlider.manuallyChanged)
@@ -89,7 +89,7 @@ Item
         Connections
         Connections
         {
         {
             target: UM.Preferences
             target: UM.Preferences
-            onPreferenceChanged:
+            function onPreferenceChanged(preference)
             {
             {
                 if (preference !== "view/only_show_top_layers" && preference !== "view/top_layer_count" && ! preference.match("layerview/"))
                 if (preference !== "view/only_show_top_layers" && preference !== "view/top_layer_count" && ! preference.match("layerview/"))
                 {
                 {
@@ -221,9 +221,9 @@ Item
         Connections
         Connections
         {
         {
             target: UM.SimulationView
             target: UM.SimulationView
-            onMaxLayersChanged: layerSlider.setUpperValue(UM.SimulationView.currentLayer)
-            onMinimumLayerChanged: layerSlider.setLowerValue(UM.SimulationView.minimumLayer)
-            onCurrentLayerChanged:
+            function onMaxLayersChanged() { layerSlider.setUpperValue(UM.SimulationView.currentLayer) }
+            function onMinimumLayerChanged() { layerSlider.setLowerValue(UM.SimulationView.minimumLayer) }
+            function onCurrentLayerChanged()
             {
             {
                 // Only pause the simulation when the layer was changed manually, not when the simulation is running
                 // Only pause the simulation when the layer was changed manually, not when the simulation is running
                 if (layerSlider.manuallyChanged)
                 if (layerSlider.manuallyChanged)

+ 1 - 1
plugins/SimulationView/SimulationViewMenuComponent.qml

@@ -22,7 +22,7 @@ Cura.ExpandableComponent
     Connections
     Connections
     {
     {
         target: UM.Preferences
         target: UM.Preferences
-        onPreferenceChanged:
+        function onPreferenceChanged(preference)
         {
         {
             if (preference !== "view/only_show_top_layers" && preference !== "view/top_layer_count" && ! preference.match("layerview/"))
             if (preference !== "view/only_show_top_layers" && preference !== "view/top_layer_count" && ! preference.match("layerview/"))
             {
             {

+ 2 - 2
plugins/Toolbox/resources/qml/Toolbox.qml

@@ -100,8 +100,8 @@ Window
         Connections
         Connections
         {
         {
             target: toolbox
             target: toolbox
-            onShowLicenseDialog: { licenseDialog.show() }
-            onCloseLicenseDialog: { licenseDialog.close() }
+            function onShowLicenseDialog() { licenseDialog.show() }
+            function onCloseLicenseDialog() { licenseDialog.close() }
         }
         }
         
         
         ToolboxLicenseDialog
         ToolboxLicenseDialog

+ 2 - 2
plugins/Toolbox/resources/qml/components/ToolboxDetailTileActions.qml

@@ -112,8 +112,8 @@ Column
     Connections
     Connections
     {
     {
         target: toolbox
         target: toolbox
-        onInstallChanged: installed = toolbox.isInstalled(model.id)
-        onFilterChanged:
+        function onInstallChanged() { installed = toolbox.isInstalled(model.id) }
+        function onFilterChanged()
         {
         {
             installed = toolbox.isInstalled(model.id)
             installed = toolbox.isInstalled(model.id)
         }
         }

+ 1 - 1
plugins/Toolbox/resources/qml/components/ToolboxInstalledTile.qml

@@ -117,7 +117,7 @@ Item
         Connections
         Connections
         {
         {
             target: toolbox
             target: toolbox
-            onEnabledChanged: isEnabled = toolbox.isEnabled(model.id)
+            function onToolboxEnabledChanged() { isEnabled = toolbox.isEnabled(model.id) }
         }
         }
     }
     }
 }
 }

Some files were not shown because too many files changed in this diff