# # # patch "src/view/InventoryViewDelegate.cpp" # from [0b36236e7307a1e4cf3cd129431bb1df67f8666a] # to [85121a85ccab754b400fc5a33be1c007ba243f02] # # patch "src/view/InventoryViewDelegate.h" # from [704deafe354280795ca9bfe0e7c42ab82519643f] # to [7b67edf5a5cfa2460c972592b1dccbfb08777329] # ============================================================ --- src/view/InventoryViewDelegate.cpp 0b36236e7307a1e4cf3cd129431bb1df67f8666a +++ src/view/InventoryViewDelegate.cpp 85121a85ccab754b400fc5a33be1c007ba243f02 @@ -33,6 +33,8 @@ QWidget * InventoryViewDelegate::createE const QModelIndex & index) const { Q_UNUSED(option); + Q_UNUSED(index); + QLineEdit * lineEdit = new QLineEdit(parent); connect( lineEdit, SIGNAL(editingFinished()), @@ -43,7 +45,7 @@ void InventoryViewDelegate::setEditorDat void InventoryViewDelegate::setEditorData(QWidget * editor, const QModelIndex & index) const { - QLineEdit * lineEdit = qobject_cast(editor); + QLineEdit * lineEdit = qobject_cast(editor); if (!lineEdit) return; lineEdit->setText(index.model()->data(index).toString()); } ============================================================ --- src/view/InventoryViewDelegate.h 704deafe354280795ca9bfe0e7c42ab82519643f +++ src/view/InventoryViewDelegate.h 7b67edf5a5cfa2460c972592b1dccbfb08777329 @@ -25,17 +25,16 @@ class InventoryViewDelegate : public QIt class InventoryViewDelegate : public QItemDelegate { - Q_OBJECT - + Q_OBJECT public: - InventoryViewDelegate(QObject *); + InventoryViewDelegate(QObject *); - QWidget * createEditor(QWidget *, const QStyleOptionViewItem &, const QModelIndex &) const; - void setEditorData(QWidget *, const QModelIndex &) const; - void setModelData(QWidget *, QAbstractItemModel *, const QModelIndex &) const; + QWidget * createEditor(QWidget *, const QStyleOptionViewItem &, const QModelIndex &) const; + void setEditorData(QWidget *, const QModelIndex &) const; + void setModelData(QWidget *, QAbstractItemModel *, const QModelIndex &) const; - private slots: - void emitCommitData(); +private slots: + void emitCommitData(); }; #endif