mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
TabModel: Check return value of beginMoveRows
This commit is contained in:
parent
b933e87c99
commit
94e6b98450
|
@ -266,7 +266,10 @@ void TabModel::tabRemoved(int index)
|
|||
|
||||
void TabModel::tabMoved(int from, int to)
|
||||
{
|
||||
beginMoveRows(QModelIndex(), from, from, QModelIndex(), to > from ? to + 1 : to);
|
||||
if (!beginMoveRows(QModelIndex(), from, from, QModelIndex(), to > from ? to + 1 : to)) {
|
||||
qWarning() << "Invalid beginMoveRows" << from << (to > from ? to + 1 : to);
|
||||
return;
|
||||
}
|
||||
m_tabs.insert(to, m_tabs.takeAt(from));
|
||||
endMoveRows();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user