Procházet zdrojové kódy

perf(01-01): remove debug logs from remaining QML files

TableControlPage.qml:
- Remove console.log from signal handlers

ModernPlaylistPage.qml:
- Remove console.log from onSelectedPlaylistChanged
- Remove Component.onCompleted debug handler
- Remove console.log from playlist execution
- Remove console.log from shuffle toggle
- Remove console.log from run mode and clear pattern handlers

ThemeManager.qml:
- Remove console.log from onDarkModeChanged

BottomNavTab.qml:
- Remove console.log from icon mapping
tuanchris před 1 týdnem
rodič
revize
e2e0c82c22

+ 1 - 7
dune-weaver-touch/qml/components/BottomNavTab.qml

@@ -31,9 +31,6 @@ Rectangle {
         Text {
             property string iconValue: parent.parent.icon
             text: {
-                // Debug log the icon value
-                console.log("BottomNavTab icon value:", iconValue)
-
                 // Map icon names to Unicode symbols that work on Raspberry Pi
                 switch(iconValue) {
                     case "search": return "⌕"      // U+2315 - Works better than magnifying glass
@@ -41,10 +38,7 @@ Rectangle {
                     case "table_chart": return "⚙"  // U+2699 - Gear without variant selector
                     case "play_arrow": return "▶"   // U+25B6 - Play without variant selector
                     case "lightbulb": return "☀"   // U+2600 - Sun symbol for LED
-                    default: {
-                        console.log("Unknown icon:", iconValue, "- using default")
-                        return "□"  // U+25A1 - Simple box, universally supported
-                    }
+                    default: return "□"  // U+25A1 - Simple box, universally supported
                 }
             }
             font.pixelSize: 20

+ 0 - 1
dune-weaver-touch/qml/components/ThemeManager.qml

@@ -67,7 +67,6 @@ QtObject {
     onDarkModeChanged: {
         // Save preference
         settings.darkMode = darkMode
-        console.log("🎨 Dark mode:", darkMode ? "enabled" : "disabled")
     }
 
     // Helper function to get contrast color

+ 1 - 25
dune-weaver-touch/qml/pages/ModernPlaylistPage.qml

@@ -32,18 +32,11 @@ Page {
     onSelectedPlaylistChanged: {
         if (selectedPlaylist) {
             currentPlaylistPatterns = playlistModel.getPatternsForPlaylist(selectedPlaylist)
-            console.log("Loaded patterns for", selectedPlaylist + ":", currentPlaylistPatterns)
         } else {
             currentPlaylistPatterns = []
         }
     }
     
-    // Debug playlist loading
-    Component.onCompleted: {
-        console.log("ModernPlaylistPage completed, playlist count:", playlistModel.rowCount())
-        console.log("showingPlaylistDetail:", showingPlaylistDetail)
-    }
-    
     // Function to navigate to playlist detail
     function showPlaylistDetail(playlistName, playlistData) {
         selectedPlaylist = playlistName
@@ -458,21 +451,11 @@ Page {
                                         anchors.fill: parent
                                         onClicked: {
                                             if (backend) {
-                                                console.log("Playing playlist:", selectedPlaylist, "with settings:", {
-                                                    pauseTime: pauseTime,
-                                                    clearPattern: clearPattern,
-                                                    runMode: runMode,
-                                                    shuffle: shuffle
-                                                })
                                                 backend.executePlaylist(selectedPlaylist, pauseTime, clearPattern, runMode, shuffle)
-                                                
+
                                                 // Navigate to execution page
-                                                console.log("🎵 Navigating to execution page after playlist start")
                                                 if (mainWindow) {
-                                                    console.log("🎵 Setting shouldNavigateToExecution = true")
                                                     mainWindow.shouldNavigateToExecution = true
-                                                } else {
-                                                    console.log("🎵 ERROR: mainWindow is null, cannot navigate")
                                                 }
                                             }
                                         }
@@ -498,7 +481,6 @@ Page {
                                         anchors.fill: parent
                                         onClicked: {
                                             shuffle = !shuffle
-                                            console.log("Shuffle toggled:", shuffle)
                                         }
                                     }
                                 }
@@ -561,7 +543,6 @@ Page {
                                                 checked: true  // Default
                                                 onClicked: {
                                                     runMode = "single"
-                                                    console.log("Run mode set to:", runMode)
                                                 }
 
                                                 contentItem: Text {
@@ -580,7 +561,6 @@ Page {
                                                 checked: false
                                                 onClicked: {
                                                     runMode = "loop"
-                                                    console.log("Run mode set to:", runMode)
                                                 }
 
                                                 contentItem: Text {
@@ -1006,7 +986,6 @@ Page {
                                                 checked: true  // Default
                                                 onClicked: {
                                                     clearPattern = "adaptive"
-                                                    console.log("Clear pattern set to:", clearPattern)
                                                 }
 
                                                 contentItem: Text {
@@ -1025,7 +1004,6 @@ Page {
                                                 checked: false
                                                 onClicked: {
                                                     clearPattern = "clear_center"
-                                                    console.log("Clear pattern set to:", clearPattern)
                                                 }
 
                                                 contentItem: Text {
@@ -1044,7 +1022,6 @@ Page {
                                                 checked: false
                                                 onClicked: {
                                                     clearPattern = "clear_perimeter"
-                                                    console.log("Clear pattern set to:", clearPattern)
                                                 }
 
                                                 contentItem: Text {
@@ -1063,7 +1040,6 @@ Page {
                                                 checked: false
                                                 onClicked: {
                                                     clearPattern = "none"
-                                                    console.log("Clear pattern set to:", clearPattern)
                                                 }
 
                                                 contentItem: Text {

+ 3 - 9
dune-weaver-touch/qml/pages/TableControlPage.qml

@@ -18,29 +18,23 @@ Page {
         target: backend
         
         function onSerialPortsUpdated(ports) {
-            console.log("Serial ports updated:", ports)
             serialPorts = ports
         }
-        
+
         function onSerialConnectionChanged(connected) {
-            console.log("Serial connection changed:", connected)
             isSerialConnected = connected
         }
-        
+
         function onCurrentPortChanged(port) {
-            console.log("Current port changed:", port)
             if (port) {
                 selectedPort = port
             }
         }
-        
-        
+
         function onSettingsLoaded() {
-            console.log("Settings loaded")
             if (backend) {
                 autoPlayOnBoot = backend.autoPlayOnBoot
                 isSerialConnected = backend.serialConnected
-                // Screen timeout is now managed by button selection, no need to convert
                 if (backend.currentPort) {
                     selectedPort = backend.currentPort
                 }