From 17728d5c07ae07b901853c219c37d91690a8eebf Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Thu, 26 Oct 2023 09:58:11 +0200 Subject: [PATCH] change main item name --- Linphone/view/Item/Carousel.qml | 10 +++++----- Linphone/view/Item/Form/LoginForm.qml | 4 ++-- Linphone/view/Page/Login/LoginPage.qml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Linphone/view/Item/Carousel.qml b/Linphone/view/Item/Carousel.qml index 8e846f51..43eee000 100644 --- a/Linphone/view/Item/Carousel.qml +++ b/Linphone/view/Item/Carousel.qml @@ -5,7 +5,7 @@ import QtQuick.Controls 2.2 as Control import Linphone ColumnLayout { - id: carouselRoot + id: mainItem property list itemsList property int currentIndex: carouselStackLayout.currentIndex @@ -30,9 +30,9 @@ ColumnLayout { Component.onCompleted: { // The animation is not working until the slide // has been displayed once - for (var i = 0; i < carouselRoot.itemsList.length; ++i) { - // const newObject = Qt.createQmlObject(carouselRoot.itemsList[i], carouselStackLayout); - carouselRoot.itemsList[i].createObject(carouselStackLayout) + for (var i = 0; i < mainItem.itemsList.length; ++i) { + // const newObject = Qt.createQmlObject(mainItem.itemsList[i], carouselStackLayout); + mainItem.itemsList[i].createObject(carouselStackLayout) var button = carouselButton.createObject(carouselButtonsLayout, {slideIndex: i, stackLayout: carouselStackLayout}) button.buttonClicked.connect(goToSlideAtIndex) currentIndex = i @@ -73,7 +73,7 @@ ColumnLayout { var currentItem = items[currentIndex] var crossFaderAnim = crossFader.createObject(parent, {fadeInTarget: currentItem, mirrored: (previousIndex > currentIndex)}) crossFaderAnim.restart() - carouselRoot.currentIndex = currentIndex + mainItem.currentIndex = currentIndex } } RowLayout { diff --git a/Linphone/view/Item/Form/LoginForm.qml b/Linphone/view/Item/Form/LoginForm.qml index df0f34d6..f69d178e 100644 --- a/Linphone/view/Item/Form/LoginForm.qml +++ b/Linphone/view/Item/Form/LoginForm.qml @@ -4,7 +4,7 @@ import QtQuick.Controls as Control import Linphone ColumnLayout { - id: root + id: mainItem Layout.alignment: Qt.AlignBottom signal useSIPButtonClicked() RowLayout { @@ -50,7 +50,7 @@ ColumnLayout { Layout.topMargin: 40 inversedColors: true text: "Use SIP Account" - onClicked: {root.useSIPButtonClicked()} + onClicked: {mainItem.useSIPButtonClicked()} } } } diff --git a/Linphone/view/Page/Login/LoginPage.qml b/Linphone/view/Page/Login/LoginPage.qml index 47d178bb..203b2535 100644 --- a/Linphone/view/Page/Login/LoginPage.qml +++ b/Linphone/view/Page/Login/LoginPage.qml @@ -4,7 +4,7 @@ import QtQuick.Controls as Control import Linphone LoginLayout { - id: root + id: mainItem signal useSIPButtonClicked() titleContent: RowLayout { @@ -36,7 +36,7 @@ LoginLayout { } centerContent: LoginForm { - onUseSIPButtonClicked: root.useSIPButtonClicked() + onUseSIPButtonClicked: mainItem.useSIPButtonClicked() } }