Marcelo Lira
unread,Jun 15, 2012, 2:18:50 PM6/15/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to snowsh...@googlegroups.com
This method calls QSqlTableModel::insertRecord which goes on to
call beginInsertRows.
In practice this fix prevents BookmarkModel from emitting two
countChanged() signals when inserting bookmarks.
Reviewed-by: ?
---
src/core/BookmarkModel.cpp | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/core/BookmarkModel.cpp b/src/core/BookmarkModel.cpp
index 0d271fe..9726902 100644
--- a/src/core/BookmarkModel.cpp
+++ b/src/core/BookmarkModel.cpp
@@ -62,10 +62,7 @@ void BookmarkModel::insert(const QString& name, const QString& url)
record.setValue(QLatin1String("url"), url);
record.setValue(QLatin1String("dateAdded"), QDateTime::currentDateTime().toTime_t());
- QModelIndex index = QModelIndex();
- beginInsertRows(index, rowCount(index), rowCount(index));
insertRecord(-1, record);
- endInsertRows();
submitAll();
}
--
1.7.9.5