Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/plugins/folder/foldermodel.cpp
Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Line(s) | 125 | { | |||
---|---|---|---|---|---|
151 | 151 | | |||
152 | /* | 152 | /* | ||
153 | * position dropped items at the desired target position | 153 | * position dropped items at the desired target position | ||
154 | * delay this via queued connection, such that the row is available and can be mapped | 154 | * delay this via queued connection, such that the row is available and can be mapped | ||
155 | * when we emit the move request | 155 | * when we emit the move request | ||
156 | */ | 156 | */ | ||
157 | connect(this, &QAbstractItemModel::rowsInserted, | 157 | connect(this, &QAbstractItemModel::rowsInserted, | ||
158 | this, [this](const QModelIndex &parent, int first, int last) { | 158 | this, [this](const QModelIndex &parent, int first, int last) { | ||
159 | qDebug() << "row insert!"; | ||||
159 | for (int i = first; i <= last; ++i) { | 160 | for (int i = first; i <= last; ++i) { | ||
160 | const auto idx = index(i, 0, parent); | 161 | const auto idx = index(i, 0, parent); | ||
161 | const auto url = itemForIndex(idx).url(); | 162 | const auto url = itemForIndex(idx).url(); | ||
162 | auto it = m_dropTargetPositions.find(url.fileName()); | 163 | auto it = m_dropTargetPositions.find(url.fileName()); | ||
163 | if (it != m_dropTargetPositions.end()) { | 164 | if (it != m_dropTargetPositions.end()) { | ||
164 | const auto pos = it.value(); | 165 | const auto pos = it.value(); | ||
165 | m_dropTargetPositions.erase(it); | 166 | m_dropTargetPositions.erase(it); | ||
166 | setSortMode(-1); | 167 | setSortMode(-1); | ||
▲ Show 20 Lines • Show All 1833 Lines • Show Last 20 Lines |