test: Make qheaderview test build
it's using deprecated reset() model that we don't support anymore since "this is Qt6", so include the 2 lines in the code. This makes for bad code but since it's a test and it used to work i guess it's good enough Change-Id: Ia906fe40359ddc0defb10795cf12a17498124983 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
parent
35a30c7ebb
commit
f88e78fd19
@ -4,7 +4,7 @@ add_subdirectory(qabstractitemview)
|
||||
add_subdirectory(qdatawidgetmapper)
|
||||
add_subdirectory(qdirmodel)
|
||||
add_subdirectory(qfileiconprovider)
|
||||
# add_subdirectory(qheaderview) ## FIXME: Fails to build!
|
||||
add_subdirectory(qheaderview)
|
||||
add_subdirectory(qitemdelegate)
|
||||
add_subdirectory(qitemeditorfactory)
|
||||
add_subdirectory(qitemview)
|
||||
|
@ -85,7 +85,8 @@ class XResetModel : public QStandardItemModel
|
||||
blockSignals(true);
|
||||
bool r = QStandardItemModel::removeRows(row, count, parent);
|
||||
blockSignals(false);
|
||||
emit reset();
|
||||
beginResetModel();
|
||||
endResetModel();
|
||||
return r;
|
||||
}
|
||||
virtual bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex())
|
||||
@ -93,7 +94,8 @@ class XResetModel : public QStandardItemModel
|
||||
blockSignals(true);
|
||||
bool r = QStandardItemModel::insertRows(row, count, parent);
|
||||
blockSignals(false);
|
||||
emit reset();
|
||||
beginResetModel();
|
||||
endResetModel();
|
||||
return r;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user