]> cloud.milkyroute.net Git - dolphin.git/commitdiff
placespanel: Use correct loop index when connecting device signals
authorWang Yu <wangyu@uniontech.com>
Mon, 3 Mar 2025 02:34:10 +0000 (10:34 +0800)
committerWang Yu <wangyu@uniontech.com>
Mon, 3 Mar 2025 02:36:56 +0000 (10:36 +0800)
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

index ba3451bd5e603f353e38fa4ec01f5e6590cceaf0..8b18d33248ef18768482e527c13ef0f0601584a2 100644 (file)
@@ -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));
     }
 }