Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use begin/endResetModel instead of reset #1287

Merged
merged 1 commit into from Apr 2, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/core/qgsbrowsermodel.cpp
Expand Up @@ -308,9 +308,10 @@ QModelIndex QgsBrowserModel::findPath( QString path )

void QgsBrowserModel::reload()
{
beginResetModel();
removeRootItems();
addRootItems();
reset(); // Qt4.6 brings better methods beginResetModel + endResetModel
endResetModel();
}

/* Refresh dir path */
Expand Down
3 changes: 2 additions & 1 deletion src/core/symbology-ng/qgscptcityarchive.cpp
Expand Up @@ -1583,9 +1583,10 @@ QModelIndex QgsCptCityBrowserModel::findPath( QString path )

void QgsCptCityBrowserModel::reload()
{
beginResetModel();
removeRootItems();
addRootItems();
reset(); // Qt4.6 brings better methods beginResetModel + endResetModel
endResetModel();
}

/* Refresh dir path */
Expand Down
3 changes: 2 additions & 1 deletion src/gui/attributetable/qgsattributetablemodel.cpp
Expand Up @@ -660,7 +660,8 @@ void QgsAttributeTableModel::reload( const QModelIndex &index1, const QModelInde

void QgsAttributeTableModel::resetModel()
{
reset();
beginResetModel();
endResetModel();
}

void QgsAttributeTableModel::executeAction( int action, const QModelIndex &idx ) const
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/topology/dockModel.cpp
Expand Up @@ -121,7 +121,8 @@ Qt::ItemFlags DockModel::flags( const QModelIndex &index ) const

void DockModel::resetModel()
{
reset();
beginResetModel();
endResetModel();
}

void DockModel::reload( const QModelIndex &index1, const QModelIndex &index2 )
Expand Down