TabModel: Check return value of beginMoveRows

remotes/origin/Falkon/3.0
David Rosca 8 years ago
parent b933e87c99
commit 94e6b98450
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
  1. 5
      src/lib/tabwidget/tabmodel.cpp

@ -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…
Cancel
Save