Using the typedef ModelItemValues for "QHash<int, QVariant>".
This commit is contained in:
@ -3,6 +3,8 @@
|
||||
|
||||
#include <QUndoCommand>
|
||||
|
||||
typedef QHash<int, QVariant> ModelItemValues;
|
||||
|
||||
class TableModel;
|
||||
|
||||
class InsertRowsCommand : public QUndoCommand {
|
||||
@ -11,9 +13,9 @@ class InsertRowsCommand : public QUndoCommand {
|
||||
/// Using simple pointer to model because there was a crash when closing the application with an
|
||||
/// unclean undo stack
|
||||
InsertRowsCommand(TableModel* model,
|
||||
int startRow,
|
||||
QList<QHash<int, QVariant> > valueList,
|
||||
QUndoCommand* parent = nullptr);
|
||||
int startRow,
|
||||
QList<ModelItemValues> valueList,
|
||||
QUndoCommand* parent = nullptr);
|
||||
|
||||
/// QUndoCommand interface
|
||||
void undo() override;
|
||||
@ -22,7 +24,7 @@ class InsertRowsCommand : public QUndoCommand {
|
||||
private:
|
||||
TableModel* m_tableModel;
|
||||
const int m_startRow;
|
||||
const QList<QHash<int, QVariant> > m_valueList;
|
||||
const QList<ModelItemValues> m_valueList;
|
||||
};
|
||||
|
||||
#endif // INSERTROWSCOMMAND_H
|
||||
|
||||
Reference in New Issue
Block a user