forked from qt-creator/qt-creator
Do not use QAbstractItemModel::reset().
Change-Id: Ie49bdf576a6d3543aef6df133b27c8827775c935
Rationale:
a) It is conceptually cleaner to do the changes to the model
in between calls to beginResetModel() and endResetModel,
respectively.
b) The function is deprecated in Qt 5, for exactly that reason.
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -1163,18 +1163,20 @@ void BreakHandler::saveSessionData()
|
||||
|
||||
void BreakHandler::loadSessionData()
|
||||
{
|
||||
beginResetModel();
|
||||
m_storage.clear();
|
||||
reset();
|
||||
endResetModel();
|
||||
loadBreakpoints();
|
||||
}
|
||||
|
||||
void BreakHandler::removeSessionData()
|
||||
{
|
||||
beginResetModel();
|
||||
Iterator it = m_storage.begin(), et = m_storage.end();
|
||||
for ( ; it != et; ++it)
|
||||
it->destroyMarker();
|
||||
m_storage.clear();
|
||||
reset();
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void BreakHandler::breakByFunction(const QString &functionName)
|
||||
|
||||
Reference in New Issue
Block a user