mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-05 16:51:12 -07:00
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).
This commit is contained in:
parent
a277adae64
commit
7827b36ab7
46 changed files with 113 additions and 122 deletions
|
|
@ -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 }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue