From: Wang Yu Date: Mon, 3 Mar 2025 02:34:10 +0000 (+0800) Subject: placespanel: Use correct loop index when connecting device signals X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/db6f10fb6c8117390ffdceb614e7e0f3c0ac2956 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. --- 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)); } }