Take the old value from edit role when copying variable

Task-number: QTCREATORBUG-6669

Change-Id: Ife42d13289b924ce9a098b6828a8362808f27b3c
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Jarek Kobus
2011-12-20 13:26:07 +01:00
parent bf97079be3
commit fb67842813

View File

@@ -200,7 +200,7 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
return true; return true;
const QString oldName = data(this->index(index.row(), 0, QModelIndex())).toString(); const QString oldName = data(this->index(index.row(), 0, QModelIndex())).toString();
const QString oldValue = data(this->index(index.row(), 1, QModelIndex())).toString(); const QString oldValue = data(this->index(index.row(), 1, QModelIndex()), Qt::EditRole).toString();
int changesPos = d->findInChanges(oldName); int changesPos = d->findInChanges(oldName);
if (index.column() == 0) { if (index.column() == 0) {