From db6f10fb6c8117390ffdceb614e7e0f3c0ac2956 Mon Sep 17 00:00:00 2001 From: Wang Yu Date: Mon, 3 Mar 2025 10:34:10 +0800 Subject: [PATCH] placespanel: Use correct loop index when connecting device signals The loop in slotRowsInserted was using the 'first' parameter instead of the loop variable 'i', causing only the first index to be connected multiple times. --- src/panels/places/placespanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index ba3451bd5..8b18d3324 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -257,7 +257,7 @@ void PlacesPanel::slotTearDownDone(const QModelIndex &index, Solid::ErrorType er void PlacesPanel::slotRowsInserted(const QModelIndex &parent, int first, int last) { for (int i = first; i <= last; ++i) { - connectDeviceSignals(model()->index(first, 0, parent)); + connectDeviceSignals(model()->index(i, 0, parent)); } } -- 2.47.3