refs #437 Removed toQVariant and convertFromQVariant.

This commit is contained in:
Mathew Sutcliffe
2015-05-31 17:21:17 +01:00
parent db5181c26a
commit 47cac09e81
10 changed files with 12 additions and 61 deletions

View File

@@ -120,7 +120,7 @@ namespace BlackGui
// otherwise (comboboxes) standard handling via QItemDelegate
CKeyboardLineEdit *lineEdit = qobject_cast<CKeyboardLineEdit *>(editor);
if (lineEdit)
model->setData(index, lineEdit->getKey().toQVariant() , Qt::EditRole);
model->setData(index, QVariant::fromValue(lineEdit->getKey()) , Qt::EditRole);
else
QItemDelegate::setModelData(editor, model, index);
}

View File

@@ -150,7 +150,7 @@ namespace BlackGui
//! Formatted data
ObjectType obj = this->getContainerOrFilteredContainer()[index.row()];
BlackMisc::CPropertyIndex propertyIndex = this->columnToPropertyIndex(index.column());
return formatter->data(role, obj.propertyByIndex(propertyIndex)).toQVariant();
return formatter->data(role, obj.propertyByIndex(propertyIndex)).getQVariant();
}
template <typename ObjectType, typename ContainerType>