Import Qt6 conversion patch 25/30525/1
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 19 Nov 2024 13:26:25 +0000 (14:26 +0100)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 19 Nov 2024 13:26:35 +0000 (14:26 +0100)
Import the patches for the demo applications into the app repos.

Bug-AGL: SPEC-5294
Change-Id: I7d910fdb17208d66c71c5b0264ad0f6a83ff8239
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
app/SettingPage.qml
app/SettingsLauncher.qml
app/bluetooth/Bluetooth.qml
app/datetime/DateEdit.qml
app/datetime/DateTime.qml
app/datetime/EditSeparator.qml
app/datetime/TimeEdit.qml
app/main.cpp
app/version/Version.qml
app/wifi/Wifi.qml
app/wired/Wired.qml

index d5858e8..b0a587d 100644 (file)
@@ -52,7 +52,7 @@ Page {
         ImageButton {
             id: back
             anchors.bottom: parent.bottom
-            offImage: '../images/HMI_Settings_X.svg'
+            offImage: 'qrc:/images/HMI_Settings_X.svg'
             onClicked: root.done()
         }
     }
index 01c5433..14059d0 100644 (file)
@@ -69,7 +69,7 @@ Page {
                 }
             }
             Image {
-                source: '../images/HMI_Settings_DividingLine.svg'
+                source: 'qrc:/images/HMI_Settings_DividingLine.svg'
                 anchors.horizontalCenter: parent.horizontalCenter
                 anchors.top: parent.top
                 visible: model.index > 0
index c1b2aa2..d5178df 100644 (file)
@@ -199,7 +199,7 @@ SettingPage {
           anchors.left: parent.left
           anchors.leftMargin: 80
           height: 5
-          source: (bluetooth.power === true && pairedListView.count) ? '../images/HMI_Settings_DividingLine.svg':''
+          source: (bluetooth.power === true && pairedListView.count) ? 'qrc:/images/HMI_Settings_DividingLine.svg':''
       }
       Text {
           id: detectedlabel
index abfcfa9..cac55e8 100644 (file)
@@ -30,7 +30,7 @@ GridLayout {
 
     ImageButton {
         Layout.alignment: Layout.Center
-        offImage: './images/HMI_Settings_TimeDate_Arrow_Up.svg'
+        offImage: 'qrc:/images/HMI_Settings_TimeDate_Arrow_Up.svg'
         onClicked: monthControl.currentIndex++
     }
     Tumbler {
@@ -43,7 +43,7 @@ GridLayout {
     }
     ImageButton {
         Layout.alignment: Layout.Center
-        offImage: './images/HMI_Settings_TimeDate_Arrow_Down.svg'
+        offImage: 'qrc:/images/HMI_Settings_TimeDate_Arrow_Down.svg'
         onClicked: monthControl.currentIndex--
     }
 
@@ -53,7 +53,7 @@ GridLayout {
 
     ImageButton {
         Layout.alignment: Layout.Center
-        offImage: './images/HMI_Settings_TimeDate_Arrow_Up.svg'
+        offImage: 'qrc:/images/HMI_Settings_TimeDate_Arrow_Up.svg'
         onClicked: dayControl.currentIndex++
     }
 
@@ -91,13 +91,13 @@ GridLayout {
 
     ImageButton {
         Layout.alignment: Layout.Center
-        offImage: './images/HMI_Settings_TimeDate_Arrow_Down.svg'
+        offImage: 'qrc:/images/HMI_Settings_TimeDate_Arrow_Down.svg'
         onClicked: dayControl.currentIndex--
     }
 
     ImageButton {
         Layout.alignment: Layout.Center
-        offImage: './images/HMI_Settings_TimeDate_Arrow_Up.svg'
+        offImage: 'qrc:/images/HMI_Settings_TimeDate_Arrow_Up.svg'
         onClicked: yearControl.currentIndex++
     }
 
@@ -116,7 +116,7 @@ GridLayout {
 
     ImageButton {
         Layout.alignment: Layout.Center
-        offImage: './images/HMI_Settings_TimeDate_Arrow_Down.svg'
+        offImage: 'qrc:/images/HMI_Settings_TimeDate_Arrow_Down.svg'
         onClicked: yearControl.currentIndex--
     }
 }
index 06cbc8c..c58de69 100644 (file)
@@ -31,7 +31,7 @@ SettingPage {
         Label { text: 'Date'}
         DateEdit {}
         Image {
-            source: '../images/HMI_Settings_DividingLine.svg'
+            source: 'qrc:/images/HMI_Settings_DividingLine.svg'
         }
         Label { text: 'Time'}
         TimeEdit {}
index e833b52..a58c809 100644 (file)
@@ -30,7 +30,7 @@ ColumnLayout {
             Layout.fillHeight: true
             Layout.preferredHeight: 2
             Layout.alignment: Layout.Center
-            source: './images/HMI_Settings_TimeDate_Arrow_DividingLine.svg'
+            source: 'qrc:/images/HMI_Settings_TimeDate_Arrow_DividingLine.svg'
         }
     }
     Item {
index 69a049b..2db1403 100644 (file)
@@ -30,7 +30,7 @@ GridLayout {
 
     ImageButton {
         Layout.alignment: Layout.Center
-        offImage: './images/HMI_Settings_TimeDate_Arrow_Up.svg'
+        offImage: 'qrc:/images/HMI_Settings_TimeDate_Arrow_Up.svg'
         onClicked: hourControl.currentIndex++
     }
     Tumbler {
@@ -40,7 +40,7 @@ GridLayout {
     }
     ImageButton {
         Layout.alignment: Layout.Center
-        offImage: './images/HMI_Settings_TimeDate_Arrow_Down.svg'
+        offImage: 'qrc:/images/HMI_Settings_TimeDate_Arrow_Down.svg'
         onClicked: hourControl.currentIndex--
     }
 
@@ -50,7 +50,7 @@ GridLayout {
 
     ImageButton {
         Layout.alignment: Layout.Center
-        offImage: './images/HMI_Settings_TimeDate_Arrow_Up.svg'
+        offImage: 'qrc:/images/HMI_Settings_TimeDate_Arrow_Up.svg'
         onClicked: minutesControl.currentIndex++
     }
 
@@ -62,13 +62,13 @@ GridLayout {
 
     ImageButton {
         Layout.alignment: Layout.Center
-        offImage: './images/HMI_Settings_TimeDate_Arrow_Down.svg'
+        offImage: 'qrc:/images/HMI_Settings_TimeDate_Arrow_Down.svg'
         onClicked: minutesControl.currentIndex--
     }
 
     ImageButton {
         Layout.alignment: Layout.Center
-        offImage: './images/HMI_Settings_TimeDate_Arrow_Up.svg'
+        offImage: 'qrc:/images/HMI_Settings_TimeDate_Arrow_Up.svg'
         onClicked: ampmControl.currentIndex++
     }
 
@@ -80,7 +80,7 @@ GridLayout {
 
     ImageButton {
         Layout.alignment: Layout.Center
-        offImage: './images/HMI_Settings_TimeDate_Arrow_Down.svg'
+        offImage: 'qrc:/images/HMI_Settings_TimeDate_Arrow_Down.svg'
         onClicked: ampmControl.currentIndex--
     }
 }
index bf82588..35b4c0e 100644 (file)
@@ -78,9 +78,10 @@ int main(int argc, char *argv[])
     // active auto-connect that was in agl-service-bluetooth.  The latter is
     // now dependent on this application being run until further re-architecting
     // takes place.
-    Network *network = new Network(true, context);
-    network->power(true, QString("bluetooth"));
-    context->setContextProperty("network", network);
+    // Network *network = new Network(true, context);
+    // network->power(true, QString("bluetooth"));
+    QObject *network = new QObject(context); // prevent crash
+    context->setContextProperty("network", network);    
 
     engine.load(QUrl(QStringLiteral("qrc:/Settings.qml")));
 
index 8d47ad5..1eaced7 100644 (file)
@@ -40,7 +40,7 @@ SettingPage {
             clip: true
             Image {
                 anchors.centerIn: parent
-                source: './images/agl_slide_0.png'
+                source: 'qrc:/images/agl_slide_0.png'
                 z: -1
                 opacity: 0.5
             }
index ba9d89e..9331d73 100644 (file)
@@ -106,7 +106,7 @@ SettingPage {
             }
 
             Image {
-                source: '../images/HMI_Settings_DividingLine.svg'
+                source: 'qrc:/images/HMI_Settings_DividingLine.svg'
                 anchors.horizontalCenter: parent.horizontalCenter
                 anchors.top: parent.top
                 anchors.topMargin: -15
index 0a3e312..610d2c6 100644 (file)
@@ -111,7 +111,7 @@ SettingPage {
             }
 
             Image {
-                source: '../images/HMI_Settings_DividingLine.svg'
+                source: 'qrc:/images/HMI_Settings_DividingLine.svg'
                 anchors.horizontalCenter: parent.horizontalCenter
                 anchors.top: parent.top
                 anchors.topMargin: -15