mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Don't store the index of the file item in the VersionControlObserver::ItemState, get the index of the file item on demand instead.
Fixes some "old"-index problems, esp. when you copy/move around files while the version control thread is still running. FIXED-IN: 4.13 REVIEW: 115410
This commit is contained in:
parent
2946cc30fc
commit
4d9193b85b
|
@ -206,7 +206,7 @@ void VersionControlObserver::slotThreadFinished()
|
|||
foreach (const ItemState& item, items) {
|
||||
QHash<QByteArray, QVariant> values;
|
||||
values.insert("version", QVariant(item.version));
|
||||
m_model->setData(item.index, values);
|
||||
m_model->setData(m_model->index(item.item), values);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -265,7 +265,6 @@ int VersionControlObserver::createItemStatesList(QMap<QString, QVector<ItemState
|
|||
|
||||
if (expansionLevel == currentExpansionLevel) {
|
||||
ItemState itemState;
|
||||
itemState.index = index;
|
||||
itemState.item = m_model->fileItem(index);
|
||||
itemState.version = KVersionControlPlugin2::UnversionedVersion;
|
||||
|
||||
|
|
|
@ -102,7 +102,6 @@ private slots:
|
|||
private:
|
||||
struct ItemState
|
||||
{
|
||||
int index;
|
||||
KFileItem item;
|
||||
KVersionControlPlugin2::ItemVersion version;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue