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:
Kostas Karmas 2021-03-30 08:46:14 +02:00
parent a277adae64
commit 7827b36ab7
46 changed files with 113 additions and 122 deletions

View file

@ -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